HydraCore
API by router

Auth

Forgot Password

POST
/auth/forgot-password

Request Body

application/json
  1. body
email*Email
Formatemail

Response Body

Successful Response

application/json
  1. response
Example Request
curl -X POST 'https://example.com/auth/forgot-password' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com"}'
Example Response
{}

Login

POST
/auth/login

Request Body

application/json
  1. body
email*Email
Formatemail
password*Password
Length1 <= length <= 128

Response Body

Successful Response

application/json
  1. response
access_token*Access Token
email_verified?Email Verified
Defaulttrue
expires_in?Expires In
Default1800
refresh_token*Refresh Token
token_type?Token Type
Default"bearer"
Example Request
curl -X POST 'https://example.com/auth/login' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com",  "password": "string"}'
Example Response
{  "access_token": "string",  "email_verified": true,  "expires_in": 1800,  "refresh_token": "string",  "token_type": "bearer"}

Logout

POST
/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/auth/logout' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
Empty

Auth Me

GET
/auth/me

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Response Body

Successful Response

application/json
  1. response
Example Request
curl -X GET 'https://example.com/auth/me'
Example Response200
{}

Refresh Tokens

POST
/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
email_verified?Email Verified
Defaulttrue
expires_in?Expires In
Default1800
refresh_token*Refresh Token
token_type?Token Type
Default"bearer"
Example Request
curl -X POST 'https://example.com/auth/refresh' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "access_token": "string",  "email_verified": true,  "expires_in": 1800,  "refresh_token": "string",  "token_type": "bearer"}

Register

POST
/auth/register

Request Body

application/json
  1. body
email*Email
Formatemail
password*Password
Length8 <= length <= 128

Response Body

Successful Response

application/json
  1. response
access_token*Access Token
email_verified?Email Verified
Defaulttrue
expires_in?Expires In
Default1800
refresh_token*Refresh Token
token_type?Token Type
Default"bearer"
Example Request
curl -X POST 'https://example.com/auth/register' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com",  "password": "stringst"}'
Example Response
{  "access_token": "string",  "email_verified": true,  "expires_in": 1800,  "refresh_token": "string",  "token_type": "bearer"}

Resend Verification

POST
/auth/resend-verification

Request Body

application/json
  1. body
email*Email
Formatemail

Response Body

Successful Response

application/json
  1. response
Example Request
curl -X POST 'https://example.com/auth/resend-verification' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com"}'
Example Response
{}

Reset Password

POST
/auth/reset-password

Request Body

application/json
  1. body
new_password*New Password
Length8 <= length <= 128
token*Token
Length1 <= length <= 256

Response Body

Successful Response

application/json
  1. response
Example Request
curl -X POST 'https://example.com/auth/reset-password' \  -H 'Content-Type: application/json' \  -d '{  "new_password": "stringst",  "token": "string"}'
Example Response
{}

Programmatic Token

POST
/auth/token

Response Body

Successful Response

application/json
  1. response
access_token*Access Token
email_verified?Email Verified
Defaulttrue
expires_in?Expires In
Default1800
refresh_token*Refresh Token
token_type?Token Type
Default"bearer"
Example Request
curl -X POST 'https://example.com/auth/token'
Example Response200
{  "access_token": "string",  "email_verified": true,  "expires_in": 1800,  "refresh_token": "string",  "token_type": "bearer"}

Verify Email

POST
/auth/verify-email

Request Body

application/json
  1. body
code*Code
Length6 <= length <= 6
email*Email
Formatemail

Response Body

Successful Response

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