Собрать, опубликовать и привязать флоу

Создайте флоу, сохраните его черновик, проверьте и опубликуйте его, откатите его, дайте ему код операции и читайте его выполнения и аналитику.

Флоу — это граф узлов, который выполняет запрос: запрос называет код операции, и Slen проходит флоу, привязанный к этому коду. Операции этой страницы создают флоу, редактируют его черновик, проверяют и публикуют его, откатывают его, привязывают его к коду операции и читают его выполнения и аналитику. Консоль показывает те же флоу на AI-флоу; статьи AI-флоу и Публикация, версии и откат описывают их там.

Кто может менять флоу

Чтение флоу, его черновика, его версий и его выполнений требует разрешения management:read, а его аналитика — read. Всё, что меняет флоу, требует flows:write: создание и отправка в архив, сохранение черновика, публикация, откат и привязка кода операции.

Флоу принадлежит одному проекту. Ключ читает и меняет флоу своего проекта. Флоу другого проекта или несуществующий отвечает 404 с кодом flow_not_found.

Создать и отправить в архив

  • Флоу создаётся в проекте ключа, с именем до 120 символов. Его slug делается из имени, а slug, который в проекте уже есть, получает число в конце.

  • У нового флоу нет версии, которая выполняется: его status равен draft до первой публикации и active после неё.

  • status, равный archived, в обновлении останавливает флоу. На запрос с его кодом операции отвечают 404 с кодом flow_not_found, а его привязка и активная версия сохраняются. status, равный active, возвращает его таким, каким он был, и так же действует публикация.

Черновик и его ревизия

Флоу редактируется как черновик и выполняется как опубликованная версия. GET /v1/flows/{id}/draft отвечает графом, его version_number и draft_rev и настройками, с которыми эта установка проверяет графы, — среди них типы узлов, которых не может быть в новой версии. Флоу без черновика отвечает графом версии, которая выполняется, from_published, равным true, и base_version, который называет эту версию.

Сохранение отправляет обратно весь граф с прочитанным draft_rev.

  • draft_rev, который не текущий, отклоняется с 409 и кодом draft_conflict, и граф не записывается: кто-то сохранил в промежутке. Прочитайте черновик снова.

  • Тот, у кого граф на экране, отправляет и version_number, потому что каждый черновик считает ревизии с нуля. Первое сохранение флоу без черновика отправляет и base_version. Оба отклоняются с тем же 409, когда черновик уже не тот, который они называют.

  • Сохранение проверяет только форму графа. Что граф значит, оценивают проверка и публикация.

Проверить и опубликовать

  • POST /v1/flows/{id}/validate проверяет черновик, или версию, которая выполняется, когда черновика нет, и ничего не меняет. valid говорит, прошла бы публикация, issues перечисляет ошибки и предупреждения, а source говорит, какой граф проверен.

  • Публикация превращает черновик в следующую по номеру версию и делает её той, которую выполняют запросы. Черновик с ошибкой отклоняется с 422 и кодом flow_invalid, а error.details.issues перечисляет найденное. Предупреждение её не останавливает.

  • Флоу без черновика отвечает 404 с кодом flow_draft_not_found: публиковать нечего.

  • Сохранение или другая публикация, пришедшие, пока публикация готовится, отклоняют её с 409 и кодом draft_conflict, и ничего не публикуется. Публикация может назвать свой черновик через version_number и draft_rev, чтобы быть отклонённой так же, когда черновик сдвинулся с тех пор, как его прочитали.

  • Узел замороженного типа останавливает публикацию: проблема node_type_frozen называет узел, а params.type — его тип. HTTP-запрос заморожен, если сервис не настроен иначе. Версия, опубликованная с таким узлом, продолжает выполняться, и откат может к ней вернуться.

Статья Как устроен флоу перечисляет, что должно быть в каждом флоу. После публикации Slen отправляет событие вебхука flow.published.

Откатить

Откат снова делает выполняемой более раннюю опубликованную версию. С version_number он переходит к этой версии. Без него флоу переходит к опубликованной версии сразу под активной, поэтому повторные вызовы идут назад по истории.

  • Версия, которой у флоу не было, отвечает 404 с кодом flow_version_not_found, а черновик — 409 с кодом flow_version_not_published.

  • Если опубликованной версии под активной нет, ответ — 409 с кодом no_previous_version.

  • Версия, которая называет модель или пул провайдеров, исчезнувшие с тех пор, отклоняется с 422 и кодом flow_invalid.

Ответ — версия, которая выполняется теперь. Черновик остаётся как есть, и Slen отправляет событие вебхука flow.rolled_back.

Код операции

Запрос попадает во флоу через его код операции, и флоу отвечает на один код. Привязка заменяет код, который был у флоу: со следующего запроса на старый код отвечают 404 с кодом flow_not_found, и он свободен для другого флоу. Код, который есть у другого флоу проекта, отвечает 409 с кодом operation_already_bound, и флоу сохраняет свой код. Удаление привязки оставляет флоу без кода.

