For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
API StatusPartner Portal
HomeGuidesAPI ExplorerSDKsGitHubSupport
HomeGuidesAPI ExplorerSDKsGitHubSupport
  • API Concepts
    • Overview
    • Environments and URLs
    • Authentication
    • API versioning
    • Rate limiting
    • HTTP headers
    • Pagination, sorting, and filtering
  • General
      • POSTCreate a token
      • POSTRevoke a token
  • Common
  • Accounts payable
  • Accounts receivable
  • E-invoicing
  • Payments
  • Accounting integration
  • Expense management
  • Utilities
LogoLogo
API StatusPartner Portal
GeneralAccess tokens

Create a token

POST
/auth/token
POST
/v1/auth/token
$curl -X POST https://api.sandbox.monite.com/v1/auth/token \
> -H "x-monite-version: 2024-05-25" \
> -H "Content-Type: application/json" \
> -d '{
> "client_id": "eb959578-a74d-4ac3-8b25-bf0910027857",
> "client_secret": "14c84a34-282b-4fd8-8af6-86b5b5f2c212",
> "grant_type": "client_credentials"
>}'
1{
2 "access_token": "L8qq9PZyRg6ieKGEKhZolGC0vJWLw8iEJ88DRdyOg",
3 "expires_in": 86400,
4 "token_type": "Bearer"
5}
Create a new access token based on client ID and client secret.
Was this page helpful?
Previous

Revoke a token

Next
Built with

Headers

x-monite-versionstringRequired

Request

This endpoint expects an object.
client_idstringRequiredformat: "uuid"

Your partner client ID obtained from the “API Credentials” section of Monite Partner Portal. Note that the sandbox and production environment use different client IDs.

client_secretstringRequired

Your partner client secret obtained from the “API Credentials” section of Monite Partner Portal. Note that the sandbox and production environment use different client secrets.

grant_typeenumRequired

The type of the access token to generate:

  • client_credentials - partner-level access token,
  • entity_user - entity user token.
Allowed values:
entity_user_idstringOptionalformat: "uuid"

ID of the entity user to generate the access token for. Used only if grant_type is entity_user.

Response

Successful Response
access_tokenstring

The access token. Send it in the Authorization: Bearer ACCESS_TOKEN header in subsequent API calls.

expires_ininteger
The token expiration time, in seconds.
token_typestring
Always "Bearer".

Errors

400
Post Auth Token Request Bad Request Error
422
Post Auth Token Request Unprocessable Entity Error
429
Post Auth Token Request Too Many Requests Error