Workspaces
List and retrieve the scoring workspaces your token can access.
A workspace is a scoring profile — a lookback window and engagement framework applied to a slice of your data. Every other endpoint in the Accoil API is scoped to one, so listing workspaces is usually the first call you make: it gives you the workspace_id you'll pass everywhere else.
Each workspace carries _links to its related collections (users, accounts, segments), so you can follow those rather than building URLs by hand. Add expand=stats to include total user and account counts.
Authorization
BearerAuth API Token Authentication
All API requests require authentication via a Bearer token. Provide your API token in the Authorization header of each request.
Example: Authorization: Bearer accoil_YOUR_API_TOKEN
You can create and manage your API token by navigating to: Settings > Product Settings > API Token in the Accoil web app.
⚠️ Note: This API token is used only for reading data from the Accoil API. It is not the same as the
api_keyused for sending (ingesting) event data into Accoil.
In: header
Query Parameters
Comma-separated list of optional data blocks to include. Available options:
stats: Include total user and account counts for each workspace. Example:expand=stats
Maximum number of workspaces to return per page.
1 <= value <= 10020Number of workspaces to skip before returning results.
0 <= value0Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v2/workspaces"{ "data": [ { "id": 123, "name": "Production Scoring", "lookback": 30, "status": "completed", "created_at": "2023-06-15T10:30:00Z", "last_refreshed_at": "2025-09-21T08:00:00Z", "_links": { "self": { "href": "/v2/workspaces/123" }, "users": { "href": "/v2/users?workspace_id=123" }, "accounts": { "href": "/v2/accounts?workspace_id=123" }, "segments": { "href": "/v2/segments?workspace_id=123" } } } ], "_meta": { "total_count": 1 }, "_expansions": { "available": [ "stats" ], "documentation": "Use expand=option1,option2 to include additional data", "unknown_parameters": [], "error": null }}Authorization
BearerAuth API Token Authentication
All API requests require authentication via a Bearer token. Provide your API token in the Authorization header of each request.
Example: Authorization: Bearer accoil_YOUR_API_TOKEN
You can create and manage your API token by navigating to: Settings > Product Settings > API Token in the Accoil web app.
⚠️ Note: This API token is used only for reading data from the Accoil API. It is not the same as the
api_keyused for sending (ingesting) event data into Accoil.
In: header
Path Parameters
The workspace ID.
Query Parameters
Comma-separated list of optional data blocks to include. Available options:
stats: Include total user and account counts. Example:expand=stats
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v2/workspaces/0"{ "data": { "id": 0, "name": "string", "lookback": 0, "status": "string", "created_at": "2019-08-24T14:15:22Z", "last_refreshed_at": "2019-08-24T14:15:22Z", "stats": { "total_users": 0, "total_accounts": 0 }, "_links": { "property1": { "href": "string" }, "property2": { "href": "string" } } }, "_expansions": { "available": [ "string" ], "documentation": "string", "unknown_parameters": [ "string" ], "error": "string" }}