Skip to main content
Invite new users to join your organization. Admins and owners can send invitations, and recipients can accept or decline via a unique token link.

Endpoints

MethodEndpointDescription
GET/v1/orgs/:org_id/invitesList pending invites (admin+)
POST/v1/orgs/:org_id/invitesSend invite (admin+)
DELETE/v1/orgs/:org_id/invites/:invite_idRevoke invite (admin+)
GET/v1/invites/:tokenGet invite details (no auth required)
POST/v1/invites/:token/acceptAccept invite
POST/v1/invites/:token/declineDecline invite

Invite Object

{
  "id": 42,
  "email": "newuser@example.com",
  "role": "member",
  "status": "pending",
  "invited_by_email": "admin@example.com",
  "created_at": "2025-01-01T00:00:00Z",
  "expires_at": "2025-01-08T00:00:00Z"
}
FieldTypeDescription
idintegerUnique identifier
emailstringInvitee’s email address
rolestringAssigned role: admin or member
statusstringpending, accepted, or declined
invited_by_emailstringEmail of the user who sent the invite
created_atstringISO 8601 timestamp
expires_atstringISO 8601 expiration timestamp (7 days from creation)
When retrieving an invite by token (the public endpoint), the response also includes an org_name field with the organization’s display name.

List Pending Invites

Retrieve all pending invites for your organization. Requires admin or owner role.
curl https://api.thunderphone.com/v1/orgs/{org_id}/invites \
  -H "Authorization: Token YOUR_API_TOKEN"

Send an Invite

Invite a user to join your organization by email. Requires admin or owner role.
curl -X POST https://api.thunderphone.com/v1/orgs/{org_id}/invites \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "newuser@example.com",
    "role": "member"
  }'
FieldTypeRequiredDescription
emailstringYesEmail address to invite
rolestringNoRole to assign: admin or member (default: member)

Revoke an Invite

Cancel a pending invite. Requires admin or owner role.
curl -X DELETE https://api.thunderphone.com/v1/orgs/{org_id}/invites/42 \
  -H "Authorization: Token YOUR_API_TOKEN"
Response: 204 No Content

Get Invite Details

Retrieve details about an invite using its token. This endpoint does not require authentication and is used to display invite information before the recipient accepts or declines.
curl https://api.thunderphone.com/v1/invites/abc123def456

Response

{
  "id": 42,
  "email": "newuser@example.com",
  "role": "member",
  "status": "pending",
  "invited_by_email": "admin@example.com",
  "org_name": "Acme Corp",
  "created_at": "2025-01-01T00:00:00Z",
  "expires_at": "2025-01-08T00:00:00Z"
}
Expired or already-used invites return 410 Gone.

Accept an Invite

Accept an invite using its token. The authenticated user will be added to the organization with the assigned role.
curl -X POST https://api.thunderphone.com/v1/invites/abc123def456/accept \
  -H "Authorization: Token YOUR_API_TOKEN"

Response

{
  "detail": "Invite accepted.",
  "org_id": 1
}

Decline an Invite

Decline an invite using its token.
curl -X POST https://api.thunderphone.com/v1/invites/abc123def456/decline \
  -H "Authorization: Token YOUR_API_TOKEN"

Response

{
  "detail": "Invite declined."
}