agency-board
POST /v1/agency/boards/{boardId}/automations
Create a rule — when this happens, only if that, then do these.
Autenticação
Envie uma chave de API como um token bearer. Este endpoint não especifica uma permissão específica na documentação, portanto, conceda à sua chave o mínimo necessário e verifique a resposta em vez de assumir.
Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
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> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
boardId (path) | Uuid | Sim | Project board ID (UUIDv7). |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
name | string | Sim | — |
description | string | Não | — |
trigger | string | Sim | — |
trigger_config | object | Não | Per-trigger settings, e.g. `hours_before` for "due date approaching". |
conditions | BoardAutomationCondition[] | Não | ANDed. An empty list means the rule always matches its trigger. |
actions | BoardAutomationAction[] | Não | — |
status | string<enabled, disabled> | Não | — |
position | integer | Não | — |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | Uuid | Sim | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
board_id | Uuid | Sim | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Sim | — |
description | string | Não | — |
trigger | string | Sim | — |
trigger_config | object | Não | — |
conditions | BoardAutomationCondition[] | Não | — |
actions | BoardAutomationAction[] | Não | — |
status | BoardAutomationStatus | Sim | `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 | Não | — |
run_count | integer | Não | — |
fired_count | integer | Não | — |
consecutive_failures | integer | Não | — |
suspended_reason | string | Não | 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 | Não | — |
last_fired_at | string | Não | — |
last_run_at | string | Não | — |
next_due_at | string | Não | Only set for a wall-clock rule. Null for a rule on a live act. |
created_at | string | Não | — |
updated_at | string | Não | — |
Erros que este endpoint pode retornar
401 · 403 · 404 · 422