AccoilAccoil Developer Docs

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.

GET
/v2/workspaces

Authorization

BearerAuth
AuthorizationBearer <token>

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_key used for sending (ingesting) event data into Accoil.

In: header

Query Parameters

expand?string

Comma-separated list of optional data blocks to include. Available options:

  • stats: Include total user and account counts for each workspace. Example: expand=stats
limit?integer

Maximum number of workspaces to return per page.

Range1 <= value <= 100
Default20
offset?integer

Number of workspaces to skip before returning results.

Range0 <= value
Default0

Response 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  }}

GET
/v2/workspaces/{id}

Authorization

BearerAuth
AuthorizationBearer <token>

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_key used for sending (ingesting) event data into Accoil.

In: header

Path Parameters

id*integer

The workspace ID.

Query Parameters

expand?string

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"  }}