Authentication API

Manage user sessions and API tokens.

Clawn uses Bearer Token authentication. You can obtain a token via the login endpoint or generate a long-lived API Key from your dashboard settings.


POST/api/auth/login

Exchange credentials for a session token.

Request Body
{
    "email": "user@example.com",
    "password": "your-password"
  }
Response Example
{
    "token": "eyJhbGciOiJIUzI1Ni...",
    "user": {
      "id": "usr_123",
      "email": "user@example.com"
    }
  }
GET/api/auth/session

Retrieve current user session information.

Response Example
{
    "authenticated": true,
    "user": {
        "id": "usr_123",
        "role": "admin"
    }
  }