The CRM API
Read and change your CRM's clients, people, deals, agreements and timeline from another system, such as your accounting package or website, with an API key.
The CRM API lets another system read and change your CRM: its clients, the people at them, their deals with each deal's lines and invoices, their agreements, and the timeline of what happened with each. Your accounting package can keep clients and invoices in step, your website can add a lead the moment a form is sent, an integration platform can move a deal when something happens elsewhere, and a script of your own can read whatever it needs, without anybody copying anything across.
Every call acts as the person whose key it is. It can do what they can do on the CRM's own pages and nothing more, and every change it makes is checked, written in the record's history and told to your workflows exactly as the same change on a page would be.
https://crm.sanda-os.com.au/api/crm/v1Start in two minutes
-
Make a key. In the CRM, go to Settings · API keys, press Make a key, give it a name such as "Xero sync", choose Read and change, and press Make the key. Copy the key: it begins
bck_and is shown once. See API keys. -
Ask who you are. Every call sends the key as a bearer token.
Shell curl https://crm.sanda-os.com.au/api/crm/v1/me \ -H "Authorization: Bearer bck_..."The answer names you, the workspace, the key's scopes and whether it may change things.
-
Add a client.
Shell curl https://crm.sanda-os.com.au/api/crm/v1/companies \ -H "Authorization: Bearer bck_..." \ -H "Content-Type: application/json" \ -d '{"name": "Acme Services", "domain": "acme.com.au"}'The answer is the new company, with its
idand aurlto its page in the CRM. -
Find it again.
GET /companies?domain=acme.com.aufinds it by its domain, andGET /companies/{id}reads it by its id.
What it covers
| You want to | Use |
|---|---|
| List, find, add, change, archive and restore clients, people, deals and agreements | Records |
| Read a record's history: who changed what, and when | Records |
| Put lines and invoices on a deal | Deals |
| Move a deal to another stage, win it or lose it | Deals |
| Read the timeline, and log a note, an email, a call or a meeting | The timeline |
| Keep another system in step with every change | The change feed and webhooks |
| Every endpoint, field, filter, event and error | Reference |
The API does not change the CRM's setup (its pipelines, fields and agreement types), which an owner or admin does on Settings, though it reads all of them so another system can use their ids. Tickets, files, Knowledge and workflows are not part of it. For those, connect an assistant to the CRM. See connect an assistant to the CRM.
How every call works
- JSON in, JSON out. Send a JSON object with
Content-Type: application/json, up to 200 KB. Every answer is JSON, and carries aSanda-Api-Versionheader, which is 1.0.0 today. - A thing is named for what it is. One company comes back as
{"company": {...}}and a list as{"companies": [...]}. A link to another record is an object such as{"id": "...", "name": "Acme Services"}, ornull. - Only the fields a call takes. A field the call does not know is refused with 400, naming it, so a typo never silently does nothing.
- A change sends only what changes.
PATCHchanges the fields you send and leaves the rest as they are. Sendnullto clear one. - Every record has an id, a UUID such as
5f0c2b7e-8a51-4c8e-9d0b-2a4c7e1f9b33, which never changes. - Times are ISO 8601 in UTC, such as
2026-12-03T04:15:00.000Z. A day, such as a deal's expected close, isYYYY-MM-DD, and a day you leave out (the day an invoice was made) is today in your workspace's time zone. - Lists come a page at a time. See pages.
- Calls are limited per key to 300 a minute. Past that, a call answers 429 with a
Retry-Afterheader of 60 seconds.
Pages
Every list returns a page at a time, 50 unless limit says otherwise (up to 100). The answer's next_cursor is what you send back as cursor for the next page. When it is null there is no more.
curl "https://crm.sanda-os.com.au/api/crm/v1/deals?outcome=open&limit=100" -H "Authorization: Bearer bck_..."
# → {"deals": [...], "next_cursor": "eyJvIjoibmV3ZXN0Ii..."}
curl "https://crm.sanda-os.com.au/api/crm/v1/deals?outcome=open&limit=100&cursor=eyJvIjoibmV3ZXN0Ii..." -H "Authorization: Bearer bck_..."A page never shifts under you: a record added while you page is not repeated or skipped. A cursor belongs to the list and order that gave it. Change the order and start without one.
When a change waits for approval
A workflow can make a move wait for somebody to approve it, such as a deal moving to Won. A change the API asks for waits the same way: the rest of what you sent is made, and the answer says what is waiting.
- Changing a deal or an agreement answers 202 rather than 200, with the record as it now stands and
pending_approval, which says who it waits for. - Adding one answers 201 as usual, and carries
pending_approvalwhen its first move waits.
When it is decided, the change is made, or not, and the change feed has it either way.
Errors
A refusal is a status with a JSON body that says what to do, in the same words the CRM's page would use:
{
"error": {
"code": "insufficient_scope",
"message": "This key was not made with crm:manage, which POST /deals/{id}/archive needs. Make a key with it under Settings · API keys.",
"required_scope": "crm:manage"
}
}Branch on code, and show a person message. Every code is in the reference.
OpenAPI
The API describes itself as an OpenAPI 3.1 document, which needs no key:
https://crm.sanda-os.com.au/api/crm/v1/openapi.jsonImport it into Postman, Insomnia or an integration platform to get every endpoint with its fields, or generate a client from it.
Something unclear or out of date? Tell us, and we will fix the page.