Skip to content

Auth ​

Sign in, register, sign out and the current user. 4 endpoints

POST /auth/login​

/api/v1/auth/login · No sign-in needed

Request body

FieldTypeRequiredNotes
emailstringyeslength 0–254 · pattern ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ · email
passwordstringyeslength 1–200

Example

bash
curl -X POST 'https://api.lexcetha.com/api/v1/auth/login' \
  -H 'Content-Type: application/json' \
  -d '{"email":"demo@lex.local","password":"string"}'

POST /auth/register​

/api/v1/auth/register · No sign-in needed

Request body

FieldTypeRequiredNotes
emailstringyeslength 0–254 · pattern ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ · email
passwordstringyeslength 10–200
displayNamestringlength 0–80
workspaceNamestringlength 2–80

Example

bash
curl -X POST 'https://api.lexcetha.com/api/v1/auth/register' \
  -H 'Content-Type: application/json' \
  -d '{"email":"demo@lex.local","password":"string"}'

POST /auth/logout​

/api/v1/auth/logout · Needs a session

Example

bash
curl -X POST 'https://api.lexcetha.com/api/v1/auth/logout' \
  -H "Authorization: Bearer $LEX_TOKEN"

GET /me​

/api/v1/me · Needs a session

Example

bash
curl -X GET 'https://api.lexcetha.com/api/v1/me' \
  -H "Authorization: Bearer $LEX_TOKEN"

Lex by Gavalytics AI