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.
/api/v2/workspaces/:workspaceId/invitationsAuthenticatedCreate a new workspace invitation. Optionally sends an email to the invitee. If no email is provided, a shareable link invitation is created.
Path Parameters
workspaceIdstringrequiredUUID of the workspace.
Body Parameters
emailstringEmail address to invite. If omitted, creates a shareable link invitation.
rolestringRole for the invitee: "admin" or "member". Defaults to "member".
expirationDaysnumberNumber of days before the invitation expires. Defaults to 7.
Request
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..."
}
}/api/v2/workspaces/:workspaceId/invitationsAuthenticatedList all pending (non-expired, non-accepted) invitations for a workspace. Includes inviter names and shareable links.
Path Parameters
workspaceIdstringrequiredUUID of the workspace.
Request
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
}/api/v2/workspaces/:workspaceId/invitations/:idAuthenticatedRevoke a pending invitation. The invitation link will no longer be valid.
Path Parameters
workspaceIdstringrequiredUUID of the workspace.
idstringrequiredUUID of the invitation to revoke.
Request
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.
/api/v2/invitations/:tokenAuthenticatedGet invitation details by token. Public endpoint -- no authentication required. Returns workspace name, inviter, and role.
Path Parameters
tokenstringrequiredThe secure invitation token from the invite link.
Request
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"
}
}/api/v2/invitations/:token/acceptAuthenticatedAccept an invitation and join the workspace. Requires authentication. The authenticated user is added as a workspace member with the invited role.
Path Parameters
tokenstringrequiredThe secure invitation token from the invite link.
Request
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"
}