Invitations API

Manage workspace invitations with secure, token-based invitation links. Admins and owners can create and revoke invitations. Invitation links can be shared publicly or sent directly via email. Invitations expire after a configurable number of days (default 7). Rate-limited to 50 requests per minute.

Base paths: /api/v2/workspaces/:workspaceId/invitations and /api/v2/invitations

Invitation Management

Create, list, and revoke invitations for a workspace. These endpoints require admin or owner role in the target workspace.

POST/api/v2/workspaces/:workspaceId/invitationsAuthenticated

Create a new workspace invitation. Optionally sends an email to the invitee. If no email is provided, a shareable link invitation is created.

Path Parameters

workspaceIdstringrequired

UUID of the workspace.

Body Parameters

emailstring

Email address to invite. If omitted, creates a shareable link invitation.

rolestring

Role for the invitee: "admin" or "member". Defaults to "member".

expirationDaysnumber

Number of days before the invitation expires. Defaults to 7.

Request

cURL
curl -X POST "https://api.lvng.ai/api/v2/workspaces/{workspaceId}/invitations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Response 201

{
  "success": true,
  "invitation": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "colleague@company.com",
    "role": "member",
    "expires_at": "2026-04-15T12:00:00.000Z",
    "created_at": "2026-04-01T12:00:00.000Z",
    "invite_link": "https://app.lvng.ai/invite/a1b2c3d4e5f6..."
  }
}
GET/api/v2/workspaces/:workspaceId/invitationsAuthenticated

List all pending (non-expired, non-accepted) invitations for a workspace. Includes inviter names and shareable links.

Path Parameters

workspaceIdstringrequired

UUID of the workspace.

Request

cURL
curl -X GET "https://api.lvng.ai/api/v2/workspaces/{workspaceId}/invitations" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "invitations": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "email": "colleague@company.com",
      "role": "member",
      "expires_at": "2026-04-15T12:00:00.000Z",
      "created_at": "2026-04-01T12:00:00.000Z",
      "invited_by": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
      "invite_link": "https://app.lvng.ai/invite/a1b2c3d4e5f6...",
      "created_by_name": "Matty S"
    }
  ],
  "count": 1
}
DELETE/api/v2/workspaces/:workspaceId/invitations/:idAuthenticated

Revoke a pending invitation. The invitation link will no longer be valid.

Path Parameters

workspaceIdstringrequired

UUID of the workspace.

idstringrequired

UUID of the invitation to revoke.

Request

cURL
curl -X DELETE "https://api.lvng.ai/api/v2/workspaces/{workspaceId}/invitations/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "message": "Invitation revoked successfully"
}

Token-Based Access

Look up and accept invitations using the secure token from the invitation link. The GET endpoint is public (no auth required). The accept endpoint requires authentication.

GET/api/v2/invitations/:tokenAuthenticated

Get invitation details by token. Public endpoint -- no authentication required. Returns workspace name, inviter, and role.

Path Parameters

tokenstringrequired

The secure invitation token from the invite link.

Request

cURL
curl -X GET https://api.lvng.ai/api/v2/invitations/a1b2c3d4e5f6...

Response 200

{
  "success": true,
  "invitation": {
    "role": "member",
    "email": "colleague@company.com",
    "expires_at": "2026-04-15T12:00:00.000Z",
    "workspace": {
      "name": "Acme Corp",
      "slug": "acme-corp"
    },
    "invited_by": "Matty S"
  }
}
POST/api/v2/invitations/:token/acceptAuthenticated

Accept an invitation and join the workspace. Requires authentication. The authenticated user is added as a workspace member with the invited role.

Path Parameters

tokenstringrequired

The secure invitation token from the invite link.

Request

cURL
curl -X POST https://api.lvng.ai/api/v2/invitations/a1b2c3d4e5f6.../accept \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

{
  "success": true,
  "message": "Successfully joined the workspace",
  "workspace": {
    "id": "ws_abc123",
    "name": "Acme Corp",
    "slug": "acme-corp"
  },
  "role": "member"
}