REST API endpoints for Organization Invitations
List pending invitations
Section titled “List pending invitations” GET
/orgs/{orgId}/invitations <p>List all pending invitations for an organization.</p>
Authentication is required.
Requires MEMBER_CREATE permission in the organization.
orgIdstringRequired<p>The slug or ID of the organization.</p>
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
arrayRequired
<p>The array of pending invitations.</p>
idstringRequired<p>The unique identifier of the user.</p>
namestringRequired<p>The display name of the user.</p>
usernamestringRequired<p>The username of the user.</p>
member_rolestringRequired<p>The role of the user in the organization.</p>
permissionsarrayRequired<p>The permissions that the user will have in the organization.</p>
acceptedbooleanRequired<p>Always false for invitations in this endpoint.</p>
Create an invitation
Section titled “Create an invitation” POST
/orgs/{orgId}/invitations <p>Invite a user to join an organization.</p>
Authentication is required.
Authenticated user must be the owner ora member with MEMBER_CREATE permission in the organization.
orgIdstringRequired<p>The slug or ID of the organization.</p>
Request Body Content-Type: application/json
inviteestringRequired<p>The username or user ID of the user to invite.</p>
rolestring<p>The role of the user in the organization. Defaults to empty string.</p>
permissionsarray<p>The permissions that the user will have in the organization. Defaults to empty array.</p>
Accept an invitation
Section titled “Accept an invitation” PATCH
/orgs/{orgId}/invitations/{userId} <p>Accept a pending invitation. Only the invited user can accept their own invitation.</p>
orgIdstringRequired<p>The slug or ID of the organization.</p>
userIdstringRequired<p>The username or ID of the invited user. Must match the authenticated user.</p>
Cancel or reject an invitation
Section titled “Cancel or reject an invitation” DELETE
/orgs/{orgId}/invitations/{userId} <p>Cancel a pending invitation (by authorized member) or reject an invitation (by invitee).</p>
Authentication is required.
Must be the invited user or a member with MEMBER_CREATE permission.
orgIdstringRequired<p>The slug or ID of the organization.</p>
userIdstringRequired<p>The username or ID of the invited user.</p>