/v2/api/* with the Bearer token.
How to obtain credentials
Credentials are not passed on every data request—only the JWT.
Token endpoint
API key login
POST /v2/api/authentication/token/api-key
- Content-Type:
application/x-www-form-urlencoded - Body field:
apiKey(string)
Successful token response
JSON fields (seeJwtTokenResponse):
Token expiry and refresh
- Default token lifetime: ~24 hours (
expires_in: 86399seconds). - The actual lifetime may vary if the server’s
JWT:TokenExpiryTimesetting is configured (minimum 5 minutes). - There is no refresh endpoint — when a token expires, re-authenticate using
POST /v2/api/authentication/token/api-key. - Recommendation: Re-authenticate 5 minutes before the token expires rather than waiting for a 401 response. See Token caching strategy below.
Token caching strategy
Recommended approach:- On startup, request a token and store it in memory with its expiry time (
Date.now() + expires_in * 1000). - Before each API call, check if the token expires within the next 5 minutes.
- If yes, re-authenticate and replace the cached token.
- If no, use the cached token.
Token scoping
Every token carries theCompanyId of its API key’s company. Endpoints that take a company or vehicle accept:
- the token’s company, and
- its direct child companies, unless a child is cancelled.
GET /v2/api/companies (with level 2 or more) but return 404 on other endpoints, and so do vehicles mapped only to them (POST /v2/api/vehicles/list leaves such vehicles out of its response instead). One exception: GET /v2/api/companies/{id}/alerts for a direct child also lists that child’s own children’s alert configurations.
To list a company’s vehicles, use fleet last positions.
API key rotation
To rotate an API key without downtime:- Create the new key in the Telemax dashboard (API Keys V2 section). Both keys are active simultaneously.
- Update your integration to use the new key and confirm tokens are being obtained successfully.
- Delete the old key in the dashboard. Existing tokens issued with the old key remain valid until they expire (up to 24 hours).