PUT
Update Workflow Status
Отправьте {"status": "archived"}, чтобы деактивировать агента, или {"status": "active"}, чтобы восстановить его. Архивированные агенты не принимают входящие звонки и API-триггеры, но их история и определение сохраняются. Архивный агент по-прежнему занимает место в лимите агентов тарифа (409 workflow_limit_reached при создании считает и архивных): чтобы освободить место, удалите агента. Необязательный query-параметр if_wizard_incomplete=true (так делают «Назад к агентам», кнопка «Назад» браузера и пункт «Создать агента → Визард») архивирует агента, только если визард ещё не завершён. Проверка выполняется атомарно с обновлением: если визард уже завершён (в черновике или опубликованной версии есть отметка завершения) или после создания опубликована версия выше первой, агент не меняется и возвращается 409 с detail.code = "wizard_completed". Для {"status": "active"} параметр игнорируется.

Headers

authorization
string | null
X-API-Key
string | null

Path Parameters

workflow_id
integer
required

Query Parameters

if_wizard_incomplete
boolean
default:false

Archive only a still-unfinished wizard draft (the wizard's «Выйти»). Checked atomically with the update, under the lock the wizard's finalize/publish takes: when the draft or the published version carries wizard.completed_at, or a version above the template's V1 is published, the workflow is left as is and 409 wizard_completed is returned. Applies to status: archived only; ignored for other statuses.

Body

application/json
status
enum<string>
required
Available options:
active,
archived

Response

Successful Response

id
integer
required
name
string
required
status
string
required
created_at
string<date-time>
required
workflow_definition
Workflow Definition · object
required
current_definition_id
integer | null
required
template_context_variables
Template Context Variables · object | null
call_disposition_codes
CallDispositionCodes · object | null
target_actions
TargetActionsConfig · object | null

The stored layer: {"actions": []} means explicitly off; the model itself is absent (NULL column) when the level inherits.

total_runs
integer | null
workflow_configurations
Workflow Configurations · object | null
version_number
integer | null
version_status
string | null
workflow_uuid
string | null
model_is_realtime
boolean | null

Whether the effective model of the returned workflow_configurations (draft if any, else published) is realtime — the runtime's resolution: the workflow's model_configuration_v2_override, else the organization's configuration with legacy model_overrides. A realtime model does not support conversation_start_policy wait_client / wait_then_greeting (saving that combination is 422 start_policy_unsupported_for_realtime). null: not computed by this endpoint, or the model configuration does not resolve.