Approvals
See which runs are waiting for a person's answer, and answer them from your own systems.
A workflow's Ask a person step pauses its run until someone answers: presses one of its buttons (Approve or Reject, on an approval), with as much writing as it asks for, or, when the step asks for one, replies in writing. While it waits, the run's status is awaiting_approval. These endpoints let your own system, such as a practice-management tool or an ERP, do the answering. An answer sent with an API key is recorded as that key's, by name, and the run carries on straight away.
The approval request object
{
"id": "6ae123ec738a4977fdb31728",
"type": "approval",
"status": "pending",
"title": "Pay the Acme invoice",
"details": "Invoice INV-7 for $1,200",
"workflow_id": "665f1a2b3c4d5e6f7a8b9c0d",
"version_id": "6683e1c4b2a9d7f0e5c3a1b2",
"workflow_name": "Pay bills",
"run_id": "683b2c3d4e5f6a7b8c9d0e1f",
"step_index": 2,
"created_at": "2026-10-27T09:00:00+00:00",
"expires_at": "2026-10-30T09:00:00+00:00",
"on_timeout": "reject",
"buttons": ["Approve", "Reject"],
"written_answer": "optional",
"draft": "",
"timeout_answer": "",
"decision": null
}Fields
idstring- The request's ID.
typestring- approval, answered with Approve or Reject; or reply, for every other request: one with buttons of its own, or one answered in writing alone.
statusstring- pending while it waits for an answer; approved, rejected or replied once answered; expired when nobody answered in time and the step was set to fail; or cancelled when the run was stopped, or its workflow deleted, first.
titlestring- What the step asks, as it wrote it.
detailsstring- More about what's being asked, as the step wrote it.
workflow_idstring- The ID of the workflow whose run asked. It stays the same when the workflow is edited.
version_idstring- The ID of the version of the workflow that ran.
workflow_namestring- The workflow's name.
run_idstring- The ID of the run that's waiting.
step_indexinteger- Which step of the workflow asked.
created_atstring- When it asked, in ISO 8601.
expires_atstring or null- When the step stops waiting, in ISO 8601, or null if it waits as long as it takes.
on_timeoutstring- What happens if nobody answers by then: the request is rejected or approved, or the run fails or carries on without a reply.
buttonsarray of strings- What a person presses to answer, as labelled: Approve and Reject on an approval, the step's own otherwise. Empty for a request answered in writing alone.
written_answerstring- How much they write alongside: none, optional or required.
draftstring- Text the person can change before they answer, as the step gave it; empty when there is none.
timeout_answerstring- The button pressed for them if nobody answers in time; empty when there is none.
decisionobject or null- How it was answered: answer (the button pressed; empty for a written reply), reply (what was written), draft (the text as left), decision (approved, rejected or replied), comment, decided_by (who answered, a person as described below), decided_at and via (app, email, api or timeout). Null until it's answered.
A request also lists who may answer it in Lodol (approvers, approver_group), the member the run runs as (requested_by), and its history (events), each event with its type, when it occurred_at, and who it was by.
A person here, in requested_by, approvers, decision.decided_by and each event's by, is an object with their id, name and email. One who isn't a member, such as a role or an email list, also has a type saying which, and its id can be null. When Lodol has no name for someone, name is their email.
List approval requests
Returns approval requests, newest first, a page at a time. Requires the executions:read scope. Requests from workflows the key's member can't see are left out.
Query parameters
statusstring- pending for the ones still waiting; decided for the ones answered, expired or withdrawn; or all.Default:
pending. run_idstring- Only the requests one run made: the run's id.
workflow_idstring- Only requests from this workflow, from every version of it. Takes the workflow's id or the ID of any of its versions.
limitinteger- How many requests to read for the page, from 1 to 100.Default:
50. cursorstring- For the next page: the next_cursor of the page you have.
# The request a run you started is waiting on
curl "https://api-prod.lodol.com/api/v1/approvals?run_id=683b2c3d4e5f6a7b8c9d0e1f" \
-H "Authorization: Bearer $LODOL_API_KEY"Response 200: a page of approval requests, and next_cursor, for the next page, or null when there are no more. See Paging through lists.
{
"approvals": [
{ "id": "6ae123ec738a4977fdb31728", "type": "approval", "status": "pending", "...": "..." }
],
"next_cursor": null
}A page can hold fewer requests than limit, even none, when some it read were from workflows the key's member can't see. Keep going while next_cursor isn't null.
Get an approval request
Returns one approval request. Requires the executions:read scope. A request from a workflow the key's member can't see returns 404.
curl https://api-prod.lodol.com/api/v1/approvals/6ae123ec738a4977fdb31728 \
-H "Authorization: Bearer $LODOL_API_KEY"Answer an approval request
Presses one of a request's buttons, or replies to one answered in writing alone, so its run carries on. Requires the workflows:execute scope, and the member who created the key must be allowed to run workflows. An API key answers for the workspace, so it isn't held to the request's list of approvers. It is held to who may not answer: a key made by the member who prepared the item, or by the member the run runs as when the step needs someone else, gets 403.
Headers
Idempotency-Keystring- Makes the request safe to retry: a repeat with the same key returns the first answer instead of a conflict with it. See Idempotency.
Body
answerstring- The button to press, one of the request's buttons. Leave it out for a request answered in writing alone.
replystring- What to write alongside: a comment on an approval, the answer to a request answered in writing alone. Required when written_answer is required; ignored when it is none.
draftstring- The request's text as changed, for a request that carries text to check. Left out, the text goes on as the step gave it.
Requests answered before buttons were sent with decision (approved or rejected) and comment. That body still works for an approval.
curl -X POST https://api-prod.lodol.com/api/v1/approvals/6ae123ec738a4977fdb31728/decision \
-H "Authorization: Bearer $LODOL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: approve-inv-7" \
-d '{"answer": "Approve", "reply": "Matches the purchase order"}'Response 200: the approval request as answered, with its decision.
A request that's no longer waiting returns 409, with a code saying why:
| Code | Meaning |
|---|---|
approval_already_answered | Someone answered it first. decision on Get an approval request says who and how |
approval_expired | Nobody answered in time: it closed, or its time limit answered it as the step was set to |
approval_withdrawn | The run was stopped, or its workflow deleted, before anyone answered |
None of them is worth retrying: the request is settled.
Runs
Start a workflow run with inputs, follow it to what it hands back, list and search past runs, stop a run in progress, retry one that failed, and delete one.
Connections
List the apps your workspace is connected to, connect an app with an API key or other credentials, test a connection, remove one, and find out how an app connects.