Skip to content

REST API endpoints for Organization Invitations

GET /orgs/{orgId}/invitations

List all pending invitations for an organization.

Authentication

Authentication is required.

Requires MEMBER_CREATE permission in the organization.

Learn more about authentication

Path Parameters
orgId string Required

The slug or ID of the organization.

Response Body Content-Type: application/json

This API endpoint returns standard API response format. The following fields are fields of the data object. Learn more

array Required

The array of pending invitations.

id string Required

The unique identifier of the user.

name string Required

The display name of the user.

username string Required

The username of the user.

member_role string Required

The role of the user in the organization.

permissions array Required

The permissions that the user will have in the organization.

accepted boolean Required

Always false for invitations in this endpoint.

POST /orgs/{orgId}/invitations

Invite a user to join an organization.

Authentication

Authentication is required.

Authenticated user must be the owner ora member with MEMBER_CREATE permission in the organization.

Learn more about authentication

Path Parameters
orgId string Required

The slug or ID of the organization.

Request Body Content-Type: application/json
invitee string Required

The username or user ID of the user to invite.

role string

The role of the user in the organization. Defaults to empty string.

permissions array

The permissions that the user will have in the organization. Defaults to empty array.

PATCH /orgs/{orgId}/invitations/{userId}

Accept a pending invitation. Only the invited user can accept their own invitation.

Authentication

Authentication is required.

Must be the invited user.

Learn more about authentication

Path Parameters
orgId string Required

The slug or ID of the organization.

userId string Required

The username or ID of the invited user. Must match the authenticated user.

DELETE /orgs/{orgId}/invitations/{userId}

Cancel a pending invitation (by authorized member) or reject an invitation (by invitee).

Authentication

Authentication is required.

Must be the invited user or a member with MEMBER_CREATE permission.

Learn more about authentication

Path Parameters
orgId string Required

The slug or ID of the organization.

userId string Required

The username or ID of the invited user.