Developer resources
Approval Workflows
Govern content progression with multi-step review and sign-off.
How it works
One state machine per deliverable
A workflow starts in in_review and ends in approved, rejected or changes_requested. Steps are sequential: each role must approve before the next step activates.
Role hierarchy
Reviewer → Editor → Approver → Publisher. You choose which roles participate and in which order the chain runs.
Humans decide
API keys can create workflows and read status, but only an authenticated human user can submit a decision. Agents cannot self-approve.
Immutable audit trail
Every decision appends an entry with the step, role, decision, comments, user and timestamp. Entries are never edited or removed.
Create a workflow
curl -X POST https://lucidry.base44.app/functions/approvals \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"job_id": "job_123", "content_artifact_id": "td_456", "approver_roles": ["reviewer", "editor", "approver"]}'Response
{
"workflow_id": "wf_100",
"status": "in_review",
"current_step": 1,
"total_steps": 3,
"steps": [
{ "step_number": 1, "approver_role": "reviewer", "status": "pending" },
{ "step_number": 2, "approver_role": "editor", "status": "pending" },
{ "step_number": 3, "approver_role": "approver", "status": "pending" }
]
}Submit a decision
decision is approved, rejected or changes_requested. Comments are required.
curl -X POST https://lucidry.base44.app/functions/approvals/wf_100/decide \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"decision": "approved", "comments": "Content meets brand standards."}'Response
{
"workflow_id": "wf_100",
"status": "in_review",
"current_step": 2,
"decision_recorded": true,
"qa_warning": null
}Get workflow status
curl -X GET https://lucidry.base44.app/functions/approvals/wf_100 \
-H "Authorization: Bearer YOUR_API_KEY"Resubmit after changes
curl -X POST https://lucidry.base44.app/functions/approvals/wf_100/resubmit \
-H "Authorization: Bearer YOUR_API_KEY"State machine
in_review
Created, awaiting the first role's decision.
approved
Every step approved. The deliverable is cleared for publication or delivery.
rejected
Any step rejected. The workflow terminates and cannot be decided again.
changes_requested
Any step requested changes. Resubmit to re-open that same step and return to in_review.
Webhook events
Subscribe an endpoint to these events to drive your own publishing pipeline.
approval.submitted
{
"workflow_id": "wf_100",
"job_id": "job_123",
"content_artifact_id": "td_456",
"approver_roles": ["reviewer", "editor", "approver"],
"timestamp": "2026-08-31T15:00:00.000Z"
}approval.approved
{
"workflow_id": "wf_100",
"step_number": 1,
"role": "reviewer",
"comments": "Content meets brand standards.",
"timestamp": "2026-08-31T15:05:00.000Z"
}approval.rejected
{
"workflow_id": "wf_100",
"step_number": 2,
"role": "editor",
"comments": "Claims cannot be sourced.",
"timestamp": "2026-08-31T15:10:00.000Z"
}approval.changes_requested
{
"workflow_id": "wf_100",
"step_number": 2,
"role": "editor",
"comments": "Tighten the executive summary.",
"timestamp": "2026-08-31T15:12:00.000Z"
}Signing and retry behavior is identical to job events, see the Webhooks documentation.
Roles and permissions
| Role | Can decide | Can view | Can create |
|---|---|---|---|
| Owner / Admin | Any step | Yes | Yes |
| Member | Reviewer and Editor steps | Yes | Yes |
| Viewer | No | Yes | No |
| API key / Agent | No, humans only | Yes | Yes |
QA guard and limits
- When the artifact's quality score is below 0.80, the step carries an automated QA warning. The human decision always stands.
- Comments are required on every decision. An empty comment is rejected with a 422.
- Approval endpoints allow 60 requests per minute per API key.
