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
400">curl -X 400">POST https:400">class="text-zinc-500">//api.lvng.ai/api/v2/workspaces/ws_abc123/invitations \
  -H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY" \
  -H 400">class="text-emerald-400">"Content-Type: application/json" \
  -d '{
    400">class="text-emerald-400">"email": 400">class="text-emerald-400">"colleague@company.com",
    400">class="text-emerald-400">"role": 400">class="text-emerald-400">"member",
    400">class="text-emerald-400">"expirationDays": 14
  }'

Response 201

{
  400">class="text-emerald-400">"success": true,
  400">class="text-emerald-400">"invitation": {
    400">class="text-emerald-400">"id": 400">class="text-emerald-400">"550e8400-e29b-41d4-a716-446655440000",
    400">class="text-emerald-400">"email": 400">class="text-emerald-400">"colleague@company.com",
    400">class="text-emerald-400">"role": 400">class="text-emerald-400">"member",
    400">class="text-emerald-400">"expires_at": 400">class="text-emerald-400">"2026-04-15T12:00:00.000Z",
    400">class="text-emerald-400">"created_at": 400">class="text-emerald-400">"2026-04-01T12:00:00.000Z",
    400">class="text-emerald-400">"invite_link": 400">class="text-emerald-400">"https:400">class="text-zinc-500">//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
400">curl -X 400">GET https:400">class="text-zinc-500">//api.lvng.ai/api/v2/workspaces/ws_abc123/invitations \
  -H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"

Response 200

{
  400">class="text-emerald-400">"success": true,
  400">class="text-emerald-400">"invitations": [
    {
      400">class="text-emerald-400">"id": 400">class="text-emerald-400">"550e8400-e29b-41d4-a716-446655440000",
      400">class="text-emerald-400">"email": 400">class="text-emerald-400">"colleague@company.com",
      400">class="text-emerald-400">"role": 400">class="text-emerald-400">"member",
      400">class="text-emerald-400">"expires_at": 400">class="text-emerald-400">"2026-04-15T12:00:00.000Z",
      400">class="text-emerald-400">"created_at": 400">class="text-emerald-400">"2026-04-01T12:00:00.000Z",
      400">class="text-emerald-400">"invited_by": 400">class="text-emerald-400">"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
      400">class="text-emerald-400">"invite_link": 400">class="text-emerald-400">"https:400">class="text-zinc-500">//app.lvng.ai/invite/a1b2c3d4e5f6...",
      400">class="text-emerald-400">"created_by_name": 400">class="text-emerald-400">"Matty S"
    }
  ],
  400">class="text-emerald-400">"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
400">curl -X 400">DELETE https:400">class="text-zinc-500">//api.lvng.ai/api/v2/workspaces/ws_abc123/invitations/550e8400-e29b-41d4-a716-446655440000 \
  -H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"

Response 200

{
  400">class="text-emerald-400">"success": true,
  400">class="text-emerald-400">"message": 400">class="text-emerald-400">"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
400">curl -X 400">GET https:400">class="text-zinc-500">//api.lvng.ai/api/v2/invitations/a1b2c3d4e5f6...

Response 200

{
  400">class="text-emerald-400">"success": true,
  400">class="text-emerald-400">"invitation": {
    400">class="text-emerald-400">"role": 400">class="text-emerald-400">"member",
    400">class="text-emerald-400">"email": 400">class="text-emerald-400">"colleague@company.com",
    400">class="text-emerald-400">"expires_at": 400">class="text-emerald-400">"2026-04-15T12:00:00.000Z",
    400">class="text-emerald-400">"workspace": {
      400">class="text-emerald-400">"name": 400">class="text-emerald-400">"Acme Corp",
      400">class="text-emerald-400">"slug": 400">class="text-emerald-400">"acme-corp"
    },
    400">class="text-emerald-400">"invited_by": 400">class="text-emerald-400">"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
400">curl -X 400">POST https:400">class="text-zinc-500">//api.lvng.ai/api/v2/invitations/a1b2c3d4e5f6.../accept \
  -H 400">class="text-emerald-400">"Authorization: Bearer YOUR_API_KEY"

Response 200

{
  400">class="text-emerald-400">"success": true,
  400">class="text-emerald-400">"message": 400">class="text-emerald-400">"Successfully joined the workspace",
  400">class="text-emerald-400">"workspace": {
    400">class="text-emerald-400">"id": 400">class="text-emerald-400">"ws_abc123",
    400">class="text-emerald-400">"name": 400">class="text-emerald-400">"Acme Corp",
    400">class="text-emerald-400">"slug": 400">class="text-emerald-400">"acme-corp"
  },
  400">class="text-emerald-400">"role": 400">class="text-emerald-400">"member"
}