Automations
19 calls. Every request needs the Authorization header: see the overview.
automations.list
Section titled “automations.list”GET /automated-actionsEvery definition of the tenant, or of one namespace with { namespace }.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Response: AutomatedAction[] (200)
curl -X GET "https://api.maitento.com/automated-actions" \ -H "Authorization: $MAITENTO_AUTH"const automations = await mt.automations.list();mt.automations.list()automations.delete
Section titled “automations.delete”DELETE /automated-actions/by-id/{id}Deletes the definition (refused with a 400 while something still uses it or a run of it is going).
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: no body (204)
curl -X DELETE "https://api.maitento.com/automated-actions/by-id/<id>" \ -H "Authorization: $MAITENTO_AUTH"await mt.automations.delete("3d813cbb-47fb-42ba-91df-831e1593ac29");mt.automations.delete("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b")automations.get
Section titled “automations.get”GET /automated-actions/by-id/{id}The definition with this id. Throws NotFoundError when there is none.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: AutomatedAction (200)
curl -X GET "https://api.maitento.com/automated-actions/by-id/<id>" \ -H "Authorization: $MAITENTO_AUTH"const automation = await mt.automations.get("3d813cbb-47fb-42ba-91df-831e1593ac29");mt.automations.get("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b")automations.update
Section titled “automations.update”PUT /automated-actions/by-id/{id}Replaces an automation’s name, description and actions.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Request body: UpdateAutomatedActionRequest
| Field | Type | Required | Description |
|---|---|---|---|
name | string | The automation’s name, unique within the namespace. | |
description | string | null | What the automation is for. | |
actions | AutomatedActionItemInput[] | What the automation starts each time it fires, at least one: one run per action. Replaces the current list. |
Response: AutomatedAction (200)
curl -X PUT "https://api.maitento.com/automated-actions/by-id/<id>" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"name":"...","description":"...","actions":[]}'const automation = await mt.automations.update("3d813cbb-47fb-42ba-91df-831e1593ac29", { name: "nightly-digest", description: "Summarise the day" });mt.automations.update("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", name="nightly-digest", description="Summarise the day")automations.history
Section titled “automations.history”GET /automated-actions/by-id/{id}/historyThe automation’s recent executions.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer |
Response: ExecutionHistoryEntry[] (200)
curl -X GET "https://api.maitento.com/automated-actions/by-id/<id>/history" \ -H "Authorization: $MAITENTO_AUTH"const history = await mt.automations.history("3d813cbb-47fb-42ba-91df-831e1593ac29", { limit: 20 });mt.automations.history("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", limit=50)automations.addMessageTrigger
Section titled “automations.addMessageTrigger”POST /automated-actions/by-id/{id}/message-triggersAdds a message trigger.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Request body: MessageTriggerInput
| Field | Type | Required | Description |
|---|---|---|---|
id | uuid | The trigger’s id. | |
name | string | null | A name for the trigger. Optional. | |
isEnabled | boolean | Whether the trigger fires. Switch it off to pause it without deleting it. | |
triggerType | MessageTriggerType | Which kind of run’s changes it listens to. | |
eventFilter | string | null | A JSONPath expression over the change (the run is under item, with statuses as numbers): the trigger fires only when it matches. Null or empty: every change fires it, including changes to the runs it starts itself. |
Response: AutomatedAction (200)
curl -X POST "https://api.maitento.com/automated-actions/by-id/<id>/message-triggers" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"id":"...","name":"...","isEnabled":false,"triggerType":"AppProcessUpdated","eventFilter":"..."}'await mt.automations.addMessageTrigger("3d813cbb-47fb-42ba-91df-831e1593ac29", { triggerType: "InteractionProcessUpdated", eventFilter: "$[?(@.status == 'Finished')]" });mt.automations.add_message_trigger("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", trigger_type="InteractionProcessUpdated", event_filter="$[?(@.status == 'Finished')]")automations.removeMessageTrigger
Section titled “automations.removeMessageTrigger”DELETE /automated-actions/by-id/{id}/message-triggers/{triggerId}Removes a message trigger.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | |
triggerId | uuid | yes |
Response: AutomatedAction (200)
curl -X DELETE "https://api.maitento.com/automated-actions/by-id/<id>/message-triggers/<triggerId>" \ -H "Authorization: $MAITENTO_AUTH"await mt.automations.removeMessageTrigger("3d813cbb-47fb-42ba-91df-831e1593ac29", "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f");mt.automations.remove_message_trigger("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", "0a1b2c3d-4e5f-4a6b-9c7d-8e9f0a1b2c3d")automations.updateMessageTrigger
Section titled “automations.updateMessageTrigger”PUT /automated-actions/by-id/{id}/message-triggers/{triggerId}Replaces a message trigger.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | |
triggerId | uuid | yes |
Request body: MessageTriggerInput
| Field | Type | Required | Description |
|---|---|---|---|
id | uuid | The trigger’s id. | |
name | string | null | A name for the trigger. Optional. | |
isEnabled | boolean | Whether the trigger fires. Switch it off to pause it without deleting it. | |
triggerType | MessageTriggerType | Which kind of run’s changes it listens to. | |
eventFilter | string | null | A JSONPath expression over the change (the run is under item, with statuses as numbers): the trigger fires only when it matches. Null or empty: every change fires it, including changes to the runs it starts itself. |
Response: AutomatedAction (200)
curl -X PUT "https://api.maitento.com/automated-actions/by-id/<id>/message-triggers/<triggerId>" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"id":"...","name":"...","isEnabled":false,"triggerType":"AppProcessUpdated","eventFilter":"..."}'await mt.automations.updateMessageTrigger("3d813cbb-47fb-42ba-91df-831e1593ac29", "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f", { triggerType: "AppProcessUpdated" });mt.automations.update_message_trigger("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", "0a1b2c3d-4e5f-4a6b-9c7d-8e9f0a1b2c3d", trigger_type="AppProcessUpdated")automations.disableMessageTrigger
Section titled “automations.disableMessageTrigger”POST /automated-actions/by-id/{id}/message-triggers/{triggerId}/disableDisables a message trigger.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | |
triggerId | uuid | yes |
Response: AutomatedAction (200)
curl -X POST "https://api.maitento.com/automated-actions/by-id/<id>/message-triggers/<triggerId>/disable" \ -H "Authorization: $MAITENTO_AUTH"await mt.automations.disableMessageTrigger("3d813cbb-47fb-42ba-91df-831e1593ac29", "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f");mt.automations.disable_message_trigger("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", "0a1b2c3d-4e5f-4a6b-9c7d-8e9f0a1b2c3d")automations.enableMessageTrigger
Section titled “automations.enableMessageTrigger”POST /automated-actions/by-id/{id}/message-triggers/{triggerId}/enableEnables a message trigger.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | |
triggerId | uuid | yes |
Response: AutomatedAction (200)
curl -X POST "https://api.maitento.com/automated-actions/by-id/<id>/message-triggers/<triggerId>/enable" \ -H "Authorization: $MAITENTO_AUTH"await mt.automations.enableMessageTrigger("3d813cbb-47fb-42ba-91df-831e1593ac29", "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f");mt.automations.enable_message_trigger("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", "0a1b2c3d-4e5f-4a6b-9c7d-8e9f0a1b2c3d")automations.addSchedule
Section titled “automations.addSchedule”POST /automated-actions/by-id/{id}/schedulesAdds a cron schedule.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Request body: CronScheduleInput
| Field | Type | Required | Description |
|---|---|---|---|
id | uuid | The schedule’s id. | |
name | string | null | A name for the schedule. Optional. | |
isEnabled | boolean | Whether the schedule triggers the automation. Switch it off to pause it without deleting it. | |
second | string | null | The cron seconds field. Optional: set it for a six-field expression. | |
minute | string | The cron minutes field, such as 0 or */15. | |
hour | string | The cron hours field, in UTC, such as 7. | |
dayOfMonth | string | The cron day-of-month field. | |
month | string | The cron month field. | |
dayOfWeek | string | The cron day-of-week field, such as 1-5 for weekdays. | |
nextOccurrence | datetime | null | When the schedule next triggers, in UTC. Set by Maitento. |
Response: AutomatedAction (200)
curl -X POST "https://api.maitento.com/automated-actions/by-id/<id>/schedules" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"id":"...","name":"...","isEnabled":false,"second":"...","minute":"...","hour":"...","dayOfMonth":"...","month":"...","dayOfWeek":"...","nextOccurrence":"2026-01-01T00:00:00Z"}'await mt.automations.addSchedule("3d813cbb-47fb-42ba-91df-831e1593ac29", { name: "weekdays-9am", minute: "0", hour: "9", dayOfWeek: "1-5" });mt.automations.add_schedule("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", minute="0", hour="7", day_of_week="1-5")automations.removeSchedule
Section titled “automations.removeSchedule”DELETE /automated-actions/by-id/{id}/schedules/{scheduleId}Removes a schedule.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | |
scheduleId | uuid | yes |
Response: AutomatedAction (200)
curl -X DELETE "https://api.maitento.com/automated-actions/by-id/<id>/schedules/<scheduleId>" \ -H "Authorization: $MAITENTO_AUTH"await mt.automations.removeSchedule("3d813cbb-47fb-42ba-91df-831e1593ac29", "8e7d6c5b-4a3f-4e2d-9c1b-0a9f8e7d6c5b");mt.automations.remove_schedule("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", "9f0a1b2c-3d4e-4f5a-8b6c-7d8e9f0a1b2c")automations.updateSchedule
Section titled “automations.updateSchedule”PUT /automated-actions/by-id/{id}/schedules/{scheduleId}Replaces a schedule.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | |
scheduleId | uuid | yes |
Request body: CronScheduleInput
| Field | Type | Required | Description |
|---|---|---|---|
id | uuid | The schedule’s id. | |
name | string | null | A name for the schedule. Optional. | |
isEnabled | boolean | Whether the schedule triggers the automation. Switch it off to pause it without deleting it. | |
second | string | null | The cron seconds field. Optional: set it for a six-field expression. | |
minute | string | The cron minutes field, such as 0 or */15. | |
hour | string | The cron hours field, in UTC, such as 7. | |
dayOfMonth | string | The cron day-of-month field. | |
month | string | The cron month field. | |
dayOfWeek | string | The cron day-of-week field, such as 1-5 for weekdays. | |
nextOccurrence | datetime | null | When the schedule next triggers, in UTC. Set by Maitento. |
Response: AutomatedAction (200)
curl -X PUT "https://api.maitento.com/automated-actions/by-id/<id>/schedules/<scheduleId>" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"id":"...","name":"...","isEnabled":false,"second":"...","minute":"...","hour":"...","dayOfMonth":"...","month":"...","dayOfWeek":"...","nextOccurrence":"2026-01-01T00:00:00Z"}'await mt.automations.updateSchedule("3d813cbb-47fb-42ba-91df-831e1593ac29", "8e7d6c5b-4a3f-4e2d-9c1b-0a9f8e7d6c5b", { minute: "30", hour: "8" });mt.automations.update_schedule("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", "9f0a1b2c-3d4e-4f5a-8b6c-7d8e9f0a1b2c", minute="30", hour="6")automations.disableSchedule
Section titled “automations.disableSchedule”POST /automated-actions/by-id/{id}/schedules/{scheduleId}/disableDisables a schedule.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | |
scheduleId | uuid | yes |
Response: AutomatedAction (200)
curl -X POST "https://api.maitento.com/automated-actions/by-id/<id>/schedules/<scheduleId>/disable" \ -H "Authorization: $MAITENTO_AUTH"await mt.automations.disableSchedule("3d813cbb-47fb-42ba-91df-831e1593ac29", "8e7d6c5b-4a3f-4e2d-9c1b-0a9f8e7d6c5b");mt.automations.disable_schedule("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", "9f0a1b2c-3d4e-4f5a-8b6c-7d8e9f0a1b2c")automations.enableSchedule
Section titled “automations.enableSchedule”POST /automated-actions/by-id/{id}/schedules/{scheduleId}/enableEnables a schedule.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | |
scheduleId | uuid | yes |
Response: AutomatedAction (200)
curl -X POST "https://api.maitento.com/automated-actions/by-id/<id>/schedules/<scheduleId>/enable" \ -H "Authorization: $MAITENTO_AUTH"await mt.automations.enableSchedule("3d813cbb-47fb-42ba-91df-831e1593ac29", "8e7d6c5b-4a3f-4e2d-9c1b-0a9f8e7d6c5b");mt.automations.enable_schedule("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b", "9f0a1b2c-3d4e-4f5a-8b6c-7d8e9f0a1b2c")automations.trigger
Section titled “automations.trigger”POST /automated-actions/by-id/{id}/triggerRuns the automation now. Starts work, so it is never retried. Returns the first run started. Throws a ValidationError with code api:automations:start-failed (then the cause’s own codes) when nothing could start.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: TriggerResponse (200)
curl -X POST "https://api.maitento.com/automated-actions/by-id/<id>/trigger" \ -H "Authorization: $MAITENTO_AUTH"const { processId } = await mt.automations.trigger("3d813cbb-47fb-42ba-91df-831e1593ac29");mt.automations.trigger("8e9f0a1b-2c3d-4e4f-9a5b-6c7d8e9f0a1b")automations.list
Section titled “automations.list”GET /namespaces/{namespaceName}/automated-actionsEvery definition of the tenant, or of one namespace with { namespace }.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespaceName | string | yes |
Response: AutomatedAction[] (200)
curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/automated-actions" \ -H "Authorization: $MAITENTO_AUTH"const automations = await mt.automations.list({ namespace: "support" });mt.automations.list(namespace="demo")automations.create
Section titled “automations.create”POST /namespaces/{namespaceName}/automated-actionsCreates an automation in the namespace.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespaceName | string | yes |
Request body: CreateAutomatedActionRequest
| Field | Type | Required | Description |
|---|---|---|---|
name | string | The automation’s name, unique within the namespace. | |
description | string | null | What the automation is for. | |
actions | AutomatedActionItemInput[] | What the automation starts each time it fires, at least one: one run per action. |
Response: AutomatedAction (200)
curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/automated-actions" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"name":"...","description":"...","actions":[]}'const automation = await mt.automations.create({ name: "nightly-digest", actions: [{ name: "digest", config: digestConfig }] }, { namespace: "support" });mt.automations.create(name="nightly-digest", actions=[{"config": {"$type": "interaction", "version": {"id": "8c3b2a1d-4e5f-4a6b-9c7d-0e1f2a3b4c5d", "version": 1}, "inputs": []}}], namespace="demo")automations.getByName
Section titled “automations.getByName”GET /namespaces/{namespaceName}/automated-actions/by-name/{name}The definition with this name in the namespace. Throws NotFoundError when there is none.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespaceName | string | yes | |
name | string | yes |
Response: AutomatedAction (200)
curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/automated-actions/by-name/<name>" \ -H "Authorization: $MAITENTO_AUTH"const automation = await mt.automations.getByName("nightly-digest", { namespace: "support" });mt.automations.get_by_name("nightly-digest", namespace="demo")