DevelopersSDKs
SDKs
There is no official SAGARIS client library, in any language. We would rather say that plainly than ship a thin wrapper we cannot keep current. What we do publish is a machine-readable description of the whole API, which you can generate a client from, and this page is about the parts of that generated client you will still need to finish yourself.
The OpenAPI document
GET /api/v1/openapi.json returns an OpenAPI 3.1 description of the public API. It needs no authentication, because it is documentation. Point a generator, an API client such as Postman, or a docs viewer at it.
- All nine operations, each carrying the single scope it requires, so a generated client can surface a permissions error before you deploy it.
- Nine response schemas: the error envelope, the list meta block, and one each for contact, activity, deal, sequence, enrollment and suppression.
- The Idempotency-Key header on all seven write operations, so a generated client exposes it as a parameter rather than leaving you to add headers by hand.
- The bearer security scheme, so generated clients know to send Authorization rather than a query parameter.
A drift-guard test holds the document's operation list equal to the actual route files, so an endpoint cannot be added, renamed or removed without the document following in the same change. The operations it lists are the operations that exist.
What a generated client will not do for you
Generation gets you types and method signatures. These four things it will get wrong or omit, and all four are worth handling before you go to production.
- Set the base URL
- The document declares its server as the relative path /api/v1, not an absolute origin. A generated client will have no host baked in, so point it at https://www.sagaris.ai/api/v1 yourself.
- Do not trust the error list as complete
- The document is honest about 400, 401, 403, 404, 409, 429, 500 and 503, but two real refusals are missing from it: a 402 when the workspace is read-only for a billing reason, and a 423 when enrollment is blocked by the workspace outreach pause. Both can happen. If your generated client models errors as a closed set, add these two, or an unexpected 402 will surface as a parsing failure rather than as the billing problem it is.
- Branch on the code, not the status
- 429 means two unrelated things, a throughput limit and a plan cap, and only one of them is worth retrying. Generated clients typically retry on status alone. Read the code field before you retry anything.
- Webhook verification is not in here
- The document describes requests you make to us. Verifying the HMAC signature on deliveries we make to you is not part of the REST surface and no generator will produce it. That code is on the Webhooks page.
One practical note before you pick a tool: this is a 3.1 document, and generator support for 3.1 still lags 3.0 in places. Check that yours reads 3.1 rather than silently degrading.
Calling it without a client at all
The API is small enough that a generated client is genuinely optional. Nine operations, one credential, one header, and a response envelope with the same two fields on every path. For most integrations a few functions around your language's HTTP library will be less code than the generated client, and easier to reason about when something is refused.
If the client is an AI agent
If what you are building is an agent rather than an integration, skip the client entirely. SAGARIS serves a Model Context Protocol endpoint at /api/v1/mcp that takes the same API key, so an MCP-capable agent can be pointed at a workspace without any generated code.
That surface is read-only, and structurally rather than by policy: its tool list is derived from the same operations filtered to GET, so no write endpoint can appear on it. An agent can look at a workspace through MCP; it cannot change one. Writes go through the REST API, with a key you scoped deliberately.
Behaviour on this page is read from
- src/lib/public-api/openapi-spec.ts
- src/app/api/v1/openapi.json/route.ts
- src/lib/public-api/openapi-spec.test.ts
- src/lib/billing/api-write-gate.ts
- src/app/api/v1/sequences/enroll/route.ts
- src/lib/mcp/tool-surface.ts
- src/app/api/v1/mcp/route.ts
Was this page helpful?