Skip to main content
The Invitations Service provides endpoints for creating, managing, and responding to organization invitations. It enables organization administrators to invite users to join their organization with specific roles.

Authentication

All endpoints require a valid Bearer token in the Authorization header.

Base URL

Endpoints

Create Invitation

Create a new invitation to join an organization.
Endpoint: POST /api/invitations/create Query Parameters: Request Body: Response:

List Invitations

Retrieve all invitations for an organization.
Endpoint: GET /api/invitations/list Query Parameters:

Get Invitation

Get details about a specific invitation.
Endpoint: GET /api/invitations/get Query Parameters:

Validate Invitation

Validate an invitation token (used before accepting an invitation).
Endpoint: GET /api/invitations/validate Query Parameters:

Resend Invitation

Resend an invitation email.
Endpoint: POST /api/invitations/resend Query Parameters:

Revoke Invitation

Revoke a pending invitation.
Endpoint: DELETE /api/invitations/revoke Query Parameters:

Bulk Create Invitations

Create multiple invitations at once.
Endpoint: POST /api/invitations/bulk_create Query Parameters: Request Body:

Accept Invitation (Backend Process)

Note: This endpoint is not directly exposed, as invitation acceptance is handled through the authentication service using a token. The flow for accepting an invitation is:
  1. User receives an invitation email with a link containing the invitation token
  2. User clicks the link, which takes them to a signup page
  3. User completes the signup form and submits it to the /api/auth/signup_invite endpoint
  4. Upon successful account creation, the user is automatically added to the organization with the designated role

Error Responses

Implementation Notes

  • Invitations expire after 7 days by default
  • When an invitation is resent, its expiration date is extended
  • Users can only be invited to join an organization if they don’t already have an account or are not already members
  • Only users with appropriate permissions (Admins and Owners) can create and manage invitations
  • Invitation tokens are secure, one-time-use tokens that become invalid after acceptance
  • Email notifications are sent automatically when invitations are created or resent