Approve or reject up to 50 pending approvals at once
/automation-approval/resolve-batch
One decision and one optional note for up to 50 ids. Each is answered on its own with the same checks as the single resolve, so one refusal never undoes another: every id gets a result, either `ok` with the settled approval or the error the single resolve would have given (`not_found`, `not_an_approver`, `approval_already_voted`, `approval_self_approval_forbidden`, `approval_not_pending`, `approval_expired`). Payments and approvals that require step-up are never answered in bulk: they are refused per item with `approval_bulk_excluded` (rows carry `can_bulk_resolve`). 403 `approval_human_only` for an AI surface.
Request Body
approvereject
Response Body
47 properties
The exact thing being asked in one sentence ("Pay $1,250.00 to Acme Ltd from Stripe"); set for a payment, null for an ordinary approval whose title is the sentence.
2 properties
Why a request the caller can answer on its own is kept out of a bulk decision, in words.
May be answered in a bulk decision: can_resolve, and not a payment or a step-up gate (those are answered one at a time).
The caller may open the workflow (an approver is not necessarily able to).
The caller may open the run (use access or better on the workflow).
The workflow's current published version number.
What became of the Slack and email delivery, per channel, as counts of approvers per outcome. Counts only: never an address, token or message. Null before the first delivery runs and on requests from before outcomes were recorded.
object · 4 properties
object · 5 properties
Email.
5 properties
Approvers no channel was attempted for: inactive are no longer active members, over_limit are past the cap on how many people one request messages. Absent when none were skipped.
2 properties
Slack direct messages.
5 properties
Who was told about this request and, when someone was not, why, in plain words ("Notified 1 of 1 · Slack, email"). Computed from delivery and the caller's own standing, so a reader who was never asked to approve is told they were not notified.
2 properties
Detail rows the step produced beyond the ones kept; 0 when nothing was cut.
Pending, and its run is pinned to an older version than the workflow's current published one: approving resumes that run with its old steps. False once settled. A heads-up only; it never changes what an answer does.
How message is written. Display only: draw slack mrkdwn or a small Markdown subset as formatting, never as HTML.
textslackmarkdown
2 properties
What happens if the caller approves, in plain words.
What happens to the run if the caller rejects, in plain words.
2 properties
The version number the run is pinned to.
pendingapprovedrejectedexpiredcancelled
2 properties
curl -X POST 'https://api.elaichi.ai/automation-approval/resolve-batch' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"ids":[],"decision":"approve","note":"your_note"}'const body = {
"ids": [],
"decision": "approve",
"note": "your_note"
};
const response = await fetch('https://api.elaichi.ai/automation-approval/resolve-batch', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/automation-approval/resolve-batch"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"ids": [],
"decision": "approve",
"note": "your_note"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())