Invitations
Organization and space invitation management (CRUD, accept, resend) 8 Endpunkte. Basis-URL: https://xapi.ambertech.cloud/api/v1
List organization invitations#
/invitationsTokenReturns a paginated list of all invitations for the current user's organization. Requires `can_invite_users` permission.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
page | Query | number | Page number (default: 1) |
limit | Query | number | Items per page (default: 50, max: 100) |
Antworten
- 200Paginated invitation list
curl -X GET "https://xapi.ambertech.cloud/api/v1/invitations" \
-H "Authorization: Bearer $XISUITE_TOKEN"Create organization invitation#
/invitationsTokenInvites a new user to the organization. Requires `can_invite_users` permission. Generates a secure token, creates the invitation record, and sends an email.
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
emailPflicht | string | Email address of the person to invite |
firstNamePflicht | string | First name of the invitee |
lastNamePflicht | string | Last name of the invitee |
role | string | Role to assign (defaults to member) Werte: |
Antworten
- 200Invitation created and email sent
- 400User already exists or invitation already pending
- 403Insufficient permissions
- 503Invitation email could not be sent (code: email_send_failed) — the invitation is kept; use resend once mail delivery is fixed
curl -X POST "https://xapi.ambertech.cloud/api/v1/invitations" \
-H "Authorization: Bearer $XISUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"email":"invitee@example.com","firstName":"John","lastName":"Doe"}'Delete an invitation#
/invitations/{id}TokenPermanently deletes a pending or expired invitation. Requires `can_invite_users` permission.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Invitation UUID |
Antworten
- 200Invitation deleted
- 403Wrong organization
- 404Invitation not found
curl -X DELETE "https://xapi.ambertech.cloud/api/v1/invitations/{id}" \
-H "Authorization: Bearer $XISUITE_TOKEN"Accept an invitation#
/invitations/{id}/acceptÖffentlichAccepts a pending invitation using the secure token. For space invitations, creates the space membership and applies custom permissions. Also syncs notification status. Rate-limited to 10 req/min.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Invitation UUID |
Request-Body
| Name | Typ | Beschreibung |
|---|---|---|
tokenPflicht | string | Secure invitation token received via email |
password | string | Password to set for first-time invited users |
Antworten
- 200Invitation accepted successfully
- 400Invitation expired or no longer pending
- 403Invalid invitation token
- 404Invitation not found
curl -X POST "https://xapi.ambertech.cloud/api/v1/invitations/{id}/accept" \
-H "Content-Type: application/json" \
-d '{"token":"a1b2c3d4e5f6..."}'Resend invitation email#
/invitations/{id}/resendTokenGenerates a new secure token, updates the expiry to 7 days, and resends the invitation email. Requires `can_invite_users` permission.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Invitation UUID |
Antworten
- 200Invitation resent successfully
- 400Invitation already accepted
- 403Wrong organization
- 404Invitation not found
- 503Invitation email could not be sent (code: email_send_failed) — retry resend once mail delivery is fixed
curl -X POST "https://xapi.ambertech.cloud/api/v1/invitations/{id}/resend" \
-H "Authorization: Bearer $XISUITE_TOKEN"Revoke an invitation#
/invitations/{id}/revokeTokenMarks a pending invitation as revoked. Requires `can_invite_users` permission.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
idPflicht | Pfad | string | Invitation UUID |
Antworten
- 200Invitation revoked
- 400Invitation already accepted
- 403Wrong organization
- 404Invitation not found
curl -X POST "https://xapi.ambertech.cloud/api/v1/invitations/{id}/revoke" \
-H "Authorization: Bearer $XISUITE_TOKEN"Look up invitation by token#
/invitations/by-tokenÖffentlichPublic endpoint to retrieve invitation details by the secure token. Used by the frontend accept-invitation page. Rate-limited to 10 req/min.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
tokenPflicht | Query | string | The secure invitation token from the email link |
Antworten
- 200Invitation details with organization and space names
- 404Invitation not found
curl -X GET "https://xapi.ambertech.cloud/api/v1/invitations/by-token"List pending org-level invitations for the current user#
/invitations/mineTokenReturns pending, non-expired, org-level invitations matching the authenticated user's email. Used by the onboarding empty-state. Does NOT return tokens (security).
Antworten
- 200Pending invitations array
curl -X GET "https://xapi.ambertech.cloud/api/v1/invitations/mine" \
-H "Authorization: Bearer $XISUITE_TOKEN"