Skip to content

Notify a member from a running automation run

Platform module

POST/automation-runs/{id}/noticesautomationRuns.notify

The notify action (ADR 0047): during a run, the automation's owner notifies a member of the org (automation.notice) about the event's subject, through `app.send_automation_notice`. Only a running run of the caller's own automation (404 otherwise); the recipient must be a member (automation_person_not_member: 422). Needs org.automations.write. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.

  • Requires the capability org.automations.write.
  • OAuth scopes: org.
  • Send an Idempotency-Key header. A replay with the same key returns the original response.
  • Error statuses: 400, 401, 404, 409, 422, 429. Errors are RFC 9457 problem details.

Path and query parameters

automationRuns.notify: Path and query parameters
FieldTypeRequiredDescription
idstring (uuid)YesIdentifier of the automation run.

Request body: AutomationNoticeRequest

automationRuns.notify: AutomationNoticeRequest
FieldTypeRequiredDescription
recipient_person_idstring (uuid)YesIdentifier of the member who receives the notification.
titlestringYesNotification title.Constraints: length 1 to 200
bodystringNoMessage; the title is repeated when absent.Constraints: length 1 to 2000
{
  "recipient_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "title": "New task: Call the venue",
  "body": "Call the venue needs a look."
}

Response 201: AutomationNoticeResult

automationRuns.notify: AutomationNoticeResult
FieldTypeRequiredDescription
notification_idstring (uuid) | nullYesIdentifier of the notification created.
{
  "notification_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
}

Code samples

curl -X POST "$XOS_BASE_URL/automation-runs/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f/notices" \
  -H "Authorization: Bearer $XOS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"recipient_person_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","title":"New task: Call the venue","body":"Call the venue needs a look."}'
const { data } = await xos.automationRuns.notify("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {
    "recipient_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
    "title": "New task: Call the venue",
    "body": "Call the venue needs a look."
  });
response = xos.automation_runs.notify("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {"recipient_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "title": "New task: Call the venue", "body": "Call the venue needs a look."})
xos automation-runs notify 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f --data '{"recipient_person_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","title":"New task: Call the venue","body":"Call the venue needs a look."}'