Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

Accept an invitation by code

Joins the organisation an invitation is for, using the code from its link. The invitation must be for your account’s email address.

POST/_luna/auth/invites/accept
Authorization
AuthorizationBearer token · headerrequired

An account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.

Request body
requiredapplication/json
invitestringrequired

The code from the invitation link.

Responses
200

The account joined the organisation.

okbooleanrequired

Always true.

orgstring | null

The slug of the organisation the account joined.

default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'https://luna.example.com/_luna/auth/invites/accept' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "invite": "string"
}'
Response
{
  "ok": true,
  "org": "string"
}

Was this page helpful?