How to authenticate against the Clarus API — OAuth 2.0 bearer tokens with the tenant subdomain header, or the legacy sign-in with your subdomain API URL — and the headers to send on every request.
The Clarus API is authenticated, and every request must identify both the user and your environment. There are two ways to do this:
OAuth 2.0: an OAuth bearer token, sent with the X-Clarus-Subdomain header to https://clarus-api.com.
Legacy sign-in: a token from signing in with an email address and password, sent to your subdomain’s own API URL. Integrations that are not yet on OAuth use this method.
The endpoints, payloads and responses are the same for both. Only the base URL and the headers differ.
ClarusWMS is multi-tenant. Every request must include the X-Clarus-Subdomain header identifying which tenant’s data you are operating on — it is sent in addition to the bearer token, not instead of it.
Each Clarus environment has its own API URL, built from your subdomain:
https://{subdomain}.api.clarus.ws
For example, if your subdomain is acme, your API URL is https://acme.api.clarus.ws. If you’re not sure of your subdomain, ask Clarus support.
Path
Use it for
/users/sign_in
Signing in to get a token
/api/...
REST endpoints, e.g. https://acme.api.clarus.ws/api/products
/graphql
GraphQL queries
If you have a sandbox environment, it has its own subdomain. Swap that subdomain into the URL to point your integration at the sandbox.
When you’re working from the Operations reference, replace https://clarus-api.com with your API URL. You don’t need the X-Clarus-Subdomain header, because the URL already identifies your environment.
A user has only one legacy token at a time. Every sign-in issues a new token and invalidates the previous one, and a sign-in to the WMS front-end with the same account can do the same. Signing out through /users/sign_out also invalidates the token.This means:
Use a dedicated API user. If someone signs in to the front-end with the integration’s account, the integration’s token stops working. See Use a dedicated user account below.
Don’t sign in on every request. Signing in on every call cuts off any other process that is using the same account. Reuse the stored token, and sign in again only after a 401.
Give each system its own user. Two integrations sharing one account keep invalidating each other’s tokens.
The Operations playground uses OAuth 2.0, so you can’t try legacy sign-in calls there. Use curl, Postman or your own client instead.
Create a separate user account specifically for API access, distinct from any account used to log into the WMS front-end.
Signing into the front-end with the same account the integration uses can end the existing session — and running integration calls while someone is logged in on that account can knock them out of the system. Keeping them separate avoids being logged out mid-task.
The same logic applies if you have multiple developers or systems hitting the API: ideally each environment (development, test, production) gets its own account, so auditing, throttling, and troubleshooting can be done independently.
Store API credentials — passwords, client secrets and tokens — in a secrets manager, environment variables, or your platform’s equivalent. Don’t commit them to source control or paste them into shared documents.
Assistant
Responses are generated using AI and may contain mistakes.