Skip to main content
POST /api/v1/invitations Requires members.invite permission and an available seat under the current billing plan. The accept_token in the response is returned only once — store it or deliver it to the recipient immediately.

Request body

email
string
required
Email address of the person to invite.
role_id
string
required
UUID of the role to assign when the invitation is accepted.
expires_in_hours
integer
Number of hours until the invitation expires. Must be at least 1. Defaults to the platform default if omitted.

Response

invitation
object
required
The created invitation.
accept_token
string
required
One-time acceptance token. Returned only at creation time — it is not stored and cannot be retrieved again. Pass this to the recipient so they can call accept invitation.

Errors

StatusWhen
400Request body is invalid or missing required fields
401Missing or invalid Bearer token
403Caller lacks members.invite permission or no seats are available
409An active invitation for this email already exists

Example

curl -X POST http://localhost:8080/api/v1/invitations \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "role_id": "r1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "expires_in_hours": 72
  }'
{
  "invitation": {
    "id": "i1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "email": "[email protected]",
    "role": {
      "id": "r1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "key": "developer",
      "name": "Developer",
      "is_system": true,
      "permissions": ["flags.read", "flags.write"]
    },
    "invited_by": "u1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "expires_at": "2026-03-24T10:00:00Z",
    "accepted_at": null,
    "created_at": "2026-03-21T10:00:00Z"
  },
  "accept_token": "inv_tok_a1b2c3d4e5f67890abcdef1234567890"
}

Build docs developers (and LLMs) love