Skip to the documentation
API

Approve or deny a request

Answers what a run asked. Approving carries the action out as the run wrote it, or with your words in place of its own.

POST/task-approvals/{id}/approve

Runs any of 2 calls on your workspace.

POST /task-approvals/{id}/approve

Answers what a run asked. Approving carries the action out as the run wrote it, or with your words in place of its own.

Example

Approving needs what creating the task would, because you are letting it act. Denying needs tasks:write.

curl
curl -X POST "$OE/task-approvals/apr_2f8c1a6e9b3d47c05e1a8f2c/approve" -H "$AUTH" -H 'content-type: application/json' -d '{  "body": "Hi Ann, the invoice went out again this morning. Tell me if it has not arrived by tomorrow."}'curl -X POST "$OE/task-approvals/apr_2f8c1a6e9b3d47c05e1a8f2c/deny" -H "$AUTH"
Response
{  "object": "task_approval",  "id": "apr_2f8c1a6e9b3d47c05e1a8f2c",  "runId": "run_9d3a7e1c5b2f48a60c7e1d3b",  "taskId": "tsk_4b9e2c7a1f3d86e05a9c2b7d",  "taskName": "Morning summary",  "tool": "replyToEmail",  "summary": "Reply to [email protected]: Re: Invoice 1042",  "args": {    "threadId": "thr_7c1e4a90",    "to": ["[email protected]"],    "subject": "Re: Invoice 1042",    "body": "Hi Ann, the invoice went out again this morning."  },  "status": "pending",  "createdAt": "2026-10-13T07:00:41.220Z",  "expiresAt": "2026-10-20T07:00:41.220Z",  "decidedAt": null}

The body of an approval is optional. subject and body apply to a send or a reply and are ignored for anything else.

The answer returns at once. The run picks up again within seconds of its last open request being answered.

A request that was already answered, has expired, or belongs to a run that ended answers 409 task_approval_decided.

Reference