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

Change a member's role

Gives a member a new role. Only an owner can make or change an owner, and an organisation always keeps one owner.

PUT/_luna/orgs/{org}/members/{account}
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.

accountstringrequired

The member's account id.

Request body
requiredapplication/json
rolestringrequired

owner, admin, developer, viewer or billing.

Responses
200

The member has the new role.

okbooleanrequired

Always true.

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 PUT 'https://luna.example.com/_luna/orgs/string/members/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "role": "string"
}'
Response
{
  "ok": true
}

Was this page helpful?