API

/

Auth

Auth

This document is a guide for the authentication procedures required to integrate with the Mori API.

You can obtain an access token through the login process, which can then be used as credentials for subsequent API requests.

Account authentication flow

The diagram below illustrates the authentication process that clients must follow to access the Mori API.

After completing the login process, you may optionally register a webhook endpoint if needed.

Step

Description

Notes

login(credentials)

Call the login API to obtain an access token.

The default validity period of the token is 2 hours.

createWebhookEndpoint
(accessToken, url)

After logging in, you can use the issued token to register a webhook endpoint.
For more details, see the Registering a Webhook document.

This step is optional and can be configured if you want to receive event notifications.

Login API

This API is used to log in with the client’s account credentials and obtain an access token.

This token must be included in the Authorization header for most subsequent API requests.

POST

https://{{API_DOMAIN}}/api/v2/auth/login

Request Body

Field

Type

Description

email

string

The customer’s email address registered with Mori Biz.

password

string

The password set during registration.

Response Header

Key

Description

accessToken

Authentication token to be used for subsequent API calls

Response

Field

Type

Description

user.id

int

The client’s unique ID

user.email

string

The registered email address

user.apiKey

string

The API key used for API calls

user.migrationKey

string

A key used for migration purposes

contract.planType

string

The subscription plan currently in use

contract.planStartDate

string

The start date of the subscription plan

contract.planEndDate

string (nullable)

The end date of the subscription plan (null for free plans)

contract.currentUsage

int

Current usage

contract.usageLimit

int

Usage limit

API

/

Auth

Auth

This document is a guide for the authentication procedures required to integrate with the Mori API.

You can obtain an access token through the login process, which can then be used as credentials for subsequent API requests.

Account authentication flow

The diagram below illustrates the authentication process that clients must follow to access the Mori API.

After completing the login process, you may optionally register a webhook endpoint if needed.

Step

Description

Notes

login(credentials)

Call the login API to obtain an access token.

The default validity period of the token is 2 hours.

createWebhookEndpoint
(accessToken, url)

After logging in, you can use the issued token to register a webhook endpoint.
For more details, see the Registering a Webhook document.

This step is optional and can be configured if you want to receive event notifications.

Login API

This API is used to log in with the client’s account credentials and obtain an access token.

This token must be included in the Authorization header for most subsequent API requests.

POST

https://{{API_DOMAIN}}/api/v2/auth/login

Request Body

Field

Type

Description

email

string

The customer’s email address registered with Mori Biz.

password

string

The password set during registration.

Response Header

Key

Description

accessToken

Authentication token to be used for subsequent API calls

Response

Field

Type

Description

user.id

int

The client’s unique ID

user.email

string

The registered email address

user.apiKey

string

The API key used for API calls

user.migrationKey

string

A key used for migration purposes

contract.planType

string

The subscription plan currently in use

contract.planStartDate

string

The start date of the subscription plan

contract.planEndDate

string (nullable)

The end date of the subscription plan (null for free plans)

contract.currentUsage

int

Current usage

contract.usageLimit

int

Usage limit

API

/

Auth

Auth

This document is a guide for the authentication procedures required to integrate with the Mori API.

You can obtain an access token through the login process, which can then be used as credentials for subsequent API requests.

Account authentication flow

The diagram below illustrates the authentication process that clients must follow to access the Mori API.

After completing the login process, you may optionally register a webhook endpoint if needed.

Step

Description

Notes

login(credentials)

Call the login API to obtain an access token.

The default validity period of the token is 2 hours.

createWebhookEndpoint
(accessToken, url)

After logging in, you can use the issued token to register a webhook endpoint.
For more details, see the Registering a Webhook document.

This step is optional and can be configured if you want to receive event notifications.

Login API

This API is used to log in with the client’s account credentials and obtain an access token.

This token must be included in the Authorization header for most subsequent API requests.

POST

https://{{API_DOMAIN}}/api/v2/auth/login

Request Body

Field

Type

Description

email

string

The customer’s email address registered with Mori Biz.

password

string

The password set during registration.

Response Header

Key

Description

accessToken

Authentication token to be used for subsequent API calls

Response

Field

Type

Description

user.id

int

The client’s unique ID

user.email

string

The registered email address

user.apiKey

string

The API key used for API calls

user.migrationKey

string

A key used for migration purposes

contract.planType

string

The subscription plan currently in use

contract.planStartDate

string

The start date of the subscription plan

contract.planEndDate

string (nullable)

The end date of the subscription plan (null for free plans)

contract.currentUsage

int

Current usage

contract.usageLimit

int

Usage limit