Cortex Docs
API ReferenceAdmin Endpoints

Admin/ Auth

Admin login, refresh, and logout endpoints.

POST
/api/admin/auth/v1/login

Header Parameters

env?string

Environment override (use "test" to bypass payload encryption)

Default"test"
timezone?string

Client timezone

Default"UTC"
device?string

Client device type/details

Default"ios"
Accept-Language?string

Client language/locale preference

Default"en"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/admin/auth/v1/login" \  -H "env: test" \  -H "timezone: UTC" \  -H "device: ios" \  -H "Accept-Language: en" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com",    "password": "stringst"  }'
{  "code": "string",  "response": {    "accessToken": "string",    "refreshToken": "string",    "sessionId": "string",    "admin": {      "_id": "string",      "email": "string",      "name": "string"    }  }}
POST
/api/admin/auth/v1/refresh_token

Authorization

admin-refresh-token
AuthorizationBearer <token>

Admin refresh token. In Apidog use token value {{admin_refresh_token}}.

In: header

Header Parameters

env?string

Environment override (use "test" to bypass payload encryption)

Default"test"
timezone?string

Client timezone

Default"UTC"
device?string

Client device type/details

Default"ios"
Accept-Language?string

Client language/locale preference

Default"en"
Authorization*string

Requires the admin refresh token generated by the admin login or refresh endpoint. Apidog value: Bearer {{admin_refresh_token}}.

Default"Bearer {{admin_refresh_token}}"

Response Body

application/json

application/json

curl -X POST "https://example.com/api/admin/auth/v1/refresh_token" \  -H "env: test" \  -H "timezone: UTC" \  -H "device: ios" \  -H "Accept-Language: en" \  -H "Authorization: Bearer {{admin_refresh_token}}"
{  "code": "string",  "response": {    "accessToken": "string",    "refreshToken": "string",    "sessionId": "string",    "admin": {      "_id": "string",      "email": "string",      "name": "string"    }  }}
POST
/api/admin/auth/v1/logout

Authorization

admin-access-token
AuthorizationBearer <token>

Admin access token. In Apidog use token value {{admin_access_token}}.

In: header

Header Parameters

env?string

Environment override (use "test" to bypass payload encryption)

Default"test"
timezone?string

Client timezone

Default"UTC"
device?string

Client device type/details

Default"ios"
Accept-Language?string

Client language/locale preference

Default"en"
Authorization*string

Requires the admin access token generated by the admin login or refresh endpoint. Apidog value: Bearer {{admin_access_token}}.

Default"Bearer {{admin_access_token}}"

Response Body

application/json

application/json

curl -X POST "https://example.com/api/admin/auth/v1/logout" \  -H "env: test" \  -H "timezone: UTC" \  -H "device: ios" \  -H "Accept-Language: en" \  -H "Authorization: Bearer {{admin_access_token}}"
{  "code": "string",  "message": "string"}