Automations API
Workflows triggered by events, their versions and runs.
11 operations. Guide: Automate email from events. Requests and responses are JSON with snake_case fields; authenticate with Authorization: Bearer <api key>. The examples assume a client built as in SDKs and the command line.
Create an automation (draft)
POST /v1/automations
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | 1 to 200 characters. |
definition | object | yes | |
definition. | object | yes | |
definition. | "custom_event" | yes | |
definition. | string | yes | 1 to 100 characters. |
definition. | "contact_created" | yes | |
definition. | "contact_updated" | yes | |
definition. | array of string | no | |
definition. | "topic_subscribed" | yes | |
definition. | string | yes | A UUID. |
definition. | "segment_entered" | yes | |
definition. | string | yes | A UUID. |
definition. | "email_event" | yes | |
definition. | one of "email.sent", "email.scheduled", "email.delivered", "email.delivery_delayed", "email.complained", "email.bounced", "email.opened", "email.clicked", "email.received", "email.failed", "email.suppressed", "email.canceled", … | yes | |
definition. | object | no | |
definition. | string | yes | |
definition. | string | yes | |
definition. | object or null | no | Default null. |
definition. | array of object | yes | At most 50 items. |
definition. | string | yes | At most 120 characters. |
definition. | one of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", … | yes | |
definition. | string or number or boolean or array of string or null | no | |
definition. | array of object | yes | At most 50 items. |
definition. | string | yes | At most 120 characters. |
definition. | one of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", … | yes | |
definition. | string or number or boolean or array of string or null | no | |
definition. | boolean | no | Default false. |
definition. | string | yes | 1 to 50 characters. |
definition. | array of object | yes | At most 100 items. |
definition. | string | yes | 1 to 50 characters. |
definition. | "send_email" | yes | |
definition. | string | yes | 1 to 100 characters. |
definition. | map of string or number or boolean | no | |
definition. | string | no | At most 320 characters. |
definition. | string | no | At most 998 characters. |
definition. | string | no | At most 320 characters. |
definition. | one of "transactional", "marketing" | no | |
definition. | string or null | no | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "wait" | yes | |
definition. | object | yes | |
definition. | integer | yes | |
definition. | one of "minutes", "hours", "days" | yes | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "wait_for_event" | yes | |
definition. | one of "email.opened", "email.clicked", "custom_event" | yes | |
definition. | string | no | 1 to 100 characters. |
definition. | object | yes | |
definition. | integer | yes | |
definition. | one of "minutes", "hours", "days" | yes | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "branch" | yes | |
definition. | object | no | |
definition. | array of object | yes | At most 50 items. |
definition. | array of object | yes | At most 50 items. |
definition. | object | no | |
definition. | one of "email.opened", "email.clicked" | yes | |
definition. | string or null | no | 1 to 50 characters. Default null. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "update_contact" | yes | |
definition. | string or null | no | At most 200 characters. |
definition. | string or null | no | At most 200 characters. |
definition. | boolean | no | |
definition. | map of string or number or boolean or null | no | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "segment" | yes | |
definition. | one of "add", "remove" | yes | |
definition. | string | yes | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "topic" | yes | |
definition. | one of "subscribe", "unsubscribe" | yes | |
definition. | string | yes | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "delete_contact" | yes | |
definition. | string | yes | 1 to 50 characters. |
definition. | "exit" | yes |
Response
201 Created: Automation.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "automation" | yes | |
project_id | string | yes | A UUID. |
name | string | yes | |
status | one of "draft", "active", "paused", "archived" | yes | |
current_version | integer | yes | |
published_version | integer or null | yes | |
trigger | object | yes | |
trigger (shape 1). | "custom_event" | yes | |
trigger (shape 1). | string | yes | 1 to 100 characters. |
trigger (shape 2). | "contact_created" | yes | |
trigger (shape 3). | "contact_updated" | yes | |
trigger (shape 3). | array of string | no | |
trigger (shape 4). | "topic_subscribed" | yes | |
trigger (shape 4). | string | yes | A UUID. |
trigger (shape 5). | "segment_entered" | yes | |
trigger (shape 5). | string | yes | A UUID. |
trigger (shape 6). | "email_event" | yes | |
trigger (shape 6). | one of "email.sent", "email.scheduled", "email.delivered", "email.delivery_delayed", "email.complained", "email.bounced", "email.opened", "email.clicked", "email.received", "email.failed", "email.suppressed", "email.canceled", … | yes | |
trigger (shape 6). | object | no | |
trigger (shape 6). | string | yes | |
trigger (shape 6). | string | yes | |
definition | object | yes | |
definition. | object | yes | |
definition. | "custom_event" | yes | |
definition. | string | yes | 1 to 100 characters. |
definition. | "contact_created" | yes | |
definition. | "contact_updated" | yes | |
definition. | array of string | no | |
definition. | "topic_subscribed" | yes | |
definition. | string | yes | A UUID. |
definition. | "segment_entered" | yes | |
definition. | string | yes | A UUID. |
definition. | "email_event" | yes | |
definition. | one of "email.sent", "email.scheduled", "email.delivered", "email.delivery_delayed", "email.complained", "email.bounced", "email.opened", "email.clicked", "email.received", "email.failed", "email.suppressed", "email.canceled", … | yes | |
definition. | object | no | |
definition. | string | yes | |
definition. | string | yes | |
definition. | object or null | no | Default null. |
definition. | array of object | yes | At most 50 items. |
definition. | string | yes | At most 120 characters. |
definition. | one of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", … | yes | |
definition. | string or number or boolean or array of string or null | no | |
definition. | array of object | yes | At most 50 items. |
definition. | string | yes | At most 120 characters. |
definition. | one of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", … | yes | |
definition. | string or number or boolean or array of string or null | no | |
definition. | boolean | no | Default false. |
definition. | string | yes | 1 to 50 characters. |
definition. | array of object | yes | At most 100 items. |
definition. | string | yes | 1 to 50 characters. |
definition. | "send_email" | yes | |
definition. | string | yes | 1 to 100 characters. |
definition. | map of string or number or boolean | no | |
definition. | string | no | At most 320 characters. |
definition. | string | no | At most 998 characters. |
definition. | string | no | At most 320 characters. |
definition. | one of "transactional", "marketing" | no | |
definition. | string or null | no | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "wait" | yes | |
definition. | object | yes | |
definition. | integer | yes | |
definition. | one of "minutes", "hours", "days" | yes | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "wait_for_event" | yes | |
definition. | one of "email.opened", "email.clicked", "custom_event" | yes | |
definition. | string | no | 1 to 100 characters. |
definition. | object | yes | |
definition. | integer | yes | |
definition. | one of "minutes", "hours", "days" | yes | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "branch" | yes | |
definition. | object | no | |
definition. | array of object | yes | At most 50 items. |
definition. | array of object | yes | At most 50 items. |
definition. | object | no | |
definition. | one of "email.opened", "email.clicked" | yes | |
definition. | string or null | no | 1 to 50 characters. Default null. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "update_contact" | yes | |
definition. | string or null | no | At most 200 characters. |
definition. | string or null | no | At most 200 characters. |
definition. | boolean | no | |
definition. | map of string or number or boolean or null | no | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "segment" | yes | |
definition. | one of "add", "remove" | yes | |
definition. | string | yes | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "topic" | yes | |
definition. | one of "subscribe", "unsubscribe" | yes | |
definition. | string | yes | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "delete_contact" | yes | |
definition. | string | yes | 1 to 50 characters. |
definition. | "exit" | yes | |
stats | object | yes | |
stats. | integer | yes | |
stats. | integer | yes | |
stats. | integer | yes | |
stats. | integer | yes | |
created_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
updated_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl -X POST https://api.minket.com/v1/automations \
-H "Authorization: Bearer $MINKET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Welcome","definition":{"trigger":{"kind":"contact_created"},"start":"wait","steps":[{"id":"wait","type":"wait","duration":{"amount":1,"unit":"days"},"next":"welcome"},{"id":"welcome","type":"send_email","template_id":"019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b","next":null}]}}'const result = await minket.automations.create({
name: "Welcome",
definition: {
trigger: {
kind: "contact_created"
},
start: "wait",
steps: [
{
id: "wait",
type: "wait",
duration: {
amount: 1,
unit: "days"
},
next: "welcome"
},
{
id: "welcome",
type: "send_email",
template_id: "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b",
next: null
}
]
}
});minket api createAutomation --body '{"name":"Welcome","definition":{"trigger":{"kind":"contact_created"},"start":"wait","steps":[{"id":"wait","type":"wait","duration":{"amount":1,"unit":"days"},"next":"welcome"},{"id":"welcome","type":"send_email","template_id":"019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b","next":null}]}}'from minket.api.automations import create_automation
from minket.models import CreateAutomationBody
result = create_automation.sync(client=client, body=CreateAutomationBody.from_dict({"name":"Welcome","definition":{"trigger":{"kind":"contact_created"},"start":"wait","steps":[{"id":"wait","type":"wait","duration":{"amount":1,"unit":"days"},"next":"welcome"},{"id":"welcome","type":"send_email","template_id":"019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b","next":null}]}}))var body minket.CreateAutomationJSONRequestBody
res, err := client.CreateAutomationWithResponse(ctx, body)List automations
GET /v1/automations
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | no | Default 20. |
after | query | string | no | A UUID. |
before | query | string | no | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
object | "list" | yes | |
data | array of object | yes | |
data[]. | string | yes | A UUID. |
data[]. | "automation" | yes | |
data[]. | string | yes | A UUID. |
data[]. | string | yes | |
data[]. | one of "draft", "active", "paused", "archived" | yes | |
data[]. | integer | yes | |
data[]. | integer or null | yes | |
data[]. | object | yes | |
data[]. | "custom_event" | yes | |
data[]. | string | yes | 1 to 100 characters. |
data[]. | "contact_created" | yes | |
data[]. | "contact_updated" | yes | |
data[]. | array of string | no | |
data[]. | "topic_subscribed" | yes | |
data[]. | string | yes | A UUID. |
data[]. | "segment_entered" | yes | |
data[]. | string | yes | A UUID. |
data[]. | "email_event" | yes | |
data[]. | one of "email.sent", "email.scheduled", "email.delivered", "email.delivery_delayed", "email.complained", "email.bounced", "email.opened", "email.clicked", "email.received", "email.failed", "email.suppressed", "email.canceled", … | yes | |
data[]. | object | no | |
data[]. | string | yes | |
data[]. | string | yes | |
data[]. | object | yes | |
data[]. | integer | yes | |
data[]. | integer | yes | |
data[]. | integer | yes | |
data[]. | integer | yes | |
data[]. | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
data[]. | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
has_more | boolean | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl https://api.minket.com/v1/automations \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.automations.list();minket api listAutomationsfrom minket.api.automations import list_automations
result = list_automations.sync(client=client)res, err := client.ListAutomationsWithResponse(ctx, &minket.ListAutomationsParams{})Get an automation with its current definition
GET /v1/automations/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
Response
200 Success: Automation.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "automation" | yes | |
project_id | string | yes | A UUID. |
name | string | yes | |
status | one of "draft", "active", "paused", "archived" | yes | |
current_version | integer | yes | |
published_version | integer or null | yes | |
trigger | object | yes | |
trigger (shape 1). | "custom_event" | yes | |
trigger (shape 1). | string | yes | 1 to 100 characters. |
trigger (shape 2). | "contact_created" | yes | |
trigger (shape 3). | "contact_updated" | yes | |
trigger (shape 3). | array of string | no | |
trigger (shape 4). | "topic_subscribed" | yes | |
trigger (shape 4). | string | yes | A UUID. |
trigger (shape 5). | "segment_entered" | yes | |
trigger (shape 5). | string | yes | A UUID. |
trigger (shape 6). | "email_event" | yes | |
trigger (shape 6). | one of "email.sent", "email.scheduled", "email.delivered", "email.delivery_delayed", "email.complained", "email.bounced", "email.opened", "email.clicked", "email.received", "email.failed", "email.suppressed", "email.canceled", … | yes | |
trigger (shape 6). | object | no | |
trigger (shape 6). | string | yes | |
trigger (shape 6). | string | yes | |
definition | object | yes | |
definition. | object | yes | |
definition. | "custom_event" | yes | |
definition. | string | yes | 1 to 100 characters. |
definition. | "contact_created" | yes | |
definition. | "contact_updated" | yes | |
definition. | array of string | no | |
definition. | "topic_subscribed" | yes | |
definition. | string | yes | A UUID. |
definition. | "segment_entered" | yes | |
definition. | string | yes | A UUID. |
definition. | "email_event" | yes | |
definition. | one of "email.sent", "email.scheduled", "email.delivered", "email.delivery_delayed", "email.complained", "email.bounced", "email.opened", "email.clicked", "email.received", "email.failed", "email.suppressed", "email.canceled", … | yes | |
definition. | object | no | |
definition. | string | yes | |
definition. | string | yes | |
definition. | object or null | no | Default null. |
definition. | array of object | yes | At most 50 items. |
definition. | string | yes | At most 120 characters. |
definition. | one of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", … | yes | |
definition. | string or number or boolean or array of string or null | no | |
definition. | array of object | yes | At most 50 items. |
definition. | string | yes | At most 120 characters. |
definition. | one of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", … | yes | |
definition. | string or number or boolean or array of string or null | no | |
definition. | boolean | no | Default false. |
definition. | string | yes | 1 to 50 characters. |
definition. | array of object | yes | At most 100 items. |
definition. | string | yes | 1 to 50 characters. |
definition. | "send_email" | yes | |
definition. | string | yes | 1 to 100 characters. |
definition. | map of string or number or boolean | no | |
definition. | string | no | At most 320 characters. |
definition. | string | no | At most 998 characters. |
definition. | string | no | At most 320 characters. |
definition. | one of "transactional", "marketing" | no | |
definition. | string or null | no | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "wait" | yes | |
definition. | object | yes | |
definition. | integer | yes | |
definition. | one of "minutes", "hours", "days" | yes | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "wait_for_event" | yes | |
definition. | one of "email.opened", "email.clicked", "custom_event" | yes | |
definition. | string | no | 1 to 100 characters. |
definition. | object | yes | |
definition. | integer | yes | |
definition. | one of "minutes", "hours", "days" | yes | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "branch" | yes | |
definition. | object | no | |
definition. | array of object | yes | At most 50 items. |
definition. | array of object | yes | At most 50 items. |
definition. | object | no | |
definition. | one of "email.opened", "email.clicked" | yes | |
definition. | string or null | no | 1 to 50 characters. Default null. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "update_contact" | yes | |
definition. | string or null | no | At most 200 characters. |
definition. | string or null | no | At most 200 characters. |
definition. | boolean | no | |
definition. | map of string or number or boolean or null | no | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "segment" | yes | |
definition. | one of "add", "remove" | yes | |
definition. | string | yes | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "topic" | yes | |
definition. | one of "subscribe", "unsubscribe" | yes | |
definition. | string | yes | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "delete_contact" | yes | |
definition. | string | yes | 1 to 50 characters. |
definition. | "exit" | yes | |
stats | object | yes | |
stats. | integer | yes | |
stats. | integer | yes | |
stats. | integer | yes | |
stats. | integer | yes | |
created_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
updated_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl https://api.minket.com/v1/automations/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.automations.get("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api getAutomation 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.automations import get_automation
result = get_automation.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.GetAutomationWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b")Update an automation
PATCH /v1/automations/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | 1 to 200 characters. |
definition | object | no | |
definition. | object | yes | |
definition. | "custom_event" | yes | |
definition. | string | yes | 1 to 100 characters. |
definition. | "contact_created" | yes | |
definition. | "contact_updated" | yes | |
definition. | array of string | no | |
definition. | "topic_subscribed" | yes | |
definition. | string | yes | A UUID. |
definition. | "segment_entered" | yes | |
definition. | string | yes | A UUID. |
definition. | "email_event" | yes | |
definition. | one of "email.sent", "email.scheduled", "email.delivered", "email.delivery_delayed", "email.complained", "email.bounced", "email.opened", "email.clicked", "email.received", "email.failed", "email.suppressed", "email.canceled", … | yes | |
definition. | object | no | |
definition. | string | yes | |
definition. | string | yes | |
definition. | object or null | no | Default null. |
definition. | array of object | yes | At most 50 items. |
definition. | string | yes | At most 120 characters. |
definition. | one of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", … | yes | |
definition. | string or number or boolean or array of string or null | no | |
definition. | array of object | yes | At most 50 items. |
definition. | string | yes | At most 120 characters. |
definition. | one of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", … | yes | |
definition. | string or number or boolean or array of string or null | no | |
definition. | boolean | no | Default false. |
definition. | string | yes | 1 to 50 characters. |
definition. | array of object | yes | At most 100 items. |
definition. | string | yes | 1 to 50 characters. |
definition. | "send_email" | yes | |
definition. | string | yes | 1 to 100 characters. |
definition. | map of string or number or boolean | no | |
definition. | string | no | At most 320 characters. |
definition. | string | no | At most 998 characters. |
definition. | string | no | At most 320 characters. |
definition. | one of "transactional", "marketing" | no | |
definition. | string or null | no | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "wait" | yes | |
definition. | object | yes | |
definition. | integer | yes | |
definition. | one of "minutes", "hours", "days" | yes | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "wait_for_event" | yes | |
definition. | one of "email.opened", "email.clicked", "custom_event" | yes | |
definition. | string | no | 1 to 100 characters. |
definition. | object | yes | |
definition. | integer | yes | |
definition. | one of "minutes", "hours", "days" | yes | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "branch" | yes | |
definition. | object | no | |
definition. | array of object | yes | At most 50 items. |
definition. | array of object | yes | At most 50 items. |
definition. | object | no | |
definition. | one of "email.opened", "email.clicked" | yes | |
definition. | string or null | no | 1 to 50 characters. Default null. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "update_contact" | yes | |
definition. | string or null | no | At most 200 characters. |
definition. | string or null | no | At most 200 characters. |
definition. | boolean | no | |
definition. | map of string or number or boolean or null | no | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "segment" | yes | |
definition. | one of "add", "remove" | yes | |
definition. | string | yes | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "topic" | yes | |
definition. | one of "subscribe", "unsubscribe" | yes | |
definition. | string | yes | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "delete_contact" | yes | |
definition. | string | yes | 1 to 50 characters. |
definition. | "exit" | yes | |
status | one of "active", "paused", "archived" | no |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
object | "automation" | yes | |
id | string | yes | A UUID. |
status | one of "draft", "active", "paused", "archived" | yes | |
current_version | integer | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl -X PATCH https://api.minket.com/v1/automations/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
-H "Authorization: Bearer $MINKET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"paused"}'const result = await minket.automations.update("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", {
status: "paused"
});minket api updateAutomation 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b --body '{"status":"paused"}'from minket.api.automations import update_automation
from minket.models import UpdateAutomationBody
result = update_automation.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client, body=UpdateAutomationBody.from_dict({"status":"paused"}))var body minket.UpdateAutomationJSONRequestBody
res, err := client.UpdateAutomationWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", body)Archive an automation
DELETE /v1/automations/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
object | "automation" | yes | |
id | string | yes | A UUID. |
status | one of "draft", "active", "paused", "archived" | yes | |
current_version | integer | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl -X DELETE https://api.minket.com/v1/automations/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.automations.delete("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api deleteAutomation 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.automations import delete_automation
result = delete_automation.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.DeleteAutomationWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b")Publish the current version
POST /v1/automations/{id}/publish
New runs start on this version; in-flight runs finish on theirs.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
object | "automation" | yes | |
id | string | yes | A UUID. |
status | one of "draft", "active", "paused", "archived" | yes | |
current_version | integer | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl -X POST https://api.minket.com/v1/automations/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/publish \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.automations.publish("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api publishAutomation 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.automations import publish_automation
result = publish_automation.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.PublishAutomationWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b")Pause an automation and stop its waiting runs
POST /v1/automations/{id}/stop
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
object | "automation" | yes | |
id | string | yes | A UUID. |
status | one of "draft", "active", "paused", "archived" | yes | |
current_version | integer | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl -X POST https://api.minket.com/v1/automations/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/stop \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.automations.stop("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api stopAutomation 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.automations import stop_automation
result = stop_automation.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.StopAutomationWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b")Duplicate an automation
POST /v1/automations/{id}/duplicate
A new draft named <name> (copy) with the current version's definition (the newest draft, if it is newer than the published version). It starts no runs until it is published.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
Response
201 Created: Automation.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "automation" | yes | |
project_id | string | yes | A UUID. |
name | string | yes | |
status | one of "draft", "active", "paused", "archived" | yes | |
current_version | integer | yes | |
published_version | integer or null | yes | |
trigger | object | yes | |
trigger (shape 1). | "custom_event" | yes | |
trigger (shape 1). | string | yes | 1 to 100 characters. |
trigger (shape 2). | "contact_created" | yes | |
trigger (shape 3). | "contact_updated" | yes | |
trigger (shape 3). | array of string | no | |
trigger (shape 4). | "topic_subscribed" | yes | |
trigger (shape 4). | string | yes | A UUID. |
trigger (shape 5). | "segment_entered" | yes | |
trigger (shape 5). | string | yes | A UUID. |
trigger (shape 6). | "email_event" | yes | |
trigger (shape 6). | one of "email.sent", "email.scheduled", "email.delivered", "email.delivery_delayed", "email.complained", "email.bounced", "email.opened", "email.clicked", "email.received", "email.failed", "email.suppressed", "email.canceled", … | yes | |
trigger (shape 6). | object | no | |
trigger (shape 6). | string | yes | |
trigger (shape 6). | string | yes | |
definition | object | yes | |
definition. | object | yes | |
definition. | "custom_event" | yes | |
definition. | string | yes | 1 to 100 characters. |
definition. | "contact_created" | yes | |
definition. | "contact_updated" | yes | |
definition. | array of string | no | |
definition. | "topic_subscribed" | yes | |
definition. | string | yes | A UUID. |
definition. | "segment_entered" | yes | |
definition. | string | yes | A UUID. |
definition. | "email_event" | yes | |
definition. | one of "email.sent", "email.scheduled", "email.delivered", "email.delivery_delayed", "email.complained", "email.bounced", "email.opened", "email.clicked", "email.received", "email.failed", "email.suppressed", "email.canceled", … | yes | |
definition. | object | no | |
definition. | string | yes | |
definition. | string | yes | |
definition. | object or null | no | Default null. |
definition. | array of object | yes | At most 50 items. |
definition. | string | yes | At most 120 characters. |
definition. | one of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", … | yes | |
definition. | string or number or boolean or array of string or null | no | |
definition. | array of object | yes | At most 50 items. |
definition. | string | yes | At most 120 characters. |
definition. | one of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", … | yes | |
definition. | string or number or boolean or array of string or null | no | |
definition. | boolean | no | Default false. |
definition. | string | yes | 1 to 50 characters. |
definition. | array of object | yes | At most 100 items. |
definition. | string | yes | 1 to 50 characters. |
definition. | "send_email" | yes | |
definition. | string | yes | 1 to 100 characters. |
definition. | map of string or number or boolean | no | |
definition. | string | no | At most 320 characters. |
definition. | string | no | At most 998 characters. |
definition. | string | no | At most 320 characters. |
definition. | one of "transactional", "marketing" | no | |
definition. | string or null | no | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "wait" | yes | |
definition. | object | yes | |
definition. | integer | yes | |
definition. | one of "minutes", "hours", "days" | yes | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "wait_for_event" | yes | |
definition. | one of "email.opened", "email.clicked", "custom_event" | yes | |
definition. | string | no | 1 to 100 characters. |
definition. | object | yes | |
definition. | integer | yes | |
definition. | one of "minutes", "hours", "days" | yes | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "branch" | yes | |
definition. | object | no | |
definition. | array of object | yes | At most 50 items. |
definition. | array of object | yes | At most 50 items. |
definition. | object | no | |
definition. | one of "email.opened", "email.clicked" | yes | |
definition. | string or null | no | 1 to 50 characters. Default null. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "update_contact" | yes | |
definition. | string or null | no | At most 200 characters. |
definition. | string or null | no | At most 200 characters. |
definition. | boolean | no | |
definition. | map of string or number or boolean or null | no | |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "segment" | yes | |
definition. | one of "add", "remove" | yes | |
definition. | string | yes | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "topic" | yes | |
definition. | one of "subscribe", "unsubscribe" | yes | |
definition. | string | yes | A UUID. |
definition. | string or null | yes | 1 to 50 characters. |
definition. | string | yes | 1 to 50 characters. |
definition. | "delete_contact" | yes | |
definition. | string | yes | 1 to 50 characters. |
definition. | "exit" | yes | |
stats | object | yes | |
stats. | integer | yes | |
stats. | integer | yes | |
stats. | integer | yes | |
stats. | integer | yes | |
created_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
updated_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl -X POST https://api.minket.com/v1/automations/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/duplicate \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.automations.duplicate("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api duplicateAutomation 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.automations import duplicate_automation
result = duplicate_automation.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.DuplicateAutomationWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b")List versions
GET /v1/automations/{id}/versions
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
object | "list" | yes | |
data | array of object | yes | |
data[]. | integer | yes | |
data[]. | object | yes | |
data[]. | object | yes | |
data[]. | "custom_event" | yes | |
data[]. | string | yes | 1 to 100 characters. |
data[]. | "contact_created" | yes | |
data[]. | "contact_updated" | yes | |
data[]. | array of string | no | |
data[]. | "topic_subscribed" | yes | |
data[]. | string | yes | A UUID. |
data[]. | "segment_entered" | yes | |
data[]. | string | yes | A UUID. |
data[]. | "email_event" | yes | |
data[]. | one of "email.sent", "email.scheduled", "email.delivered", "email.delivery_delayed", "email.complained", "email.bounced", "email.opened", "email.clicked", "email.received", "email.failed", "email.suppressed", "email.canceled", … | yes | |
data[]. | object | no | |
data[]. | object or null | no | Default null. |
data[]. | array of object | yes | At most 50 items. |
data[]. | array of object | yes | At most 50 items. |
data[]. | boolean | no | Default false. |
data[]. | string | yes | 1 to 50 characters. |
data[]. | array of object | yes | At most 100 items. |
data[]. | string | yes | 1 to 50 characters. |
data[]. | "send_email" | yes | |
data[]. | string | yes | 1 to 100 characters. |
data[]. | map of string or number or boolean | no | |
data[]. | string | no | At most 320 characters. |
data[]. | string | no | At most 998 characters. |
data[]. | string | no | At most 320 characters. |
data[]. | one of "transactional", "marketing" | no | |
data[]. | string or null | no | A UUID. |
data[]. | string or null | yes | 1 to 50 characters. |
data[]. | string | yes | 1 to 50 characters. |
data[]. | "wait" | yes | |
data[]. | object | yes | |
data[]. | string or null | yes | 1 to 50 characters. |
data[]. | string | yes | 1 to 50 characters. |
data[]. | "wait_for_event" | yes | |
data[]. | one of "email.opened", "email.clicked", "custom_event" | yes | |
data[]. | string | no | 1 to 100 characters. |
data[]. | object | yes | |
data[]. | string or null | yes | 1 to 50 characters. |
data[]. | string or null | yes | 1 to 50 characters. |
data[]. | string | yes | 1 to 50 characters. |
data[]. | "branch" | yes | |
data[]. | object | no | |
data[]. | object | no | |
data[]. | string or null | yes | 1 to 50 characters. |
data[]. | string or null | yes | 1 to 50 characters. |
data[]. | string | yes | 1 to 50 characters. |
data[]. | "update_contact" | yes | |
data[]. | string or null | no | At most 200 characters. |
data[]. | string or null | no | At most 200 characters. |
data[]. | boolean | no | |
data[]. | map of string or number or boolean or null | no | |
data[]. | string or null | yes | 1 to 50 characters. |
data[]. | string | yes | 1 to 50 characters. |
data[]. | "segment" | yes | |
data[]. | one of "add", "remove" | yes | |
data[]. | string | yes | A UUID. |
data[]. | string or null | yes | 1 to 50 characters. |
data[]. | string | yes | 1 to 50 characters. |
data[]. | "topic" | yes | |
data[]. | one of "subscribe", "unsubscribe" | yes | |
data[]. | string | yes | A UUID. |
data[]. | string or null | yes | 1 to 50 characters. |
data[]. | string | yes | 1 to 50 characters. |
data[]. | "delete_contact" | yes | |
data[]. | string | yes | 1 to 50 characters. |
data[]. | "exit" | yes | |
data[]. | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
data[]. | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
has_more | boolean | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl https://api.minket.com/v1/automations/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/versions \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.automations.versions("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api listAutomationVersions 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.automations import list_automation_versions
result = list_automation_versions.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.ListAutomationVersionsWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b")List runs
GET /v1/automations/{id}/runs
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
limit | query | integer | no | Default 20. |
after | query | string | no | A UUID. |
before | query | string | no | A UUID. |
status | query | one of "running", "waiting", "completed", "exited", "failed", "stopped" | no | |
contact_id | query | string | no | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
object | "list" | yes | |
data | array of object | yes | |
data[]. | string | yes | A UUID. |
data[]. | "run" | yes | |
data[]. | string | yes | A UUID. |
data[]. | integer | yes | |
data[]. | string or null | yes | A UUID. |
data[]. | string or null | yes | A UUID. |
data[]. | one of "live", "test" | yes | |
data[]. | one of "running", "waiting", "completed", "exited", "failed", "stopped" | yes | |
data[]. | string or null | yes | |
data[]. | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
data[]. | string or null | yes | |
data[]. | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
data[]. | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
has_more | boolean | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl https://api.minket.com/v1/automations/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/runs \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.automations.runs("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api listAutomationRuns 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.automations import list_automation_runs
result = list_automation_runs.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.ListAutomationRunsWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", &minket.ListAutomationRunsParams{})Get a run with its step history
GET /v1/automations/{id}/runs/{runId}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
runId | path | string | yes | A UUID. |
Response
200 Success: AutomationRun.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "run" | yes | |
automation_id | string | yes | A UUID. |
version | integer | yes | |
contact_id | string or null | yes | A UUID. |
trigger_event_id | string or null | yes | A UUID. |
mode | one of "live", "test" | yes | |
status | one of "running", "waiting", "completed", "exited", "failed", "stopped" | yes | |
current_step_id | string or null | yes | |
wait_until | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
error | string or null | yes | |
steps | array of object | yes | |
steps[]. | string | yes | |
steps[]. | string | yes | |
steps[]. | one of "running", "waiting", "completed", "skipped", "failed" | yes | |
steps[]. | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
steps[]. | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
steps[]. | map of any or null | yes | |
steps[]. | string or null | yes | |
started_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
finished_at | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl https://api.minket.com/v1/automations/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/runs/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.automations.run("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api getAutomationRun 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.automations import get_automation_run
result = get_automation_run.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.GetAutomationRunWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b")