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 theX-SALESBRICKS-KEY header.
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 thelimit 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-readablecode and a human-readable message.
JSON
Let’s dive in! 🚀