# API

> The Sommatic AI REST API lets your systems design and publish workflows, start and follow runs, manage AI assets, resolve tasks and sync from Git. Base URL, groups and a first request.

Source: https://docs.sommatic.ai/en/api/ (updated 2026-11-26)

Everything you do in the Sommatic AI portal goes through this API: creating a workflow, publishing a version, calling a
webhook, reading a run node by node, completing a task. Your own systems can do the same with plain HTTP and JSON.

Diagram: A call over HTTP returns the same envelope every time, and a run started in async mode can be followed live over SSE.

## Base URL

```text
https://api.sommatic.ai
```

Every path in this reference is relative to it, for example
`https://api.sommatic.ai/workflow-orchestration/control-plane/flow-design/flow-definition/`.

## Groups

| Group                                                                                             | What you do with it                                                                                                                               |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Triggers](https://docs.sommatic.ai/en/api/reference/triggers.md)                                 | Call a workflow through a webhook or as a sub-workflow, and manage the ingress bindings that expose it.                                           |
| [Execution](https://docs.sommatic.ai/en/api/reference/execution.md)                               | Start a run, follow it live and read its instances, results and node executions.                                                                  |
| [Workflow design](https://docs.sommatic.ai/en/api/reference/workflow-design.md)                   | Create and edit flow definitions, publish, pause and resume them, read versions, deployments, triggers and the node catalog.                      |
| [Cognitive infrastructure](https://docs.sommatic.ai/en/api/reference/cognitive-infrastructure.md) | LLM providers, prompt templates, knowledge resources and their bindings, agent profiles, cognitive tools, memory stores and external datasources. |
| [Human in the loop](https://docs.sommatic.ai/en/api/reference/human-in-the-loop.md)               | Create, assign and transition tasks, and follow them in real time.                                                                                |
| [Projects](https://docs.sommatic.ai/en/api/reference/projects.md)                                 | Group the work of an organization in projects.                                                                                                    |
| [Credentials](https://docs.sommatic.ai/en/api/reference/credentials.md)                           | Store the credentials nodes use to reach external services.                                                                                       |
| [Git Sync](https://docs.sommatic.ai/en/api/reference/git-sync.md)                                 | Connect repositories, preview and apply a commit, export a resource as a file.                                                                    |
| [Conversations](https://docs.sommatic.ai/en/api/reference/conversations.md)                       | Turn a request in natural language into a Command Center plan.                                                                                    |

## Your first request

List the workflows of your organization:

**curl**

```bash
curl "https://api.sommatic.ai/workflow-orchestration/control-plane/flow-design/flow-definition/organization-id?search=$ORGANIZATION_ID&page=1&pageSize=25&exclude_status=deleted" \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
```

**JavaScript**

```javascript
const url = new URL(
  '/workflow-orchestration/control-plane/flow-design/flow-definition/organization-id',
  'https://api.sommatic.ai',
);
url.search = new URLSearchParams({ search: organizationId, page: '1', pageSize: '25', exclude_status: 'deleted' });

const response = await fetch(url, { headers: { Authorization: `Bearer ${token}` } });
const { success, message, result } = await response.json();
```

The answer always has the same shape:

```json
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "items": [{ "id": "wf-flow-definition-…", "name": "Inbound requests", "status": { "name": "active" } }],
    "totalItems": 1,
    "totalPages": 1,
    "currentPage": 1,
    "pageSize": 25
  }
}
```

> **Note: The API is in beta**
>
> The endpoints in this reference are the public surface. Their contracts may still change while the API is in beta;
> changes are reflected here and in the OpenAPI document.

## Machine-readable reference

The whole public API is available as OpenAPI 3 at `https://docs.sommatic.ai/openapi/sommatic.json`. Import it into
your HTTP client or generate a client from it.

## Next steps

- [Authentication](https://docs.sommatic.ai/en/api/authentication.md): Get a token and send it with each request.
- [Conventions](https://docs.sommatic.ai/en/api/conventions.md): The envelope, query selectors, pagination and organization scope.
- [Errors](https://docs.sommatic.ai/en/api/errors.md): How failures come back and how to handle them.
- [React SDK](https://docs.sommatic.ai/en/sdks.md): The same API from a React app.
