v69

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-011221331.4 MB
Contracts

Get a list of contracts

Retrieves a cursor-paginated list of contracts in the environment, fetched live from the connected billing provider. Each contract is enriched with a preview of its upcoming (next) invoice when one is available. Returns an empty list when no billing provider is connected. Supports filtering by customer external ID, state, and name.

get/api/v1/contracts

Query parameters

limitinteger

Maximum number of items to return

afterstring

Return items that come after this cursor

beforestring

Return items that come before this cursor

customerExternalIdstring

Filter by the exact external ID of the customer the contract belongs to

statestring

Filter by contract state. Supports comma-separated values for multiple states

namestring

Filter by exact contract name

Headers

X-ACCOUNT-IDstring

Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.

X-ENVIRONMENT-IDstring

Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).

Response

A cursor-paginated list of contracts, each with its next-invoice preview when available.