curl --request PUT \
--url https://app.agentika.site/api/v1/workflow/{workflow_id}/status \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://app.agentika.site/api/v1/workflow/{workflow_id}/status"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://app.agentika.site/api/v1/workflow/{workflow_id}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.agentika.site/api/v1/workflow/{workflow_id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.agentika.site/api/v1/workflow/{workflow_id}/status"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.agentika.site/api/v1/workflow/{workflow_id}/status")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentika.site/api/v1/workflow/{workflow_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"workflow_definition": {},
"current_definition_id": 123,
"template_context_variables": {},
"call_disposition_codes": {
"disposition_codes": []
},
"target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
},
"total_runs": 123,
"workflow_configurations": {},
"version_number": 123,
"version_status": "<string>",
"workflow_uuid": "<string>",
"model_is_realtime": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Архивировать агента
Архивировать или восстановить голосового агента
curl --request PUT \
--url https://app.agentika.site/api/v1/workflow/{workflow_id}/status \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://app.agentika.site/api/v1/workflow/{workflow_id}/status"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://app.agentika.site/api/v1/workflow/{workflow_id}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.agentika.site/api/v1/workflow/{workflow_id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.agentika.site/api/v1/workflow/{workflow_id}/status"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.agentika.site/api/v1/workflow/{workflow_id}/status")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.agentika.site/api/v1/workflow/{workflow_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"workflow_definition": {},
"current_definition_id": 123,
"template_context_variables": {},
"call_disposition_codes": {
"disposition_codes": []
},
"target_actions": {
"actions": [
{
"id": "<string>",
"label": "<string>",
"function_names": [
"<string>"
]
}
]
},
"total_runs": 123,
"workflow_configurations": {},
"version_number": 123,
"version_status": "<string>",
"workflow_uuid": "<string>",
"model_is_realtime": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{"status": "archived"}, чтобы деактивировать агента, или {"status": "active"}, чтобы восстановить его. Архивированные агенты не принимают входящие звонки и API-триггеры, но их история и определение сохраняются. Архивный агент по-прежнему занимает место в лимите агентов тарифа (409 workflow_limit_reached при создании считает и архивных): чтобы освободить место, удалите агента.
Необязательный query-параметр if_wizard_incomplete=true (так делают «Назад к агентам», кнопка «Назад» браузера и пункт «Создать агента → Визард») архивирует агента, только если визард ещё не завершён. Проверка выполняется атомарно с обновлением: если визард уже завершён (в черновике или опубликованной версии есть отметка завершения) или после создания опубликована версия выше первой, агент не меняется и возвращается 409 с detail.code = "wizard_completed". Для {"status": "active"} параметр игнорируется.Query Parameters
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.
Response
Successful Response
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.