HydraCore
API by router

Customer auth

Customer Login

POST
/v1/customer-auth/login

Request Body

application/json
  1. body
email*Email
Formatemail
tenant_slug*Tenant Slug
Length1 <= length <= 100

Response Body

Successful Response

application/json
  1. response
Example Request
curl -X POST 'https://example.com/v1/customer-auth/login' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com",  "tenant_slug": "string"}'
Example Response
{}

Customer Logout

POST
/v1/customer-auth/logout

Request Body

application/json
  1. body
refresh_token?Refresh Token
Default""

Response Body

Successful Response

Example Request
curl -X POST 'https://example.com/v1/customer-auth/logout' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
Empty

Customer Refresh

POST
/v1/customer-auth/refresh

Request Body

application/json
  1. body
refresh_token?Refresh Token
Default""

Response Body

Successful Response

application/json
  1. response
access_token*Access Token
customer_id*Customer Id
Formatuuid
expires_in?Expires In
Default3600
refresh_token*Refresh Token
tenant_id*Tenant Id
Formatuuid
token_type?Token Type
Default"bearer"
Example Request
curl -X POST 'https://example.com/v1/customer-auth/refresh' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "access_token": "string",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "expires_in": 3600,  "refresh_token": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "token_type": "bearer"}
POST
/v1/customer-auth/token

Request Body

application/json
  1. body

Body for /v1/customer-auth/token — exchange magic-link code for tokens, no cookies.

code*Code
Length6 <= length <= 6
email*Email
Formatemail
tenant_slug*Tenant Slug
Length1 <= length <= 100

Response Body

Successful Response

application/json
  1. response
access_token*Access Token
customer_id*Customer Id
Formatuuid
expires_in?Expires In
Default3600
refresh_token*Refresh Token
tenant_id*Tenant Id
Formatuuid
token_type?Token Type
Default"bearer"
Example Request
curl -X POST 'https://example.com/v1/customer-auth/token' \  -H 'Content-Type: application/json' \  -d '{  "code": "string",  "email": "user@example.com",  "tenant_slug": "string"}'
Example Response
{  "access_token": "string",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "expires_in": 3600,  "refresh_token": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "token_type": "bearer"}

Customer Verify

POST
/v1/customer-auth/verify

Request Body

application/json
  1. body
code*Code
Length6 <= length <= 6
email*Email
Formatemail
tenant_slug*Tenant Slug
Length1 <= length <= 100

Response Body

Successful Response

application/json
  1. response
access_token*Access Token
customer_id*Customer Id
Formatuuid
expires_in?Expires In
Default3600
refresh_token*Refresh Token
tenant_id*Tenant Id
Formatuuid
token_type?Token Type
Default"bearer"
Example Request
curl -X POST 'https://example.com/v1/customer-auth/verify' \  -H 'Content-Type: application/json' \  -d '{  "code": "string",  "email": "user@example.com",  "tenant_slug": "string"}'
Example Response
{  "access_token": "string",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "expires_in": 3600,  "refresh_token": "string",  "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0",  "token_type": "bearer"}