v3

latestOpenAPI 3.1.0MIT2026-07-31930688.4 KB
Invites

Create an invite

post/invites.json

Headers

Api-Keystring required
Api-Usernamestring required

Request body

emailstring

required for email invites only

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

{
  "email": "not-a-user-yet@example.com",
  "max_redemptions_allowed": 5,
  "group_ids": "42,43",
  "group_names": "foo,bar"
}

Response

success response

idinteger required
invite_keystring required
linkstring required
descriptionstring nullable required
emailstring required
domainstring nullable required
emailedboolean required
can_delete_inviteboolean required
custom_messagestring nullable required
created_atstring required
updated_atstring required
expires_atstring required
expiredboolean required
grants_adminboolean required
grants_moderatorboolean required
topicsobject[] required
groupsobject[] required

Example response

{
  "id": 42,
  "link": "http://example.com/invites/9045fd767efe201ca60c6658bcf14158",
  "email": "not-a-user-yet@example.com",
  "custom_message": "Hello world!",
  "created_at": "2021-01-01T12:00:00.000Z",
  "updated_at": "2021-01-01T12:00:00.000Z",
  "expires_at": "2021-02-01T12:00:00.000Z",
  "topics": [],
  "groups": []
}