Getting Started
Post Lifecycle
How immediate and scheduled posts move through PostMantis.
PostMantis has one server-side flow: accepted work moves through durable execution.
Pending -> Scheduled -> Completed
\\-> CanceledStates
| State | Meaning |
|---|---|
pending | Request accepted. Media and workflow may still be preparing. |
scheduled | Ready, waiting for time or delivery settlement. |
completed | Every delivery reached terminal state. |
canceled | Future scheduled work stopped before delivery. |
Create now
curl https://postmantis.com/api/v1/posts \
-H "Authorization: Bearer $POSTMANTIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post": { "body": "Launch is live." },
"profiles": ["PROFILE_ID"]
}'Response starts as pending or may already be scheduled if worker is fast.
Schedule later
curl https://postmantis.com/api/v1/posts \
-H "Authorization: Bearer $POSTMANTIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post": { "body": "Launch tomorrow.", "scheduledAt": "2026-03-30T12:00:00Z" },
"profiles": ["PROFILE_ID"]
}'Reschedule
PATCH /api/v1/posts/{postId} only works for future scheduled posts while all deliveries are still pending. Use a future post.scheduledAt to move time, or null to publish now.
Cancel
POST /api/v1/posts/{postId}/cancel stops future scheduled work and keeps history readable.