Skip to main content
Welcome to Salesbricks’ public API: the gateway to seamless access and management of your customers, subscriptions, invoices, and usage. The REST API (v2) is the recommended way to integrate with Salesbricks. It covers the full subscription lifecycle: creating customers, starting subscriptions, taking payment, upgrading, and reporting on revenue.
A note on our legacy GraphQL API:Our GraphQL API (v1) remains fully supported for existing integrations.For new work, we recommend the REST API. It receives all new functionality, including the self-serve and product-led growth endpoints described below.

Browse the REST API endpoints

Full endpoint reference with an interactive playground.

Base URL

All REST requests target:

Authentication

Every request must include your Public API Token in the X-SALESBRICKS-KEY header.
See the Authentication guide to find your token.

Your first request

List the customers belonging to your seller account:
cURL

Example Response

JSON

What you can build

Start subscriptions

Create a customer and take them through checkout, signature, or a direct server-side start.

Let customers self-serve

Generate a billing portal link so customers can change plans and payment methods.

Report usage

Submit metered usage for usage-based bricks.

React to events

Receive webhooks when orders complete, invoices are paid, and more.

Pagination

List endpoints are paginated with the limit and offset query parameters, and return a count alongside next and previous URLs. next and previous are null when there is no further page in that direction.
cURL

Errors

Errors return a standard shape containing a machine-readable code and a human-readable message.
JSON
For write endpoints, send an idempotency key so retries are safe. See Idempotent Requests.
Let’s dive in! 🚀