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

Log in

Starts a session with an email address and a password. No credential is needed.

POST/_luna/auth/login
Request body
requiredapplication/json
emailstringrequired
passwordstringrequired
Responses
200

The account and its new session.

tokenstringrequired

The session token (ls_…). Send it as the bearer token.

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
Bodyapplication/json
Request
curl -X POST 'https://luna.example.com/_luna/auth/login' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "string",
  "password": "string"
}'
Response
{
  "token": "string",
  "account": {
    "id": "string",
    "email": "string",
    "name": "string"
  }
}

Was this page helpful?