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
| Field | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | Yes | Identifier of the automation run. |
Request body: AutomationNoticeRequest
| Field | Type | Required | Description |
|---|---|---|---|
| recipient_person_id | string (uuid) | Yes | Identifier of the member who receives the notification. |
| title | string | Yes | Notification title.Constraints: length 1 to 200 |
| body | string | No | Message; 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
| Field | Type | Required | Description |
|---|---|---|---|
| notification_id | string (uuid) | null | Yes | Identifier 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."}'