Authentication

Login

Authenticate with email and password and receive a JWT access token.

Copy as Markdown Open in ChatGPT Open in Claude

post/v1/login

Request body

emailstring email required
passwordstring password required

Example request

{
  "email": "user@example.com",
  "password": "password"
}

Response

Access token, user and accounts

statusinteger

HTTP status code, mirrored in the body.

messagestring

Human-readable message; empty on success.

Example response

{
  "status": 200,
  "data": {
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
    "user": {
      "id": "bgjazeo5r9v2lq7l36dx48np",
      "name": "John Smith",
      "email": "example@example.com",
      "telephone": "17989206641",
      "government_id": "15774136604",
      "has_accepted_terms": true,
      "created_at": "2023-03-03T11:51:34Z"
    },
    "accounts": [
      {
        "id": "6401df46d6a6b0c692d9ec49",
        "name": "JS",
        "roles": [
          "owner"
        ],
        "is_delete_allowed": true,
        "created_at": "2023-03-03T11:51:34Z"
      }
    ]
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.