Выполнения и аналитика

  • Выполнения флоу перечисляются от новых к старым и читаются страница за страницей: с cursor или по номеру — page с limit отвечает ещё и total, а anchor, идентификатор, который ответила первая страница, не даёт следующим страницам сдвигаться, пока приходят новые выполнения. q находит одно выполнение по его полному идентификатору, только цифры; идентификатор выполнения другого флоу отвечает пустой страницей. status сужает список, а from и to сужают его до выполнений, начатых между ними. Любой конец можно отправить отдельно, а без них список идёт по всей истории. Значение со смещением — это момент, который оно называет; значение без смещения читается как UTC. path оставляет выполнения, прошедшие ровно одним маршрутом, — ключи узлов записи requests_by_path, соединённые через >, — и принимается только вместе с from и to.

  • Аналитика флоу по умолчанию — строка на каждый узел. С granularity=flow ответ — сводка флоу: его запросы, расходы и исходы за окно. Окно следует правилам отчёта — Аналитика: не больше 31 дня для строк узлов и 366 дней для сводки. Сводка считается по целым закрытым часам: window ответа заканчивается в начале текущего часа или раньше, пока последний час ещё сверяется. Каждая запись requests_by_path несёт, чем закончились её выполнения (status), и типы её узлов, а каждая запись cost_by_connection — пул, через который шли вызовы (pool_id).

Операции

Описания операций и полей приведены на английском.

Список флоу

GET /v1/flows

  • Разрешение: management:read

Параметры

ПараметрОписание
limit необязательно

queryinteger

Page size (default 30).

  • Минимум: 1
  • Максимум: 100
cursor необязательно

querystring

The meta.next_cursor of the previous page.

status необязательно

queryFlowStatus

  • Одно из: draft, active, archived
project необязательно

querystring

current narrows the list to the active project — an API key's own, a person's as switched on POST /api/auth/me/project — plus the organization's rows where the resource has them. A literal, never an id: anything else is 422. Without it the list is everything within the caller's reach.

  • Одно из: current

Ответы

200

One cursor page of flows

