Auth
Sign in, register, sign out and the current user. 4 endpoints
POST /auth/login
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
email | string | yes | length 0–254 · pattern ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ · email |
password | string | yes | length 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
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
email | string | yes | length 0–254 · pattern ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ · email |
password | string | yes | length 10–200 |
displayName | string | length 0–80 | |
workspaceName | string | length 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
Example
bash
curl -X POST 'https://api.lexcetha.com/api/v1/auth/logout' \
-H "Authorization: Bearer $LEX_TOKEN"GET /me
Example
bash
curl -X GET 'https://api.lexcetha.com/api/v1/me' \
-H "Authorization: Bearer $LEX_TOKEN"