The Workflow
Draft States
| State | Description |
|---|---|
pending | Submitted, awaiting human review |
stale | A newer inbound message arrived after this draft was written |
approved | Human approved — ready to send |
rejected | Human rejected |
sent | Successfully delivered via Postmark |
Submitting a Draft
based_on_message_id field is required — it tells ActionLayer which message the AI read when writing this draft. This enables stale detection.
Stale Detection
If a new inbound message arrives after a draft was submitted, the draft becomesstale. This prevents the AI’s reply from being out of context.
- On submission: Returns a
stale_warningif a newer message already exists - On send: Blocks delivery if the draft is stale — returns
HTTP 409
Approval Modes
| Mode | Behavior |
|---|---|
manual (default) | Human must approve every draft before sending |
auto | Draft is automatically approved and sent on submission |
approval_mode when creating an identity. Auto-send is always opt-in.