REST API endpoints for Organization Invitations
List pending invitations
Section titled “List pending invitations”/orgs/{orgId}/invitations List all pending invitations for an organization.
Authentication is required.
Requires MEMBER_CREATE permission in the organization.
orgIdstringRequiredThe slug or ID of the organization.
This API endpoint returns standard API response format. The following fields are fields of the data object. Learn more
The array of pending invitations.
idstringRequiredThe unique identifier of the user.
namestringRequiredThe display name of the user.
usernamestringRequiredThe username of the user.
member_rolestringRequiredThe role of the user in the organization.
permissionsarrayRequiredThe permissions that the user will have in the organization.
acceptedbooleanRequiredAlways false for invitations in this endpoint.
Create an invitation
Section titled “Create an invitation”/orgs/{orgId}/invitations Invite a user to join an organization.
Authentication is required.
Authenticated user must be the owner ora member with MEMBER_CREATE permission in the organization.
orgIdstringRequiredThe slug or ID of the organization.
inviteestringRequiredThe username or user ID of the user to invite.
rolestringThe role of the user in the organization. Defaults to empty string.
permissionsarrayThe permissions that the user will have in the organization. Defaults to empty array.
Accept an invitation
Section titled “Accept an invitation”/orgs/{orgId}/invitations/{userId} Accept a pending invitation. Only the invited user can accept their own invitation.
orgIdstringRequiredThe slug or ID of the organization.
userIdstringRequiredThe username or ID of the invited user. Must match the authenticated user.
Cancel or reject an invitation
Section titled “Cancel or reject an invitation”/orgs/{orgId}/invitations/{userId} Cancel a pending invitation (by authorized member) or reject an invitation (by invitee).
Authentication is required.
Must be the invited user or a member with MEMBER_CREATE permission.
orgIdstringRequiredThe slug or ID of the organization.
userIdstringRequiredThe username or ID of the invited user.