API reference

Discovery API

The calls that tell an integration where it stands: which workspace its key acts for, what the key may do, the host its tracked links are served on, and the whole surface as an OpenAPI document.

Base URL https://xdocs.io/api/v1, with Authorization: Bearer xdk_… on every request. Pagination, rate limits, scopes and error codes are the same for every endpoint and are described once, in how the API behaves.

Discovery

What this key can do and where its links live. The first two calls any integration makes, and both are safe to call from anywhere a key is being checked.

GET/api/v1any key

The catalogue: every resource, the scopes this key holds, the rate limit and the host tracked links are served on.

Query parameters

includestring
endpoints adds groups: every endpoint with its parameters, the whole of this reference as data.

Returns

{ version, scopes, allScopes, rateLimit{perMinute}, linkOrigin, baseUrl, pagination, documentation, openapi, resources[], webhookEvents[], groups? }. linkOrigin is the account's verified custom domain when it has one, so build link URLs from it rather than assuming ours.

GET/api/v1/meany key

Who this key acts for: the workspace, its plan and the key's scopes.

Returns

{ data: { workspaceId, name, email, scopes, plan, origin } }

GET/api/v1/openapi.jsonno key

This same surface as an OpenAPI 3.1 document, for generating a client.

Returns

An OpenAPI document. No key required, and not counted against a rate limit.

← The whole API referenceNext: Documents API →