Saltar al contenido

Delete an automation

Módulo Platform

DELETE/automations/{id}automations.delete

An automation (Section 7.3, ADR 0047): when a domain event of the trigger type happens in the org and the conditions hold, the actions run in order as the owner through public API operations, so row level security and capabilities decide every write. The owner is whoever last changed what it does or turned it on. Needs the automations plan feature (Pro and above) to create, change or turn on (plan_feature_required: 422); without it an automation can still be turned off and deleted. Saving validates the documents as automation.schema.json does (automation_conditions_invalid, automation_actions_invalid: 422) and checks the actions fit the trigger (automation_action_needs_record, automation_action_needs_commentable_subject, automation_person_not_member, automation_webhook_unknown: 422). Soft-deletes the automation: it moves to Trash and can be restored for its table's retention period.

  • Requiere la capacidad org.automations.write.
  • Alcances de OAuth: org.
  • Estados de error: 401, 404, 422, 429. Los errores son detalles de problema RFC 9457.

Parámetros de ruta y de consulta

automations.delete: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
idstring (uuid)SíIdentifier of the automation.

Respuesta 204: sin cuerpo.

Ejemplos de código

curl -X DELETE "$XOS_BASE_URL/automations/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f" \
  -H "Authorization: Bearer $XOS_API_KEY"
const { data } = await xos.automations.delete("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f");
response = xos.automations.delete("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f")
xos automations delete 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f