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, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в 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 | Нет | — |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 422