Authentication
The API accepts two methods. A personal API token suits scripts and integrations; a JWT suits apps where a person signs in with email and password.
Personal API token
- Open API & Integration.
- Click Generate API token.
- Copy the token and send it in the
Authorizationheader of every request:
curl -H "Authorization: Token YOUR_TOKEN" https://votre-nom.altiusforms.com/api/v1/forms/
The token acts on your behalf, with your permissions: keep it secret. Rotate token creates a new one and invalidates the old one immediately; Revoke token deletes it. Either way, integrations using the old token stop working until they are updated.
JWT: email and password
- Request a token pair:
curl -X POST https://votre-nom.altiusforms.com/api/v1/token/ -H "Content-Type: application/json" -d '{"email": "you@example.ch", "password": "..."}'
- The response contains
access(short-lived) andrefresh. Send the first one asAuthorization: Bearer <access>. - When
accessexpires, get a new one:
curl -X POST https://votre-nom.altiusforms.com/api/v1/token/refresh/ -H "Content-Type: application/json" -d '{"refresh": "<refresh>"}'
- To sign out, invalidate the
refreshtoken:
curl -X POST https://votre-nom.altiusforms.com/api/v1/token/blacklist/ -H "Content-Type: application/json" -d '{"refresh": "<refresh>"}'
Good practice
- Create a dedicated account for each integration, with a role limited to what it needs.
- Never put a token in the code of a public web page.
Still have a question?
Write to the team