Create multiple invites
POST/invites/create-multiple.json
Create multiple invites
Request
Header Parameters
Api-Key stringrequired
Api-Username stringrequired
- application/json
Body
email stringrequired
pass 1 email per invite to be generated. other properties will be shared by each invite.
skip_email booleanrequired
Default value: false
custom_message stringrequired
optional, for email invites
max_redemptions_allowed integerrequired
Default value: 1
optional, for link invites
topic_id integerrequired
group_ids stringrequired
Optional, either this or group_names
. Comma separated list for multiple ids.
group_names stringrequired
Optional, either this or group_ids
. Comma separated list for multiple names.
expires_at stringrequired
optional, if not supplied, the invite_expiry_days site setting is used
Responses
- 200
success response
- application/json
- Schema
- Example (from schema)
Schema
num_successfully_created_invitations integerrequired
num_failed_invitations integerrequired
failed_invitations undefined[]required
successful_invitations arrayrequired
{
"num_successfully_created_invitations": 42,
"num_failed_invitations": 42,
"failed_invitations": [],
"successful_invitations": [
{
"id": 42,
"link": "http://example.com/invites/9045fd767efe201ca60c6658bcf14158",
"email": "not-a-user-yet-1@example.com",
"emailed": true,
"custom_message": "Hello world!",
"topics": [],
"groups": [],
"created_at": "2021-01-01T12:00:00.000Z",
"updated_at": "2021-01-01T12:00:00.000Z",
"expires_at": "2021-02-01T12:00:00.000Z",
"expired": false
},
{
"id": 42,
"link": "http://example.com/invites/c6658bcf141589045fd767efe201ca60",
"email": "not-a-user-yet-2@example.com",
"emailed": true,
"custom_message": "Hello world!",
"topics": [],
"groups": [],
"created_at": "2021-01-01T12:00:00.000Z",
"updated_at": "2021-01-01T12:00:00.000Z",
"expires_at": "2021-02-01T12:00:00.000Z",
"expired": false
}
]
}
Loading...