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

Invite a member

Invites an email address to an organisation. An address has one open invitation at a time, so a new one replaces the last. The invitation lasts seven days and its code is shown once. Only an owner can invite an owner.

POST/_luna/orgs/{org}/invites
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.

Scopes:members:write
Path parameters
orgstringrequired

The organisation, by its slug.

Request body
requiredapplication/json
emailstring | null

The address to invite. Leave it out for a link that anyone can use once.

default: null
rolestring | null

The role the new member gets. viewer when left out.

default: null
Responses
200

The new invitation.

idstringrequired
invitestringrequired

The invitation's code. Luna keeps only its hash.

pathstringrequired

The path of the page on this server where the invitation is taken up.

expiresMsinteger<int64>required
min 0
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
Parameters
Bodyapplication/json
Request
curl -X POST 'https://luna.example.com/_luna/orgs/string/invites' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": null,
  "role": null
}'
Response
{
  "id": "string",
  "invite": "string",
  "path": "string",
  "expiresMs": 0
}

Was this page helpful?