Developers
Twenty-one SAGARIS API operations, scopes and the gates
Twenty-one operations under /
The path of one write
POST/api/v1/contacts
- KeyThe workspace is resolved from the key.
- Scopecontacts.write
- Rate limitThe write-rate budget.429
- IdempotencySame key, same endpoint: replayed verbatim.Replays
- GatesBilling read-only gates and the plan cap.402 · 429
- EnvelopeOn success{ "data": { ... }, "error": null }On failure{ "data": null, "error": "...", "code": "..." }
Pipeline contacts from another system
Use PUT /
PUT /api/v1/contacts/assert
Authorization: Bearer <workspace-api-key>
Content-Type: application/json
{ "email": "alex@example.com", "first_name": "Alex", "company": "Example" }POST /api/v1/contacts/query
Authorization: Bearer <workspace-api-key-with-contacts.read>
Content-Type: application/json
{ "filter": { "updated_since": "2026-09-01T00:00:00Z" }, "sort": "updated_at", "direction": "asc", "limit": 100, "offset": 0 }Assertion returns 201 for a new contact and 200 for an update. It matches on email, not the Idempotency-Key cache, re-resolves a concurrent insert through the same gated path, and neither enrolls the contact nor grants outreach consent. New contacts are visible in the default CRM list.
To read what changed, query with contacts.read (the second tab). Filters are ANDed and unknown ones rejected: email is case-insensitive equality, company and source exact, updated_since inclusive. Limits run 1 to 100, offsets 0 to 100000, ties sort by id. Pages are not a snapshot, so overlap sync windows and deduplicate ids. Archived records are omitted; it is not a deletion feed, and it shares the write-rate budget.
The surface
Every path below is relative to /
| Method | Path | Scope | Notes |
|---|---|---|---|
| GET | / | linkedin.read | Actions assigned to the key's connected agent, with recipient, copy and campaign context. |
| POST | / | linkedin.execute | A connected agent's commands: setup, brief, health, schedules and runs; claim, start and report an action. |
| GET | / | contacts.read | List contacts, newest first, live contacts only; archived contacts are omitted. |
| POST | / | contacts.write | Create a contact, stamped with source public_api. |
| PUT | / | contacts.write | Create or update a contact by email, preserving omitted fields. Safe to retry. |
| POST | / | contacts.read | Filter live contacts by email, company, source and changed-since time. |
| GET | / | contacts.read | One live contact. Foreign and archived records return 404. |
| PATCH | / | contacts.write | Update the fields listed under Writing to contacts; the stage only if its gate allows. |
| POST | / | activities.write | Log one of the eight activity types a rep could log by hand. |
| POST | / | contacts.write | Add tags. It only adds; the list is capped at 50. |
| POST | / | deals.write | Create a deal against a contact. |
| GET | / | sequences.read | List email sequences, newest first. |
| POST | / | sequences.write | Enroll one contact into one sequence, behind the gates below. |
| GET | / | calls.read | List calls, newest first, including those the AI receptionist answered. |
| GET | / | calls.read | One call with its transcript. Foreign and unknown ids return 404. |
| POST | / | suppression.write | Add an address to the workspace suppression list. |
| GET | / | social_checklist.read | The checklist with this workspace's status for every item. |
| GET | / | social_checklist.read | The items due now, in the runner's order, each with why. |
| GET | / | social_checklist.read | One item with the context it is done from. |
| POST | / | social_checklist.submit | Hand an item's output to a person as a draft or one approval card. 409 card_waiting while a card waits. |
| POST | / | social_checklist.record | Record a finding as an assistant's mark. Any other item is 409 approval_required. |
Early access: the five Social checklist operations may answer 503 where Social storage is not provisioned.
Note
There is no delete in the public API, and no endpoint that sends or publishes anything. Enrolling arms a sequence the scheduler later sends from, behind the gates below. A Social checklist submission only creates a draft or a card for a person to decide on. POST /
An OpenAPI 3.1 document for exactly these twenty-one operations is served at /
The response envelope
Apart from /
single{ "data": { ... }, "error": null }
list { "data": [ ... ], "meta": { ... }, "error": null }
failure { "data": null, "error": "...", "code": "..." }Limit
Most 500s carry a generic message and a correlationId; a few routes still return the raw database message. Retry both, and quote the correlationId to have the error looked up.
The two /
Paging contacts and sequences
GET /
- limit
- Defaults to 25, capped at 100. A larger value is clamped rather than rejected; absent, zero, negative or not a number falls back to 25.
- offset
- Defaults to 0. A negative or unparseable offset is treated as 0.
- meta
- Returns total, limit, offset and hasMore. total is an exact count.
Idempotent writes
Nine of the eleven writes honour an Idempotency-Key header; PUT /
curl -X POST https://www.sagaris.ai/api/v1/contacts \
-H "Authorization: Bearer $SAGARIS_API_KEY" \
-H "Idempotency-Key: crm-sync-2026-08-29-row-1043" \
-H "Content-Type: application/json" \
-d '{"email":"dana@example.com","first_name":"Dana"}'Note
The key is scoped to the workspace and the endpoint, not to the request body, so two different endpoints never collide on one key. For endpoints with an id in the path the key is scoped to the route template, not to that id, so use one key per intended write. The same key on the same endpoint with a different body replays the first response and never applies the second.
A key is only recorded when the write succeeded, so a refused request can be retried with the same key once you have fixed what it complained about.
Writing to contacts
Creating a contact needs at least one of email, first_name or last_name; company, job_title, phone, linkedin_url and website are optional. The row is stamped with source public_api, so contacts from an integration stay distinguishable from ones a rep typed.
PATCH /
| Field | Type | Note |
|---|---|---|
first_namelast_namefull_nametitlejob_titlecompany | string | Trimmed. An empty value clears the field. |
email | string | Lower-cased and checked; an invalid address is a 400. |
phone | string | At least 7 digits. A US number is stored as +1 E.164. |
linkedin_urlwebsite | URL | Normalised; an invalid URL is a 400. |
address | object | Normalised to the contact address shape. |
lead_score | number | Rounded and held between 0 and 100. |
tags | array | Replaces the whole list: lower-cased, de-duplicated, at most 50. Reserved tags are refused. |
custom_fields | object | Anything that is not an object is written as an empty object. |
suppressed | boolean | Must be true or false. |
suppression_reasonsourcesource_detailonboarding_session_id | string | Trimmed, like every string field. |
account_id | string | An account in this workspace; any other is a 400 validation_failed. |
last_contacted_at | date | Checked as a date; an invalid one is a 400. |
lifecycle | stage | Validated, then moved only through the gated stage change. force: true is a 403. |
| Not writable | ||
data_confidenceprovenanceconfidence_score | server-owned | Derived from the edit; a supplied value is ignored. |
consent_statusconsent_updated_at | consent ledger | Refused with a 400: consent is not written here. |
Limit
POST /
Added tags are merged, de-duplicated and sorted, then cut at 50, so past the cap the alphabetically last tags are dropped.
Activities accept eight types, and only eight: the ones a rep could have logged by hand.
note_addedcall_madecall_receivedvoicemail_leftmeeting_bookedmeeting_completedsms_sentlinkedin_message
System events, an email open, a stage change or an AI action, are not writable, so an integration cannot manufacture an event the product's reporting would believe. A note requires body; every other type requires subject.
Gates the API does not bypass
An API key is not an administrator. The refusals below are the product's own gates, applied to the key rather than waived for it.
- 402read-only workspace
- Every write except suppression and POST /
linkedin/ actions runs the billing read-only gates: an expired trial, an elapsed financed term or an enforced delinquency shutoff. The LinkedIn route runs the same gates and the plan's LinkedIn allowance before claim and start only, and refuses those two with its own 409 rather than a 402; its other commands record what already happened and are not refused for billing. - 429plan cap
- Creating a contact consumes the per-plan contact allowance and is refused at the cap. This is a different 429 from the rate limit, with a different code.
- 403force_not_permitted
- Sending force: true on a contact update is refused outright. A key holds no workspace role, so every overridable gate is a hard one for it.
- 400bant_required
- Some lifecycle stages require a recorded BANT confirmation before a deal can exist against the contact, as on the internal path.
Suppression has no billing gate, on purpose: it only ever removes a recipient from outbound, and a workspace that has stopped paying must still be able to honour an opt-out.
Tenancy
The workspace is resolved from the key. No endpoint takes a workspace parameter and no request-supplied workspace id is read anywhere on this surface, so there is nothing for a caller to tamper with.
Every operation that names another record re-checks that it belongs to the key's workspace before it writes. A deal's contact id or an enrollment's sequence id from another workspace comes back as a 404 naming the record type, because from the key's position that record does not exist. An account_id from another workspace on a contact update comes back as a 400 validation_failed.
The MCP endpoint
The same key authenticates a Model Context Protocol endpoint at https:/
POST /
Read tools come from the public API's GET operations, plus Brain views under contacts.read and a profile tool under either LinkedIn scope. A write becomes a tool only if its scope is on one of two lists fixed in code: social_checklist.submit and social_checklist.record (drafts, cards and evidence, never a publish, send or approval), and linkedin.execute. A write tool runs the route's own handler, with its scope, rate limit, validation and workspace scoping. A route whose body takes one of several commands becomes one tool per command, each with only that command's fields.
The execution list is linkedin.execute, and its route is POST /
Until LinkedIn execution is activated for the environment, which sagaris_linkedin_setup reports, claim and start answer 409; setup, heartbeats, health observations, results, accepted connections, the operating brief, schedule reports, run reports, synced observations and reconnect acknowledgements are handled either way.
An action can be claimed only after a person approved it or set its LinkedIn account to run automatically. A sent result is logged as an activity and moves the contact's LinkedIn status forward; for a sequence step it also advances the sequence. A reported accepted connection marks the contact connected and is logged too; when the contact's next sequence step is an email, SAGARIS moves that email to at least 24 hours after acceptance. SAGARIS makes those changes, not the agent.
The endpoint also implements MCP Events (draft specification, protocol 2026-07-28): events/
A subscription receives the events of one LinkedIn account: the account its key's agent is bound to, and no other account of the workspace. It may name that account in arguments.accountId or leave accountId out; a subscription that names any other account is refused, and a key with no agent bound to an account receives no events.
What this connects to
Developers and integrations
Building an integration? Bring your use case.
Book a demo