Accept an invitation
const url = 'https://api.nsin.ir/invites/example/accept';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The invitation token from the accept link.
Responses
Section titled “ Responses ”Accepted, or you already had access.
object
Returned instead of accepted when you already had access.
Your role on a domain. owner is implicit for the domain’s creator and
for global admins; the other three are grantable via sharing.
Example
{ "role": "owner"}Missing, malformed, revoked or expired API key — or the owning account is inactive.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}Read-only key, or the invitation was sent to a different email address.
object
Masked address the invitation was actually sent to.
Example
{ "code": "invite_email_mismatch"}The invitation does not exist, has expired, was revoked, or is used up.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}