v3

latestOpenAPI 3.1.0MIT2026-07-31930688.4 KB
Invites

Create multiple invites

post/invites/create-multiple.json

Headers

Api-Keystring required
Api-Usernamestring required

Request body

emailstring

pass 1 email per invite to be generated. other properties will be shared by each invite.

skip_emailboolean
custom_messagestring

optional, for email invites

max_redemptions_allowedinteger

optional, for link invites

topic_idinteger
group_idsstring

Optional, either this or group_names. Comma separated list for multiple ids.

group_namesstring

Optional, either this or group_ids. Comma separated list for multiple names.

expires_atstring

optional, if not supplied, the invite_expiry_days site setting is used

Example request

{
  "max_redemptions_allowed": 5,
  "group_ids": "42,43",
  "group_names": "foo,bar"
}

Response

success response

num_successfully_created_invitationsinteger
num_failed_invitationsinteger

Example response

{
  "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
    }
  ]
}