Accept an Invitation

POST /v1/user/invitations/{id}/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 id via GET /v1/user/invitations.

Path parameters

id int64 Req
ID of the invitation to accept, as returned by GET /v1/user/invitations.

Request body

None — pass {} or omit the body entirely.

Response (200 OK)

success bool
true when you've joined the account.
account_id int64
The account you just joined. Use it to switch into the account.

Errors

400 Bad Request
Invalid invitation id, or the invitation could not be applied.
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).
Request
curl -X POST "https://api.ngris.com/v1/user/invitations/42/accept" \ -H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") result = client.users.accept_invitation(42) print("joined account", result["account_id"])
Response — 200 OK
{ "success": true, "account_id": 18 }
On this page
Accept an Invitation
Iris