Create token | Genlogs API Docs

Create Access Token

The "Create Access Token" endpoint allows a user to generate new access and refresh tokens by providing their email and password. These tokens are essential for authenticating and authorizing API requests.

Authentication

Endpoint

Request Parameters

Credentials must be provided in the JSON request body.

Recommended: JSON request body

Send email and password in a JSON body with the Content-Type: application/json header. No URL-encoding of special characters is needed (e.g. 1234+ can be sent as-is).

curl -X POST 'https://api.genlogs.io/auth/token/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: {your_api_key}' \
-d '{"email": "{email}", "password": "{password}"}'

Body schema:

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

Parameters

Response

Response Body

Note: The refresh token is not usable at this time. Please create a new token after your original access token has expired.

Request Example:

curl -X POST 'https://api.genlogs.io/auth/token/?email={email}&password={password}' \
-H 'accept: application/json' \
-H 'x-api-key: {your_api_key}'

Create access and refresh tokens

Create and return new access and refresh tokens for a user based on their email and password.

Query parameters

Responses

Sample Response:

{
  "access_token_data": {
    "token": "text",
    "expires": "2026-07-17T13:11:30.519Z"
  },
  "refresh_token_data": {
    "token": "text",
    "expires": "2026-07-17T13:11:30.519Z"
  },
  "user_id": 1,
  "company_id": 1,
  "customer_name": "text"
}