Authentication

Login

Authenticate with email and password to obtain access and refresh tokens

post/nhsapi/v1/Auth

Request

  • Base URL: https://www.example.com
  • URL: https://www.example.com/nhsapi/v1/Auth
  • Auth: none declared

Request body

Example request

{
  "auth": {
    "email": "test@example.com",
    "password": "SecurePassword123!"
  }
}

Response

successful authentication

successboolean

Example response

{
  "success": true,
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "account": {
      "id": 1,
      "email": "test@example.com",
      "name": "Test API Account",
      "organisation_id": 1,
      "permissions": {
        "worker_basic_read": true,
        "shift_basic_read": true,
        "shift_advanced_read": true,
        "create_shifts": true
      }
    }
  }
}

Changes

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