Skip to main content
POST
/
api
/
admin
/
invites
Create an invite code
curl --request POST \
  --url https://api.example.com/api/admin/invites \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "role": "editor",
  "max_uses": 1,
  "expires_in_hours": 123
}
'
{
  "id": 123,
  "code": "<string>",
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "role": "<string>",
  "max_uses": 123,
  "uses": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "email": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request schema for creating an invite code.

email
string | null
role
string
default:editor
max_uses
integer
default:1
expires_in_hours
integer | null

Response

Successful Response

Response schema for an invite code.

id
integer
required
code
string
required
created_by
string<uuid>
required
role
string
required
max_uses
integer
required
uses
integer
required
created_at
string<date-time>
required
email
string | null
expires_at
string<date-time> | null