agency-board
POST /v1/agency/boards/{boardId}/automations
Create a rule — when this happens, only if that, then do these.
Упълномощаване
Изпратете API ключ като носител (bearer token). Тази точка за достъп не указва конкретно разрешение в спецификацията, затова дайте на ключа си най-малкото необходимо и проверете отговора, вместо да правите предположения.
Този ендпойнт не изисква идентификатор на организация. Вашият ключ вече идентифицира организацията, към която принадлежи, и отговорът е ограничен до нея.
Опитайте
Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.
curl -X POST https://api.zinndigital.com/v1/agency/boards/{boardId}/automations \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "trigger": <string> }'Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата
Детайли
Validated against the catalogue at save time, not at run time. A rule pairing a card action with a trigger that carries no card, naming a context field its trigger does not publish, or using an operator the field's type cannot take is refused here with the offending clause named — because the alternative is a rule that sits in the list looking enabled and does nothing for ever, whose only evidence is an absence.
Параметри
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
boardId (path) | Uuid | Да | Project board ID (UUIDv7). |
Тяло на заявката
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
name | string | Да | — |
description | string | Не | — |
trigger | string | Да | — |
trigger_config | object | Не | Per-trigger settings, e.g. `hours_before` for "due date approaching". |
conditions | BoardAutomationCondition[] | Не | ANDed. An empty list means the rule always matches its trigger. |
actions | BoardAutomationAction[] | Не | — |
status | string<enabled, disabled> | Не | — |
position | integer | Не | — |
Отговор
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
id | Uuid | Да | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
board_id | Uuid | Да | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Да | — |
description | string | Не | — |
trigger | string | Да | — |
trigger_config | object | Не | — |
conditions | BoardAutomationCondition[] | Не | — |
actions | BoardAutomationAction[] | Не | — |
status | BoardAutomationStatus | Да | `suspended` means WE paused it after repeated failure and it carries a reason the customer has not read. It is a third state rather than a reuse of `disabled`, because collapsin… |
position | integer | Не | — |
run_count | integer | Не | — |
fired_count | integer | Не | — |
consecutive_failures | integer | Не | — |
suspended_reason | string | Не | Why we paused this rule, in authored copy from a closed table — never an exception, a status or a message from our own code. The per-failure detail lives on each run (`action_re… |
suspended_at | string | Не | — |
last_fired_at | string | Не | — |
last_run_at | string | Не | — |
next_due_at | string | Не | Only set for a wall-clock rule. Null for a rule on a live act. |
created_at | string | Не | — |
updated_at | string | Не | — |
Грешки, които този крайpoint може да върне
401 · 403 · 404 · 422