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

Rename the current account

Changes the name of the account the credential belongs to. An API key cannot do this.

PATCH/_luna/auth/me
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
namestringrequired

The new name, at most 100 characters.

Responses
200

The account with its new name.

accountAccountBriefrequired

An account as its owner sees it.

Show properties
idstringrequired
emailstringrequired
namestringrequired
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 PATCH 'https://luna.example.com/_luna/auth/me' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string"
}'
Response
{
  "account": {
    "id": "string",
    "email": "string",
    "name": "string"
  }
}

Was this page helpful?