application/json
{
  "data": [
    {
      "flow_id": "74438200973594624",
      "organization_id": "74438200973594624",
      "project_id": "74438200973594624",
      "name": "string",
      "slug": "string",
      "status": "draft",
      "active_version": {
        "version_id": "74438200973594624",
        "version_number": 1,
        "status": "draft",
        "draft_rev": 1,
        "published_at": "2026-10-02T09:30:00Z",
        "published_by": "string",
        "published_by_user_id": "74438200973594624",
        "created_at": "2026-10-02T09:30:00Z"
      },
      "draft_version": {
        "version_id": "74438200973594624",
        "version_number": 1,
        "status": "draft",
        "draft_rev": 1,
        "published_at": "2026-10-02T09:30:00Z",
        "published_by": "string",
        "published_by_user_id": "74438200973594624",
        "created_at": "2026-10-02T09:30:00Z"
      },
      "operation_codes": [
        "string"
      ],
      "created_at": "2026-10-02T09:30:00Z",
      "updated_at": "2026-10-02T09:30:00Z"
    }
  ],
  "meta": {
    "limit": 1,
    "next_cursor": "string"
  }
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

422

Validation failure or a semantically impossible request. Field-level validation from the framework answers {"message", "errors"}; domain refusals answer the standard error envelope. An Idempotency-Key longer than 190 characters is invalid_request in that envelope.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Создать флоу

POST /v1/flows

  • Разрешение: flows:write

The flow is created in the caller's organization, in project_id when given — which must be a project of that organization the caller reaches, or 404 project_not_found and nothing is stored — else in the caller's active project.

The slug is derived from name and is unique inside the project: letters outside Latin are transliterated (Cyrillic, Ukrainian included — Первый флоу → pervyy-flou), every other run of non-alphanumerics becomes one hyphen, 120 characters at most, flow when nothing is left. An ASCII name gives the slug it always gave. A slug the project already uses gets the first free numeric suffix (support-answer-2, -3, …) instead of a refusal; 409 flow_slug_taken remains only for two creates racing for the same free slug — retrying succeeds.

Тело запроса

application/json
{
  "name": "string",
  "project_id": "74438200973594624"
}

Ответы

201

The created flow

application/json
{
  "data": {
    "flow_id": "74438200973594624",
    "organization_id": "74438200973594624",
    "project_id": "74438200973594624",
    "name": "string",
    "slug": "string",
    "status": "draft",
    "active_version": {
      "version_id": "74438200973594624",
      "version_number": 1,
      "status": "draft",
      "draft_rev": 1,
      "published_at": "2026-10-02T09:30:00Z",
      "published_by": "string",
      "published_by_user_id": "74438200973594624",
      "created_at": "2026-10-02T09:30:00Z"
    },
    "draft_version": {
      "version_id": "74438200973594624",
      "version_number": 1,
      "status": "draft",
      "draft_rev": 1,
      "published_at": "2026-10-02T09:30:00Z",
      "published_by": "string",
      "published_by_user_id": "74438200973594624",
      "created_at": "2026-10-02T09:30:00Z"
    },
    "operation_codes": [
      "string"
    ],
    "created_at": "2026-10-02T09:30:00Z",
    "updated_at": "2026-10-02T09:30:00Z"
  }
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

409

State conflict: idempotency clash, stale draft, illegal transition; the last owner of an organization (last_owner); the owned-organization limit (organization_limit_reached); an end customer with credit history that cannot be deleted (customer_has_history)

422

Validation failure or a semantically impossible request. Field-level validation from the framework answers {"message", "errors"}; domain refusals answer the standard error envelope. An Idempotency-Key longer than 190 characters is invalid_request in that envelope.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Флоу с активной версией и черновиком

GET /v1/flows/{id}

  • Разрешение: management:read

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624

Ответы

200

The flow

application/json
{
  "data": {
    "flow_id": "74438200973594624",
    "organization_id": "74438200973594624",
    "project_id": "74438200973594624",
    "name": "string",
    "slug": "string",
    "status": "draft",
    "active_version": {
      "version_id": "74438200973594624",
      "version_number": 1,
      "status": "draft",
      "draft_rev": 1,
      "published_at": "2026-10-02T09:30:00Z",
      "published_by": "string",
      "published_by_user_id": "74438200973594624",
      "created_at": "2026-10-02T09:30:00Z"
    },
    "draft_version": {
      "version_id": "74438200973594624",
      "version_number": 1,
      "status": "draft",
      "draft_rev": 1,
      "published_at": "2026-10-02T09:30:00Z",
      "published_by": "string",
      "published_by_user_id": "74438200973594624",
      "created_at": "2026-10-02T09:30:00Z"
    },
    "operation_codes": [
      "string"
    ],
    "created_at": "2026-10-02T09:30:00Z",
    "updated_at": "2026-10-02T09:30:00Z"
  }
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Переименовать флоу или отправить его в архив

PATCH /v1/flows/{id}

  • Разрешение: flows:write

An archived flow is not executed: POST /v1/operations/execute for its operation answers 404 flow_not_found. Its binding and its active version are kept, so status: active brings it back as it was, and a publish un-archives it as well. An execution parked before the flow was archived still resumes and finishes on its own version.

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624

Тело запроса

application/json
{
  "name": "string",
  "status": "active"
}

Ответы

200

The updated flow

application/json
{
  "data": {
    "flow_id": "74438200973594624",
    "organization_id": "74438200973594624",
    "project_id": "74438200973594624",
    "name": "string",
    "slug": "string",
    "status": "draft",
    "active_version": {
      "version_id": "74438200973594624",
      "version_number": 1,
      "status": "draft",
      "draft_rev": 1,
      "published_at": "2026-10-02T09:30:00Z",
      "published_by": "string",
      "published_by_user_id": "74438200973594624",
      "created_at": "2026-10-02T09:30:00Z"
    },
    "draft_version": {
      "version_id": "74438200973594624",
      "version_number": 1,
      "status": "draft",
      "draft_rev": 1,
      "published_at": "2026-10-02T09:30:00Z",
      "published_by": "string",
      "published_by_user_id": "74438200973594624",
      "created_at": "2026-10-02T09:30:00Z"
    },
    "operation_codes": [
      "string"
    ],
    "created_at": "2026-10-02T09:30:00Z",
    "updated_at": "2026-10-02T09:30:00Z"
  }
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

422

Validation failure or a semantically impossible request. Field-level validation from the framework answers {"message", "errors"}; domain refusals answer the standard error envelope. An Idempotency-Key longer than 190 characters is invalid_request in that envelope.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Черновик графа

GET /v1/flows/{id}/draft

  • Разрешение: management:read

Beside the graph and its revision, the settings this installation validates and runs graphs with (FlowBuilderSettings), for the builder to say.

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624

Ответы

200

The draft graph, its revision and the builder's settings

application/json
{
  "data": {
    "version_number": 1,
    "draft_rev": 1,
    "from_published": true,
    "base_version": 1,
    "graph": {
      "version": 1,
      "nodes": [
        {
          "key": "string",
          "type": "string",
          "label": "string",
          "config": {},
          "position": {
            "x": 1,
            "y": 1
          }
        }
      ],
      "edges": [
        {
          "key": "string",
          "source": "string",
          "source_port": "string",
          "target": "string",
          "label": "string"
        }
      ]
    },
    "settings": {
      "max_output_tokens": 1,
      "max_parked_hours": 1,
      "park_longest_wait_hours": 1,
      "frozen_node_types": [
        "sdk_request"
      ]
    }
  }
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Сохранить черновик графа

PUT /v1/flows/{id}/draft

  • Разрешение: flows:write

draft_rev is the optimistic-lock token read from the draft; a stale one is refused (409 draft_conflict).

draft_rev counts from zero in every draft, so alone it does not tell the draft of one version from the draft of the next. A caller that holds a graph on screen — the builder — also sends the version_number that GET /draft (or its last save) answered: when the draft is of another version — the one it read was published elsewhere and edited again — the save is refused with 409 draft_conflict even when the two revisions coincide, and the graph is not written. Without version_number only the revision is compared, as before.

A flow with no draft is edited from the version that runs, and a rollback replaces that graph without moving either number. The first save of such a flow therefore also names the base_version that GET /draft answered: when the working graph is read from another version by now, or is somebody's draft already, the save is refused with 409 draft_conflict. A refused save of a flow with no draft creates no draft. A caller that names no base is not held to one.

A pool_id in the graph that the caller does not reach is an unknown pool to validation (unknown_pool), exactly like one that does not exist. A pool_id that is not text — a number, a list, an object — is invalid_node_config with the detail ai_model_invalid_pool_id: the runtime routes through a named pool only for a non-empty string. A pool that is switched off is the warning pool_disabled: the graph can be saved and published, and every call of that node is refused provider_not_configured until the pool is enabled.

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624

Тело запроса

application/json
{
  "graph": {
    "version": 1,
    "nodes": [
      {
        "key": "string",
        "type": "string",
        "label": "string",
        "config": {},
        "position": {
          "x": 1,
          "y": 1
        }
      }
    ],
    "edges": [
      {
        "key": "string",
        "source": "string",
        "source_port": "string",
        "target": "string",
        "label": "string"
      }
    ]
  },
  "draft_rev": 1,
  "version_number": 1,
  "base_version": 1
}

Ответы

200

The draft version after the save

application/json
{
  "data": {
    "version_id": "74438200973594624",
    "version_number": 1,
    "status": "draft",
    "draft_rev": 1,
    "published_at": "2026-10-02T09:30:00Z",
    "published_by": "string",
    "published_by_user_id": "74438200973594624",
    "created_at": "2026-10-02T09:30:00Z"
  }
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

409

State conflict: idempotency clash, stale draft, illegal transition; the last owner of an organization (last_owner); the owned-organization limit (organization_limit_reached); an end customer with credit history that cannot be deleted (customer_has_history)

422

Validation failure or a semantically impossible request. Field-level validation from the framework answers {"message", "errors"}; domain refusals answer the standard error envelope. An Idempotency-Key longer than 190 characters is invalid_request in that envelope.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Проверить граф без публикации

POST /v1/flows/{id}/validate

  • Разрешение: management:read

Checks the draft when there is one and the version that runs otherwise — the active one, which after a rollback is not the latest published; source in the answer says which. 404 only when the flow has neither.

The body is optional. A caller that is looking at a graph — an editor with the draft on screen — sends back the version_number and draft_rev that GET /draft (or its last save) answered, and for a flow with no draft its base_version as well: when the working graph is no longer that one, the answer is 409 draft_conflict instead of a verdict about a graph the caller has not seen. Without the body whatever the server holds is checked.

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624

Тело запроса необязательно

application/json
{
  "version_number": 1,
  "draft_rev": 1,
  "base_version": 1
}

Ответы

200

Validation issues, if any

application/json
{
  "data": {
    "valid": true,
    "issues": [
      {
        "severity": "error",
        "code": "invalid_graph_shape",
        "message": "string",
        "node_key": "string",
        "edge_key": "string",
        "params": {
          "key": "string"
        }
      }
    ],
    "source": "draft"
  }
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

409

State conflict: idempotency clash, stale draft, illegal transition; the last owner of an organization (last_owner); the owned-organization limit (organization_limit_reached); an end customer with credit history that cannot be deleted (customer_has_history)

422

Validation failure or a semantically impossible request. Field-level validation from the framework answers {"message", "errors"}; domain refusals answer the standard error envelope. An Idempotency-Key longer than 190 characters is invalid_request in that envelope.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Опубликовать черновик

POST /v1/flows/{id}/publish

  • Разрешение: flows:write

The version is frozen at the draft revision that was validated and compiled. A draft save, or another publish of the same draft, that lands while this one is being prepared is 409 draft_conflict: nothing is published and no flow.published is sent — read the draft again and repeat the call. 404 flow_draft_not_found when the flow has no draft (it was already published and not edited since).

That check sees only what changes *during* the call. A save that landed before it — another tab, another member — is simply the draft, and it is what gets published. A caller that publishes the graph it is looking at sends the optional body: the version_number and draft_rev that GET /draft (or its last save) answered. When the draft is another version or at another revision the answer is the same 409 draft_conflict, before the graph is validated. A body with any other field, or with a value that is not such a number, is 422.

A draft that holds a node of a frozen type is refused like any other invalid graph: 422 flow_invalid that carries a node_type_frozen issue, with the node in node_key and the type in params.type. Which types are frozen is the deployment's setting; http_request is by default. The freeze is about new versions only: a version published with such a node keeps running, an execution parked on it resumes, and a rollback onto it works — but its graph cannot be published again until the node is taken out, and POST /validate says so (valid: false) for a flow whose running version holds one.

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624

Тело запроса необязательно

application/json
{
  "version_number": 1,
  "draft_rev": 1
}

Ответы

200

The published version and any warnings

application/json
{
  "data": {
    "version": {
      "version_id": "74438200973594624",
      "version_number": 1,
      "status": "draft",
      "draft_rev": 1,
      "published_at": "2026-10-02T09:30:00Z",
      "published_by": "string",
      "published_by_user_id": "74438200973594624",
      "created_at": "2026-10-02T09:30:00Z"
    },
    "warnings": [
      {
        "severity": "error",
        "code": "invalid_graph_shape",
        "message": "string",
        "node_key": "string",
        "edge_key": "string",
        "params": {
          "key": "string"
        }
      }
    ]
  }
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

409

State conflict: idempotency clash, stale draft, illegal transition; the last owner of an organization (last_owner); the owned-organization limit (organization_limit_reached); an end customer with credit history that cannot be deleted (customer_has_history)

422

The graph cannot be published. error.details.issues is the whole validation result of the draft, in the shape /validate answers (ValidationIssue): the errors that block the publish first, then the warnings found beside them — tell them apart by severity. The first item is always an error. A body that is not a FlowDraftExpectation — an unknown field, a value that is not such a number — is refused before the draft is read, in the framework's field-level {"message", "errors"} form

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Откатить к прежней опубликованной версии

POST /v1/flows/{id}/rollback

  • Разрешение: flows:write

Omitting version_number means the published version next below the live one, so repeated calls walk back through the history (version 5, then 4, then 3); going forward again is a rollback by number.

A draft somebody has begun is left alone. A flow with no draft is edited from the version that is live after the rollback.

The answer is the version that is live now — a FlowVersion, not the PublishResult of a publish: a rollback re-checks references only and has no warnings to report. The switch and its flow.rolled_back event are one transaction.

Refusals: 404 flow_version_not_found — the flow has no version of that number; 409 flow_version_not_published — the version named is a draft; 409 no_previous_version — no number was given and there is no published version earlier than the live one (or the flow has no live version). 422 is one of two things: a version_number that is not a positive integer (the field-level {"message", "errors"} answer), or flow_invalid in the error envelope with details.issues, as on a publish — a model or a pool the target version refers to is gone, so it can no longer run.

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624

Тело запроса необязательно

application/json
{
  "version_number": 1
}

Ответы

200

The version now active

application/json
{
  "data": {
    "version_id": "74438200973594624",
    "version_number": 1,
    "status": "draft",
    "draft_rev": 1,
    "published_at": "2026-10-02T09:30:00Z",
    "published_by": "string",
    "published_by_user_id": "74438200973594624",
    "created_at": "2026-10-02T09:30:00Z"
  }
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

409

State conflict: idempotency clash, stale draft, illegal transition; the last owner of an organization (last_owner); the owned-organization limit (organization_limit_reached); an end customer with credit history that cannot be deleted (customer_has_history)

422

Validation failure or a semantically impossible request. Field-level validation from the framework answers {"message", "errors"}; domain refusals answer the standard error envelope. An Idempotency-Key longer than 190 characters is invalid_request in that envelope.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Все версии флоу

GET /v1/flows/{id}/versions

  • Разрешение: management:read

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624

Ответы

200

Versions, newest first

application/json
{
  "data": [
    {
      "version_id": "74438200973594624",
      "version_number": 1,
      "status": "draft",
      "draft_rev": 1,
      "published_at": "2026-10-02T09:30:00Z",
      "published_by": "string",
      "published_by_user_id": "74438200973594624",
      "created_at": "2026-10-02T09:30:00Z",
      "published_by_name": "string"
    }
  ]
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Одна версия целиком — со своим графом

GET /v1/flows/{id}/versions/{version}

  • Разрешение: management:read

The version of the flow with this number: the summary GET /v1/flows/{id}/versions lists, plus the graph it froze, in the shape the draft endpoint uses. A number the flow never had is 404 flow_version_not_found; a flow out of reach is 404 flow_not_found.

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624
version обязательно

pathinteger

  • Минимум: 1

Ответы

200

The version with its graph, in the draft endpoint's shape

application/json
{
  "data": {
    "version_id": "74438200973594624",
    "version_number": 1,
    "status": "draft",
    "draft_rev": 1,
    "published_at": "2026-10-02T09:30:00Z",
    "published_by": "string",
    "published_by_user_id": "74438200973594624",
    "created_at": "2026-10-02T09:30:00Z",
    "graph": {
      "version": 1,
      "nodes": [
        {
          "key": "string",
          "type": "string",
          "label": "string",
          "config": {},
          "position": {
            "x": 1,
            "y": 1
          }
        }
      ],
      "edges": [
        {
          "key": "string",
          "source": "string",
          "source_port": "string",
          "target": "string",
          "label": "string"
        }
      ]
    }
  }
}

Ошибки

СтатусКодыКогда
404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

422

Validation failure or a semantically impossible request. Field-level validation from the framework answers {"message", "errors"}; domain refusals answer the standard error envelope. An Idempotency-Key longer than 190 characters is invalid_request in that envelope.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Привязать код операции к флоу

PUT /v1/flows/{id}/binding

  • Разрешение: flows:write

The binding is what POST /v1/operations/execute resolves by. A flow answers to one operation code: the PUT replaces the code the flow had, in one transaction. The previous code answers 404 flow_not_found to POST /v1/operations/execute from the next call and is free for another flow; the code the flow already has is answered as it is. 409 operation_already_bound — the code belongs to another flow of the project, and this flow keeps the code it had.

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624

Тело запроса

application/json
{
  "operation_code": "generate_email"
}

Ответы

200

The flow with its operation code

application/json
{
  "data": {
    "flow_id": "74438200973594624",
    "organization_id": "74438200973594624",
    "project_id": "74438200973594624",
    "name": "string",
    "slug": "string",
    "status": "draft",
    "active_version": {
      "version_id": "74438200973594624",
      "version_number": 1,
      "status": "draft",
      "draft_rev": 1,
      "published_at": "2026-10-02T09:30:00Z",
      "published_by": "string",
      "published_by_user_id": "74438200973594624",
      "created_at": "2026-10-02T09:30:00Z"
    },
    "draft_version": {
      "version_id": "74438200973594624",
      "version_number": 1,
      "status": "draft",
      "draft_rev": 1,
      "published_at": "2026-10-02T09:30:00Z",
      "published_by": "string",
      "published_by_user_id": "74438200973594624",
      "created_at": "2026-10-02T09:30:00Z"
    },
    "operation_codes": [
      "string"
    ],
    "created_at": "2026-10-02T09:30:00Z",
    "updated_at": "2026-10-02T09:30:00Z"
  }
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

409

State conflict: idempotency clash, stale draft, illegal transition; the last owner of an organization (last_owner); the owned-organization limit (organization_limit_reached); an end customer with credit history that cannot be deleted (customer_has_history)

422

Validation failure or a semantically impossible request. Field-level validation from the framework answers {"message", "errors"}; domain refusals answer the standard error envelope. An Idempotency-Key longer than 190 characters is invalid_request in that envelope.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Снять привязку операции

DELETE /v1/flows/{id}/binding

  • Разрешение: flows:write

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624

Ответы

204

Unbound

Без тела

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Запуски флоу

GET /v1/flows/{id}/executions

  • Разрешение: management:read

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624
limit необязательно

queryinteger

Page size (default 30).

  • Минимум: 1
  • Максимум: 100
cursor необязательно

querystring

The meta.next_cursor of the previous page.

page необязательно

queryinteger

The page number, from 1. Turns the list into its numbered form: the answer's meta is a PageMeta (with total) instead of a CursorMeta. Together with cursor it is a 422; without page the answer is the cursor page, unchanged. A page past the last one is an empty data with the same total.

  • Минимум: 1
  • Максимум: 10000
anchor необязательно

querystring

The meta.anchor of the first numbered page: only rows with an id at or below it are counted and paged, so rows written after the first page do not shift pages 2..N. Without it the newest matching row is the anchor, and the answer names it. Only with page (422 otherwise).

  • Шаблон: ^\d{1,20}$
status необязательно

queryExecutionStatus

  • Одно из: running, queued, waiting, completed, rejected, failed, uncertain
from необязательно

querystring

Only runs started at or after this moment. Either end may be given alone; there is no cap on the width and no default window — without either the list pages through the whole history. A value with an offset is the moment it names; one without is read as UTC. A value that is not a date is a field-validation 422.

  • Формат: date-time
to необязательно

querystring

Only runs started at or before this moment; see from.

  • Формат: date-time
q необязательно

querystring

Search by the full id of an execution — digits only, anything else is a field-validation 422. Found only among the runs of this flow in the caller's organization: the id of another flow's, project's or organization's run is an empty data (and total: 0), never a 404. Combines with status, from / to and page. An empty value is no search.

  • Шаблон: ^\d{1,20}$
path необязательно

querystring

Only the runs that walked exactly this path: the node keys in the order they were entered, joined by > — requests_by_path[].path of GET /v1/flows/{id}/analytics?granularity=flow joined the same way. Only together with from and to (without them a field-validation 422 on from / to), and read like the dashboard's hours: a run counts once it has finished, and to is exclusive. With the dashboard's window and the entry's status, the count is the entry's requests. Combines with every other filter and with page. The runs of the last 90 days are kept.

  • Шаблон: ^[a-z0-9_-]{1,64}(>[a-z0-9_-]{1,64})*$
  • Максимальная длина: 4000

Ответы

200

One page of executions — a cursor page, or a numbered one with page

application/json
{
  "data": [
    {
      "execution_id": "74438200973594624",
      "flow_id": "74438200973594624",
      "flow_version_id": "74438200973594624",
      "operation": "generate_email",
      "operation_id": "74438200973594624",
      "status": "running",
      "error_code": "string",
      "error_message": "string",
      "cost": {
        "estimated": "0.02700000",
        "actual": "0.02700000"
      },
      "cache": {
        "hit": true,
        "cached_at": "2026-10-02T09:30:00Z"
      },
      "started_at": "2026-10-02T09:30:00Z",
      "finished_at": "2026-10-02T09:30:00Z",
      "duration_ms": 1
    }
  ],
  "meta": {
    "limit": 1,
    "next_cursor": "string"
  }
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

422

Validation failure or a semantically impossible request. Field-level validation from the framework answers {"message", "errors"}; domain refusals answer the standard error envelope. An Idempotency-Key longer than 190 characters is invalid_request in that envelope.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Статистика по узлам или сводка флоу

GET /v1/flows/{id}/analytics

  • Разрешение: read

granularity=node (the default) reads the raw node executions of the window; granularity=flow reads the hourly rollup and answers the dashboard. The two shapes differ.

Параметры

ПараметрОписание
id обязательно

pathId

Snowflake identifier, as a string.

  • Шаблон: ^\d+$
  • Пример: 74438200973594624
from необязательно

querystring

Start of the window an analytics answer covers — a date the server can parse, ISO-8601 recommended (a value without an offset is read as UTC). Unlike the lists, each end is optional on its own and the window is never refused, only fitted (AnalyticsWindowResolver):

  • Формат: date-time
to необязательно

querystring

End of the window an analytics answer covers; now when absent. See from (WindowFrom) for how the window is fitted rather than refused.

  • Формат: date-time
granularity необязательно

querystring

  • Одно из: node, flow
  • По умолчанию: node

Ответы

200

Node rows or the flow dashboard, depending on granularity

application/json
{
  "data": [
    {
      "node_key": "string",
      "node_type": "string",
      "executions": 1,
      "failed": 1,
      "error_rate": "string",
      "cost": "0.02700000",
      "avg_duration_ms": 1,
      "p95_duration_ms": 1,
      "ports": {
        "key": 1
      },
      "saved_cost": "0.02700000"
    }
  ]
}

Ошибки

СтатусКодыКогда
401

No credential, or one that is not valid

403

Authenticated, but not allowed: scope (insufficient_scope), policy or tenant (not_a_member); a blocked end customer (customer_blocked); an act only a signed-in person may take (session_required); the role rule on members and invitations (member_forbidden, invite_forbidden); a write to the organization's own rows, or a read of the audit journal, by a caller that does not reach every project (project_access_restricted)

404

No such resource for this tenant. Somebody else's resource — and a resource of a project the caller does not reach — answers the same way on purpose: the two must not be distinguishable.

422

Validation failure or a semantically impossible request. Field-level validation from the framework answers {"message", "errors"}; domain refusals answer the standard error envelope. An Idempotency-Key longer than 190 characters is invalid_request in that envelope.

Заголовки

  • X-Request-Id

Тело каждой ошибки — конверт ошибки.

Примеры

Получить список флоу

Активные флоу проекта.

Terminal
curl "https://api.slen.ai/api/v1/flows?status=active" \
  -H "Authorization: Bearer $SLEN_API_KEY"
200 OK
{
  "data": [
    {
      "flow_id": "74438623450128384",
      "organization_id": "74438200973594112",
      "project_id": "74438200973594624",
      "name": "Follow-up email",
      "slug": "follow-up-email",
      "status": "active",
      "active_version": {
        "version_id": "74440987364098048",
        "version_number": 3,
        "status": "published",
        "draft_rev": 7,
        "published_at": "2026-10-01T15:40:22+00:00",
        "published_by": "74438344587730944",
        "published_by_user_id": null,
        "created_at": "2026-10-01T14:02:51+00:00"
      },
      "draft_version": null,
      "operation_codes": [
        "generate_email"
      ],
      "created_at": "2026-09-30T11:20:05+00:00",
      "updated_at": "2026-10-01T15:40:22+00:00"
    }
  ],
  "meta": {
    "limit": 30,
    "next_cursor": null
  }
}

Создать флоу

Новый флоу — в проекте ключа, и у него ещё нет версии.

Terminal
curl https://api.slen.ai/api/v1/flows \
  -H "Authorization: Bearer $SLEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support answer"
  }'
201 Created
{
  "data": {
    "flow_id": "74443519874433024",
    "organization_id": "74438200973594112",
    "project_id": "74438200973594624",
    "name": "Support answer",
    "slug": "support-answer",
    "status": "draft",
    "active_version": null,
    "draft_version": null,
    "operation_codes": [],
    "created_at": "2026-10-02T10:20:44+00:00",
    "updated_at": "2026-10-02T10:20:44+00:00"
  }
}

Прочитать флоу

Ответ — флоу с его активной версией и черновиком.

Terminal
curl https://api.slen.ai/api/v1/flows/74438623450128384 \
  -H "Authorization: Bearer $SLEN_API_KEY"
200 OK
{
  "data": {
    "flow_id": "74438623450128384",
    "organization_id": "74438200973594112",
    "project_id": "74438200973594624",
    "name": "Follow-up email",
    "slug": "follow-up-email",
    "status": "active",
    "active_version": {
      "version_id": "74440987364098048",
      "version_number": 3,
      "status": "published",
      "draft_rev": 7,
      "published_at": "2026-10-01T15:40:22+00:00",
      "published_by": "74438344587730944",
      "published_by_user_id": null,
      "created_at": "2026-10-01T14:02:51+00:00"
    },
    "draft_version": {
      "version_id": "74443540644626432",
      "version_number": 4,
      "status": "draft",
      "draft_rev": 2,
      "published_at": null,
      "published_by": null,
      "published_by_user_id": null,
      "created_at": "2026-10-02T10:25:13+00:00"
    },
    "operation_codes": [
      "generate_email"
    ],
    "created_at": "2026-09-30T11:20:05+00:00",
    "updated_at": "2026-10-02T10:31:09+00:00"
  }
}

Отправить флоу в архив

Запросы с кодом операции флоу отклоняются, пока он снова не станет активным.

Terminal
curl -X PATCH https://api.slen.ai/api/v1/flows/74438623450128384 \
  -H "Authorization: Bearer $SLEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "archived"
  }'
200 OK
{
  "data": {
    "flow_id": "74438623450128384",
    "organization_id": "74438200973594112",
    "project_id": "74438200973594624",
    "name": "Follow-up email",
    "slug": "follow-up-email",
    "status": "archived",
    "active_version": {
      "version_id": "74440987364098048",
      "version_number": 3,
      "status": "published",
      "draft_rev": 7,
      "published_at": "2026-10-01T15:40:22+00:00",
      "published_by": "74438344587730944",
      "published_by_user_id": null,
      "created_at": "2026-10-01T14:02:51+00:00"
    },
    "draft_version": null,
    "operation_codes": [
      "generate_email"
    ],
    "created_at": "2026-09-30T11:20:05+00:00",
    "updated_at": "2026-10-02T11:02:37+00:00"
  }
}

Прочитать черновик

Ответ несёт граф, два числа, которые сохранение отправляет обратно, и настройки конструктора.

Terminal
curl https://api.slen.ai/api/v1/flows/74438623450128384/draft \
  -H "Authorization: Bearer $SLEN_API_KEY"

Сохранить черновик

Граф из запроса, одного вызова модели и ответа, сохранённый на той ревизии, на которой его прочитали.

Terminal
curl -X PUT https://api.slen.ai/api/v1/flows/74438623450128384/draft \
  -H "Authorization: Bearer $SLEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "graph": {
      "version": 1,
      "nodes": [
        {
          "key": "request",
          "type": "sdk_request",
          "label": null,
          "config": {},
          "position": {
            "x": 0,
            "y": 0
          }
        },
        {
          "key": "model",
          "type": "ai_model",
          "label": null,
          "config": {
            "model": "gpt-4o-mini",
            "max_output_tokens": 400
          },
          "position": {
            "x": 280,
            "y": 0
          }
        },
        {
          "key": "answer",
          "type": "return_response",
          "label": null,
          "config": {},
          "position": {
            "x": 560,
            "y": 0
          }
        }
      ],
      "edges": [
        {
          "key": "request-model",
          "source": "request",
          "source_port": "default",
          "target": "model"
        },
        {
          "key": "model-answer",
          "source": "model",
          "source_port": "success",
          "target": "answer"
        }
      ]
    },
    "draft_rev": 2,
    "version_number": 4
  }'

Проверить черновик

Тело называет черновик на экране. Ответ говорит, прошла бы публикация, и перечисляет найденное.

Terminal
curl https://api.slen.ai/api/v1/flows/74438623450128384/validate \
  -H "Authorization: Bearer $SLEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "version_number": 4,
    "draft_rev": 3
  }'

Опубликовать черновик

Тело называет проверенный черновик. Сохранение, сделанное после этого, отклоняет публикацию.

Terminal
curl https://api.slen.ai/api/v1/flows/74438623450128384/publish \
  -H "Authorization: Bearer $SLEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "version_number": 4,
    "draft_rev": 3
  }'

Откатить

Без тела флоу возвращается к версии под активной.

Terminal
curl -X POST https://api.slen.ai/api/v1/flows/74438623450128384/rollback \
  -H "Authorization: Bearer $SLEN_API_KEY"

Получить список версий

Версии флоу, от новых к старым.

Terminal
curl https://api.slen.ai/api/v1/flows/74438623450128384/versions \
  -H "Authorization: Bearer $SLEN_API_KEY"

Прочитать одну версию

Ответ — версия с графом, который она заморозила, в форме черновика.

Terminal
curl https://api.slen.ai/api/v1/flows/74438623450128384/versions/3 \
  -H "Authorization: Bearer $SLEN_API_KEY"

Привязать код операции

Со следующего запроса generate_email выполняет этот флоу.

Terminal
curl -X PUT https://api.slen.ai/api/v1/flows/74438623450128384/binding \
  -H "Authorization: Bearer $SLEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operation_code": "generate_email"
  }'
200 OK
{
  "data": {
    "flow_id": "74438623450128384",
    "organization_id": "74438200973594112",
    "project_id": "74438200973594624",
    "name": "Follow-up email",
    "slug": "follow-up-email",
    "status": "active",
    "active_version": {
      "version_id": "74440987364098048",
      "version_number": 3,
      "status": "published",
      "draft_rev": 7,
      "published_at": "2026-10-01T15:40:22+00:00",
      "published_by": "74438344587730944",
      "published_by_user_id": null,
      "created_at": "2026-10-01T14:02:51+00:00"
    },
    "draft_version": null,
    "operation_codes": [
      "generate_email"
    ],
    "created_at": "2026-09-30T11:20:05+00:00",
    "updated_at": "2026-10-01T15:40:22+00:00"
  }
}

Удалить привязку

У ответа нет тела. На запрос со старым кодом отвечают 404.

Terminal
curl -X DELETE https://api.slen.ai/api/v1/flows/74438623450128384/binding \
  -H "Authorization: Bearer $SLEN_API_KEY"

204 No Content

Получить список выполнений

Первая страница из 25 выполнений флоу, начатых с утра 2 октября, которые закончились со статусом failed.

Terminal
curl "https://api.slen.ai/api/v1/flows/74438623450128384/executions?status=failed&from=2026-10-02T06%3A00%3A00Z&page=1&limit=25" \
  -H "Authorization: Bearer $SLEN_API_KEY"

Прочитать аналитику

Сводка флоу за последние семь дней.

Terminal
curl "https://api.slen.ai/api/v1/flows/74438623450128384/analytics?granularity=flow" \
  -H "Authorization: Bearer $SLEN_API_KEY"

Что читать дальше

Собрано из openapi b070e1f, sdk contract 5cc7055, php ae4a53b, node 84bc62d