Information
- OpenAPI version:
3.0.3
Rest API
REST API for Unless AI. To work in your Unless account from Claude, ChatGPT or another AI app, connect it with your Unless login instead - no API key needed. This API is for scripts, integrations and agents that call Unless directly.
Every request needs four headers:
| Header | Value |
|---|---|
x-api-key |
Your personal API key, from Account > Settings in the dashboard. Personal keys start with personal_. |
x-user-email |
The email address you sign in with. The key is tied to that user, so the two have to match. |
x-account-id |
The account ID, from the top of Account > Settings. |
x-website-id |
The ID of the workspace to work in. GET /api/v1/workspaces lists the workspaces the key can reach. |
Prefer the personal key over the account-wide key. Both authenticate, but the personal key carries only your own
role and permissions, and you can replace it without affecting anyone else. A key only reaches the workspaces its
user has access to. Send either an API key or a JWT, never both: a request with both an Authorization and an
x-api-key header is rejected.
All endpoints are served from https://api.unless.com, prefixed with /api/v1, and take and return JSON.
curl "https://api.unless.com/api/v1/tasks?websiteId=<website-id>" \
-H "x-api-key: <api-key>" \
-H "x-user-email: <user-email>" \
-H "x-account-id: <account-id>" \
-H "x-website-id: <website-id>"
A write endpoint validates the body before storing anything. A value it will not accept comes back as a 400
naming the field, so read the response rather than retrying it unchanged:
{
"error": true,
"route": "create_task",
"message": "Invalid option: expected one of ... at type",
"errorCode": "INVALID_REQUEST_BODY",
"issues": [{ "path": "type", "code": "invalid_value", "message": "Invalid option: expected one of ..." }]
}
Fields the server owns, like ids, timestamps and anything derived, are ignored rather than rejected, so sending a record you just read back into a write is safe.
Deleting is not available with an API key. Remove procedures, audiences, training sources, help center content, personalizations and content library pages from the dashboard.