🔐 Required role:
API_ADMIN, which every API key holds
Exchange a JWT API key for a short-lived bearer JWT used to access Product APIs.
This is the token-exchange endpoint itself, so no bearer token is required to call it — you authenticate with your jwtApiKey in the request body.
On Sandbox and Staging this request must also send the CF-Access-Client-Id and CF-Access-Client-Secret headers, or Cloudflare rejects it before it reaches the API. See Cloudflare Access.
No Tenant header is needed: the tenant is read from the key, and the token carries it. The token lasts up to an hour: the exchange can return a token issued earlier, with less time left, so request a new one whenever a call answers 401. See the Quickstart for the full flow.
Security
CfAccessClientId and CfAccessClientSecret
- Sandbox (requires Cloudflare Access headers)https://api.sandbox.aiwyn.app/v1/auth/token
- Staging (requires Cloudflare Access headers)https://api.staging.aiwyn.app/v1/auth/token
- Production (your live firm data; no Cloudflare Access headers)https://api.aiwyn.ai/v1/auth/token
curl -i -X POST \
https://api.sandbox.aiwyn.app/v1/auth/token \
-H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
-H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"jwtApiKey": "string"
}'Response
{ "token": "string" }