Accept an invitation
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
Joins the domain with the role the invitation carries.
The invitation binds to the address it was sent to, so accepting from a
different account fails with 403 and code: "invite_email_mismatch".
Accepting when you already have access is a no-op that returns
already_member: true.
Path parameters
- tokenstringrequiredpath
The invitation token from the accept link.
Responses
200Accepted, or you already had access.
Content type: application/json
- acceptedboolean
- already_memberboolean
Returned instead of
acceptedwhen you already had access. - domainstring
- rolestring
Your role on a domain.
owneris implicit for the domain's creator and for global admins; the other three are grantable via sharing.One of:"owner""admin""editor""viewer"
{
"accepted": true,
"already_member": true,
"domain": "string",
"role": "owner"
}401Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "invalid API key"
}403Read-only key, or the invitation was sent to a different email address.
Content type: application/json
- errorstring
- codestringOne of:
"invite_email_mismatch" - invited_emailstring
Masked address the invitation was actually sent to.
{
"error": "string",
"code": "invite_email_mismatch",
"invited_email": "string"
}404The invitation does not exist, has expired, was revoked, or is used up.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}429The key exceeded its request budget (300 requests per minute by default).
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "rate limit exceeded"
}Example request
curl -X POST "https://api.nsin.ir/invites/%7Btoken%7D/accept" \
-H "Authorization: Bearer $NSIN_API_KEY"