Cortex Docs
API ReferenceUser Endpoints

User/ Auth

User auth, refresh, and logout endpoints.

POST
/api/user/auth/v1/social_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/user/auth/v1/social_login" \  -H "env: test" \  -H "timezone: UTC" \  -H "device: ios" \  -H "Accept-Language: en" \  -H "Content-Type: application/json" \  -d '{    "provider": "google",    "code": "string"  }'
{  "code": "string",  "response": {    "accessToken": "string",    "refreshToken": "string",    "sessionId": "string",    "user": {      "_id": "string",      "loginType": "email",      "email": "string",      "profile": {        "name": "string",        "locale": "en",        "timezone": "utc",        "currency": "usd"      },      "twoFactor": {},      "onboardingCompleted": true    }  }}
POST
/api/user/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/user/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",    "user": {      "_id": "string",      "loginType": "email",      "email": "string",      "profile": {        "name": "string",        "locale": "en",        "timezone": "utc",        "currency": "usd"      },      "twoFactor": {},      "onboardingCompleted": true    }  }}
POST
/api/user/auth/v1/change_password

Authorization

user-access-token
AuthorizationBearer <token>

User access token. In Apidog use token value {{user_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 user access token generated by the login or refresh endpoint. Apidog value: Bearer {{user_access_token}}.

Default"Bearer {{user_access_token}}"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/user/auth/v1/change_password" \  -H "env: test" \  -H "timezone: UTC" \  -H "device: ios" \  -H "Accept-Language: en" \  -H "Authorization: Bearer {{user_access_token}}" \  -H "Content-Type: application/json" \  -d '{    "currentPassword": "stringst",    "newPassword": "stringst",    "confirmPassword": "stringst"  }'
{  "code": "string",  "response": {    "accessToken": "string",    "refreshToken": "string",    "sessionId": "string",    "user": {      "_id": "string",      "loginType": "email",      "email": "string",      "profile": {        "name": "string",        "locale": "en",        "timezone": "utc",        "currency": "usd"      },      "twoFactor": {},      "onboardingCompleted": true    }  }}
POST
/api/user/auth/v1/register

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/user/auth/v1/register" \  -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": {}}
POST
/api/user/auth/v1/forgot_password

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/user/auth/v1/forgot_password" \  -H "env: test" \  -H "timezone: UTC" \  -H "device: ios" \  -H "Accept-Language: en" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com"  }'
{  "code": "string",  "response": {}}
POST
/api/user/auth/v1/forgot_password/reset

Authorization

user-forgot-password-token
AuthorizationBearer <token>

Forgot-password token. In Apidog use token value {{user_forgot_password_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 forgot-password token returned by forgot_password before OTP verification or password reset. Apidog value: Bearer {{user_forgot_password_token}}.

Default"Bearer {{user_forgot_password_token}}"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/user/auth/v1/forgot_password/reset" \  -H "env: test" \  -H "timezone: UTC" \  -H "device: ios" \  -H "Accept-Language: en" \  -H "Authorization: Bearer {{user_forgot_password_token}}" \  -H "Content-Type: application/json" \  -d '{    "password": "stringst",    "confirmPassword": "stringst"  }'
{  "code": "string",  "message": "string"}
POST
/api/user/auth/v1/register/verify_otp

Authorization

user-register-token
AuthorizationBearer <token>

Registration token. In Apidog use token value {{user_register_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 registration token returned by register before email OTP verification. Apidog value: Bearer {{user_register_token}}.

Default"Bearer {{user_register_token}}"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/user/auth/v1/register/verify_otp" \  -H "env: test" \  -H "timezone: UTC" \  -H "device: ios" \  -H "Accept-Language: en" \  -H "Authorization: Bearer {{user_register_token}}" \  -H "Content-Type: application/json" \  -d '{    "otp": "string"  }'
{  "code": "string",  "response": {    "accessToken": "string",    "refreshToken": "string",    "sessionId": "string",    "user": {      "_id": "string",      "loginType": "email",      "email": "string",      "profile": {        "name": "string",        "locale": "en",        "timezone": "utc",        "currency": "usd"      },      "twoFactor": {},      "onboardingCompleted": true    }  }}
POST
/api/user/auth/v1/forgot_password/verify_otp

Authorization

user-forgot-password-token
AuthorizationBearer <token>

Forgot-password token. In Apidog use token value {{user_forgot_password_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 forgot-password token returned by forgot_password before OTP verification or password reset. Apidog value: Bearer {{user_forgot_password_token}}.

Default"Bearer {{user_forgot_password_token}}"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/user/auth/v1/forgot_password/verify_otp" \  -H "env: test" \  -H "timezone: UTC" \  -H "device: ios" \  -H "Accept-Language: en" \  -H "Authorization: Bearer {{user_forgot_password_token}}" \  -H "Content-Type: application/json" \  -d '{    "otp": "string"  }'
{  "code": "string",  "response": {}}
POST
/api/user/auth/v1/resend_otp

Authorization

user-register-token
AuthorizationBearer <token>

Registration token. In Apidog use token value {{user_register_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 registration token returned by register before email OTP verification. Apidog value: Bearer {{user_register_token}}.

Default"Bearer {{user_register_token}}"

Response Body

application/json

curl -X POST "https://example.com/api/user/auth/v1/resend_otp" \  -H "env: test" \  -H "timezone: UTC" \  -H "device: ios" \  -H "Accept-Language: en" \  -H "Authorization: Bearer {{user_register_token}}"
{  "code": "string",  "response": {}}
POST
/api/user/auth/v1/refresh_token

Authorization

user-refresh-token
AuthorizationBearer <token>

User refresh token. In Apidog use token value {{user_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 user refresh token generated by the login or refresh endpoint. Apidog value: Bearer {{user_refresh_token}}.

Default"Bearer {{user_refresh_token}}"

Response Body

application/json

application/json

curl -X POST "https://example.com/api/user/auth/v1/refresh_token" \  -H "env: test" \  -H "timezone: UTC" \  -H "device: ios" \  -H "Accept-Language: en" \  -H "Authorization: Bearer {{user_refresh_token}}"
{  "code": "string",  "response": {    "accessToken": "string",    "refreshToken": "string",    "sessionId": "string",    "user": {      "_id": "string",      "loginType": "email",      "email": "string",      "profile": {        "name": "string",        "locale": "en",        "timezone": "utc",        "currency": "usd"      },      "twoFactor": {},      "onboardingCompleted": true    }  }}
POST
/api/user/auth/v1/logout

Authorization

user-access-token
AuthorizationBearer <token>

User access token. In Apidog use token value {{user_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 user access token generated by the login or refresh endpoint. Apidog value: Bearer {{user_access_token}}.

Default"Bearer {{user_access_token}}"

Response Body

application/json

application/json

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