Skip to content
Book a demo

Developers

Twenty-one SAGARIS API operations, scopes and the gates

Twenty-one operations under /api/v1, authenticated with a workspace API key. It is a deliberately small surface: it does the things an integration needs to do to a CRM, a Social checklist and a connected LinkedIn agent, and it refuses the things a person is supposed to decide.

Open the OpenAPI document

Pipeline contacts from another system

Use PUT /api/v1/contacts/assert with a workspace API key that has contacts.write. Email is required and matched case-insensitively within that workspace. Supply first_name, last_name, company, job_title, phone, linkedin_url or website as needed. Omitted fields stay unchanged; an empty optional field clears it. Unknown fields are rejected. The result contains the contact id: retain it for activities, tags and subsequent updates.

HTTP
PUT /api/v1/contacts/assert
Authorization: Bearer <workspace-api-key>
Content-Type: application/json
{ "email": "alex@example.com", "first_name": "Alex", "company": "Example" }

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 /api/v1. Ten operations read and eleven write. Each one asserts exactly one scope, and the scope named here is the one the route handler actually passes to the authenticator, not one copied from a specification.

Twenty-one operations, in the order of the OpenAPI document21 operations · 10 read · 11 write
MethodPathScopeNotes
GET/linkedin/actionslinkedin.readActions assigned to the key's connected agent, with recipient, copy and campaign context.
POST/linkedin/actionsgatedlinkedin.executeA connected agent's commands: setup, brief, health, schedules and runs; claim, start and report an action.
GET/contactscontacts.readList contacts, newest first, live contacts only; archived contacts are omitted.
POST/contactscontacts.writeCreate a contact, stamped with source public_api.
PUT/contacts/assertcontacts.writeCreate or update a contact by email, preserving omitted fields. Safe to retry.
POST/contacts/querycontacts.readFilter live contacts by email, company, source and changed-since time.
GET/contacts/{id}contacts.readOne live contact. Foreign and archived records return 404.
PATCH/contacts/{id}contacts.writeUpdate the fields listed under Writing to contacts; the stage only if its gate allows.
POST/contacts/{id}/activitiesactivities.writeLog one of the eight activity types a rep could log by hand.
POST/contacts/{id}/tagscontacts.writeAdd tags. It only adds; the list is capped at 50.
POST/dealsdeals.writeCreate a deal against a contact.
GET/sequencessequences.readList email sequences, newest first.
POST/sequences/enrollsequences.writeEnroll one contact into one sequence, behind the gates below.
GET/callscalls.readList calls, newest first, including those the AI receptionist answered.
GET/calls/{id}calls.readOne call with its transcript. Foreign and unknown ids return 404.
POST/suppressionsuppression.writeAdd an address to the workspace suppression list.
GET/social/checklist/itemsearly accesssocial_checklist.readThe checklist with this workspace's status for every item.
GET/social/checklist/dueearly accesssocial_checklist.readThe items due now, in the runner's order, each with why.
GET/social/checklist/items/{id}/contextearly accesssocial_checklist.readOne item with the context it is done from.
POST/social/checklist/items/{id}/submissionsearly accesssocial_checklist.submitHand an item's output to a person as a draft or one approval card. 409 card_waiting while a card waits.
POST/social/checklist/items/{id}/evidenceearly accesssocial_checklist.recordRecord 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 /linkedin/actions goes further: a connected agent sends the LinkedIn action from its own browser session.

An OpenAPI 3.1 document for exactly these twenty-one operations is served at /api/v1/openapi.json. It is unauthenticated, because it is documentation, and a test fails when a route is added, renamed or deleted without the document following.

The response envelope

Apart from /linkedin/actions, every response, success or failure, is a JSON object carrying data and error. On success error is null; on failure data is null and error carries a readable message beside a stable code to branch on.

JSON
Shapes
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 /linkedin/actions operations follow this envelope only in part: some successes carry data without error, some refusals carry only error, and a 409 refusal carries a code only when the refusal has one (heartbeat_required and awaiting_approval, for example); the others carry the message alone.

Paging contacts and sequences

GET /contacts and GET /sequences take limit and offset as query parameters and order by creation time, newest first. Paging is offset-based; there are no cursors, and neither takes a filter or a search parameter. The contacts list returns live contacts only; archived contacts are omitted.

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 /contacts/assert matches on email instead, and POST /linkedin/actions does not read the header. Present the same key again to the same endpoint and the stored response is replayed verbatim, status included, without a second write. Use a stable identifier from the system you sync from.

Shell
POST /api/v1/contacts
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 /contacts/{id} writes the fields below and nothing else. Other keys are ignored, and a request with no supported field is a 400.

PATCH /contacts/{id} Writable fields
FieldTypeNote
first_namelast_namefull_nametitlejob_titlecompanystringTrimmed. An empty value clears the field.
emailstringLower-cased and checked; an invalid address is a 400.
phonestringAt least 7 digits. A US number is stored as +1 E.164.
linkedin_urlwebsiteURLNormalised; an invalid URL is a 400.
addressobjectNormalised to the contact address shape.
lead_scorenumberRounded and held between 0 and 100.
tagsarrayReplaces the whole list: lower-cased, de-duplicated, at most 50. Reserved tags are refused.
custom_fieldsobjectAnything that is not an object is written as an empty object.
suppressedbooleanMust be true or false.
suppression_reasonsourcesource_detailonboarding_session_idstringTrimmed, like every string field.
account_idstringAn account in this workspace; any other is a 400 validation_failed.
last_contacted_atdateChecked as a date; an invalid one is a 400.
lifecyclestageValidated, then moved only through the gated stage change. force: true is a 403.
Not writable
data_confidenceprovenanceconfidence_scoreserver-ownedDerived from the edit; a supplied value is ignored.
consent_statusconsent_updated_atconsent ledgerRefused with a 400: consent is not written here.

Limit

POST /contacts/{id}/tags only adds. To remove a tag, PATCH the contact with the full tags array you want it to have.

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_added
  • call_made
  • call_received
  • voicemail_left
  • meeting_booked
  • meeting_completed
  • sms_sent
  • linkedin_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://app.sagaris.ai/api/v1/mcp, so an agent can be pointed at a workspace without a second credential. It speaks Streamable HTTP in stateless JSON mode: one JSON-RPC message per POST, no batching, no SSE stream.

POST /api/v1/mcp serves 27 tools to a key holding every scope: 15 that only read and 12 that write (2 Social checklist tools for drafts and evidence, approval-bound; 10 LinkedIn command tools, gated). These tools use 8 of the platform's 13; OAuth sign-in grants 2. No CRM write is reachable over MCP. A key is offered only the tools its scopes allow, so a key with no scopes connects and sees none.

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.

Building an integration? Bring your use case.

Book a demo