Skip to main content
The REST API v2 is in active development. We add endpoints one at a time, so this reference does not cover the full API yet.

What “alpha” means for v2

“Alpha” describes the coverage of v2, not the stability of its endpoints.
  • Every endpoint in this reference is final. Its path, parameters and response shape do not change in a breaking way. You can build production integrations on it.
  • The set of endpoints is incomplete. We move the API to v2 endpoint by endpoint, not in one release. Each endpoint appears in this reference on the day it ships.
  • An endpoint that is not in this reference is not in v2 yet. Use its v1 equivalent until it arrives.

Use v1 and v2 together

v1 stays available. One integration can call v1 and v2 endpoints side by side, with the same API key. See the v1 reference for the endpoints that v2 does not cover yet.

Base URL

Authentication

v2 uses the same x-api-key header as v1. See Authentication.

Paths

A v2 path names the organization or project it acts on:
Continue to send the x-organisation-id or x-project-id header. Its value must match the ID in the path. See Context Headers.

Requests and responses

All requests and responses use JSON.

Two kinds of list

Pagination

Offset-based, via page and limit: On a GET list, send them in the query string:
On a POST analytics list, send them in the body:
This is the opposite of v1, where page and limit are always in the query string. A v2 POST list reads them from the body only.
Responses wrap results:
nextPage is omitted on the last page, prevPage on the first.

Sorting

A sort is a field:asc or field:desc pair, as a string. On a GET list, send one or more comma-separated pairs in the query string:
On a POST analytics list, send one pair in the body:
Each endpoint allows a specific set of fields. The reference lists them. Any other field returns 400.
The v1 form, an array of { "field": ..., "direction": ... } objects, returns 400 on v2.

Filtering

Filters are named parameters. On a GET list, a list filter takes either form:
On a POST analytics list, filters are properties of the body.

Errors

Errors use the same format and status codes as v1. See Errors.
Unknown properties are rejected, not ignored. A typo’d field name returns 400 rather than being silently dropped.

Changes from v1