Skip to content

Accept an invitation

POST
/invites/{token}/accept
curl --request POST \
--url https://api.nsin.ir/invites/example/accept \
--header 'Authorization: Bearer <token>'

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.

token
required
string

The invitation token from the accept link.

Accepted, or you already had access.

Media type application/json
object
accepted
boolean
already_member

Returned instead of accepted when you already had access.

boolean
domain
string
role

Your role on a domain. owner is implicit for the domain’s creator and for global admins; the other three are grantable via sharing.

string
Allowed values: owner admin editor viewer
Example
{
"role": "owner"
}

Missing, malformed, revoked or expired API key — or the owning account is inactive.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

Read-only key, or the invitation was sent to a different email address.

Media type application/json
object
error
string
code
string
Allowed value: invite_email_mismatch
invited_email

Masked address the invitation was actually sent to.

string
Example
{
"code": "invite_email_mismatch"
}

The invitation does not exist, has expired, was revoked, or is used up.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}