On this page
Sommatic Docs
Open portal

Conventions

The rules every endpoint follows - the response envelope, the queryselector segment of reads, pagination, writes and deletes, ids, timestamps and organization scope.

View as Markdown
Open in

Learn these rules once and every group of the API reads the same way: how a response is wrapped, how to ask for one record or a page of them, how to write, and how your organization limits what you see.

The envelope

Every JSON response, success or failure, has the same four fields:

JSON
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {}
}
FieldMeaning
statusThe HTTP status code, repeated in the body.
successtrue when the operation did what you asked. Check it before reading result.
messageA human-readable summary; on failure, the reason.
resultThe data: a record, a page of records, or null on failure.

Reads: the :queryselector segment

Reads are GET requests whose last path segment says how you are asking. The value you search for goes in the search query parameter:

SelectorReturnsExample
idThe record with that id.GET /work-management/task/id?search=task-…
organization-idThe records of one organization, paginated.GET /project/management/organization-id?search=<organization id>&page=1&pageSize=25
allEvery record you can see, paginated and filtered by status.GET /workflow-orchestration/control-plane/flow-design/flow-definition/all?page=2

Some resources add their own selectors, for example flow-definition-id on flow versions, inbox on tasks or statuses on several resources, which returns the statuses a record can have. Each endpoint of the API reference lists the selectors it accepts. An unknown selector fails with “Provide a valid slug to query”.

Filter by status with include_status and exclude_status, each a comma-separated list of status names, for example exclude_status=deleted.

Pagination

Paginated reads take page (from 1) and pageSize (25 by default) and answer:

JSON
{
  "items": [],
  "totalItems": 42,
  "totalPages": 2,
  "currentPage": 1,
  "pageSize": 25
}

Request the next page until currentPage equals totalPages.

Writes

OperationRequestBody
CreatePOST <resource>/The new record. Sommatic AI assigns the id.
UpdatePATCH <resource>/The id and the fields to change.
DeleteDELETE <resource>/{ "id": "…" }

A delete changes the record’s status to deleted instead of erasing it, so its history and the runs that used it stay traceable. Reads still return deleted records unless you pass exclude_status=deleted.

Actions that are not plain edits have their own path, for example POST /workflow-orchestration/control-plane/flow-design/flow-definition/:id/publish or PATCH /work-management/task/transition/.

Ids and timestamps

  • Ids are strings generated by Sommatic AI with a prefix that names the entity: task-…, wf-flow-definition-…. Treat them as opaque: store and send them back as they are, never build them.
  • Timestamps are Unix epoch milliseconds written as strings, such as "1761830100000". Records carry created.timestamp and modified.timestamp.
  • Status is an object, not a string: { "name": "active", "title": "Active", … }. Filters use its name.

Organization scope

Everything in Sommatic AI belongs to an organization, and your token is issued for one. Send organization_id in the body of what you create, and read with the organization-id selector (or the organization_id parameter where an endpoint asks for it) so you only get your organization’s records.

Next steps

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs