Accept an Invitation

POST /v1/user/invitations/{uuid}/accept

Accept an invitation addressed to you and join the inviting account. On success you become a member of that account with the role the inviter assigned, and you can switch into it from your account list.

The invitation must be addressed to your email, still pending, and not expired. Your email must also be verified — acceptance is blocked from an unverified account so nobody can claim a membership meant for someone else. Find the invitation uuid via GET /v1/user/invitations.

Path parameters

uuid string (uuid) Req
The uuid of the invitation to accept, as returned by GET /v1/user/invitations.

Deprecated: the legacy integer id is still accepted in the path until the sunset, answered with Deprecation and Sunset headers. Use the uuid.

Request body

None — pass {} or omit the body entirely.

Response (200 OK)

success bool
true when you've joined the account.
account_uuid string (uuid)
The uuid of the account you just joined. Pass it as account_uuid to /user/switch-account.

Deprecated: until the sunset this response also carries the legacy integer account_id. Don't use it; read account_uuid.

Errors

400 Bad Request
The invitation could not be applied (for example, you are already a member), or an integer id after the sunset (integer_id_unsupported).
401 Unauthorized
Missing or invalid auth.
403 Forbidden
Your email address is not verified. Verify it, then retry.
404 Not Found
No such invitation, or it isn't addressed to your email.
409 Conflict
The invitation is no longer pending (already accepted, declined, revoked, or expired), or your own account’s setup isn’t finished yet: code account_setup_unfinished (“Finish setting up your account first, then you can join other accounts”). The invitation stays pending; finish the setup wizard and accept again.
Request
curl -X POST "https://api.ngris.com/v1/user/invitations/019a89b0-bb2b-76eb-8f22-cf9745345430/accept" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json"
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") result = client._post_raw("/user/invitations/019a89b0-bb2b-76eb-8f22-cf9745345430/accept", {}) print("joined account", result["account_uuid"])
Response — 200 OK
{ "success": true, "account_uuid": "019a6e8e-a31d-751c-96b0-440186b7f3a8" }
Was this helpful?
On this page
Accept an Invitation
Was this helpful?