Перейти к основному содержанию
POST
Create automation

Авторизации

Authorization
string
header
обязательно

API token from the Zenedu dashboard

Параметры пути

bot
integer
обязательно

Bot ID

Тело

application/json
when_event
string
обязательно

Event name from the catalog

then_action
string
обязательно

Action name from the catalog

when_payload
object | null

Target fields for the event (see the catalog)

then_payload
object | null

Target fields for the action (see the catalog)

conditions
object[] | null

Optional conditions. The tag condition takes a tag id from GET /api/v1/bot/{bot}/tags or no_tags; any other value returns 422 (conditions.N.params.tag).

Ответ

Automation created

data
object