PostEverywhere Approvals API
Run post approvals from the REST API: send a draft for approval, approve and schedule in one call, read every round and what changed, comment, and send posts to a client on a review link.
The approval workflow in the app also works over the REST API. An agent or a script can send a draft for approval, approve and schedule it, read each round, comment, and send posts to a client.
These endpoints are REST only. The MCP tools have not changed: create_post with request_approval, approve_post and request_post_changes work as before.
Who can do what
| Action | Who |
|---|---|
| Send a draft for approval, comment | Anyone who can write posts |
| Approve, request changes | Owners and admins. A key made by a member gets 403 insufficient_role |
| Write a comment the client sees | Owners and admins. Anyone else's comment is saved as internal |
| Make and read client review links | Owners and admins. A key limited to some accounts gets 403 restricted_key |
In a workspace with Require approval on, a member's POST /v1/posts (and each post in POST /v1/posts/bulk) is saved as a draft waiting for approval. See Agents.
The flow
- Create a draft:
POST /v1/postswithdraft: true. - Send it for approval:
POST /v1/posts/{id}/submit. - An approver approves and schedules it:
POST /v1/posts/{id}/approvewithschedule: true. Or they ask for changes:POST /v1/posts/{id}/request-changeswith anote. - If changes were asked for, edit the post with
PATCH /v1/posts/{id}, then callsubmitagain. A new round opens. - Read where it is at any time:
GET /v1/posts/{id}/approval.
Send a draft for approval: POST /v1/posts/{id}/submit
This is Submit for approval and Send back for approval in the app. It works for a new draft, and for a draft that came back with Changes requested.
curl -X POST https://app.posteverywhere.ai/api/v1/posts/POST_ID/submit \
-H "Authorization: Bearer pe_live_..."
- A new round opens. The same reviewers as last time are told what changed.
- A client who asked for changes on a review link gets the post back on their link.
- The
post.approval_requestedwebhook event fires.
The answer has round, status_line (for example "Waiting for approval (round 2)") and notified: team (true or false) and client_links (how many client links got the post back).
Errors: not_submittable (400: the post is not a draft, or it is already waiting for approval), not_found (404).
Approve and schedule in one call: POST /v1/posts/{id}/approve
curl -X POST https://app.posteverywhere.ai/api/v1/posts/POST_ID/approve \
-H "Authorization: Bearer pe_live_..." \
-H "Content-Type: application/json" \
-d '{"schedule": true, "note": "Looks good"}'
With schedule: true, the post is approved and scheduled for its own time and accounts, the same as Approve and schedule in the app. Without schedule, approve works as before: the post is approved and stays a draft until you call POST /v1/posts/{id}/schedule.
schedule.outcome says what happened:
outcome |
Meaning |
|---|---|
scheduled |
Scheduled for schedule.scheduled_for |
no_time |
The draft has no time. It stays approved as a draft |
past_time |
The time has passed. It stays approved as a draft |
no_accounts |
The draft has no accounts. It stays approved as a draft |
not_draft |
The post is not a draft, so it was not scheduled. It stays approved |
blocked |
It could not be scheduled. It stays approved as a draft, and schedule.reason says why |
A draft that stays approved can be scheduled later with POST /v1/posts/{id}/schedule. One approval allows one publish. The author gets an email, and the post.approved webhook event fires.
Errors: not_pending (400: the post is not waiting for approval), insufficient_role (403: not an owner or admin), not_found (404).
Read rounds and what changed: GET /v1/posts/{id}/approval
One call gives you everything about a post's approval:
approval_status:pending,approved,changes_requestedorconsumed(approved and then scheduled).status_line: the words the app shows, for example "Changes requested by Priya Patel (client)".rounds: each round, who sent it (opened_by), how it ended (outcome), who decided (decided_by, anddecided_by_kind:teamorclient), theirnote, and what changed since the round before.suggestions: caption edits that reviewers suggested, withstatuspending,acceptedorrejected.client_decisions: what clients answered on review links.
changes_text is plain text. Added words are [+like this+] and removed words are [-like this-]. Then come lines such as "1 media file added" or "1 account added".
Comments: GET and POST /v1/posts/{id}/comments
GET returns every comment on the post, team and client, oldest first. It is the same thread the app and the client's review page show. Each comment has the round it was written in.
POST adds a plain-text comment:
{ "body": "Can we use the photo of the shop?", "quote": "our new menu", "visibility": "internal" }
quote(optional) is the words of the post the comment is about.visibilityisinternal(the default) orclient. Aclientcomment shows on the client's review link and emails the client, at most once a day. Only owners and admins can write to the client. Anyone else's comment is saved as internal, and the answer says so.- The post's author gets an email, at most once an hour for each post.
Errors: body_required (400), invalid_visibility (400), not_found (404), rate_limited (429).
Send posts to a client: POST /v1/review-links
Make a client review link for drafts or upcoming scheduled posts. The client opens it in a browser with no login, and approves each post or asks for changes.
{
"title": "November posts",
"post_ids": ["3f9c2a8e-4b1d-4c6e-9a7f-2d5e8b1c0a93"],
"client_name": "Fernhill Coffee",
"emails": ["priya@example.com"],
"message": "Here are next week's posts.",
"auto_schedule": true
}
| Field | Notes |
|---|---|
title |
Required. What the client sees, up to 120 characters |
post_ids |
Required. 1 to 100 post IDs |
client_name |
Optional, up to 80 characters |
emails |
Optional. Up to 5 addresses, as an array or a comma-separated string. Each address gets its own link, so you can see who answered |
message |
Optional short note in the email, up to 500 characters |
expires_in_days |
1 to 90. The default is 30 |
password |
Optional. The client types it once on each device |
auto_schedule |
Default false: an approval is an answer your team acts on. With true, a client's approval schedules a draft for its time. The client confirms a 6-digit code sent to their email once on each device first, so give emails |
The answer has the link id, its url, post_count, and emailed: the addresses it was sent to and any that were skipped, with a reason (opted_out, bounced, limit, failed or just_sent). The link is kept even if the email cannot be sent. The answer then has email_error.
Errors: title_required, post_ids_required, invalid_expiry, invalid_password, no_reviewable_posts (400), rate_limited (429).
Read what clients answered
GET /v1/review-links: the workspace's review links with answer counts.GET /v1/review-links/{id}: one link and every post in it with the client's answer (approved,changes_requested, or none yet). A link in another workspace of your organization returns409 other_workspace. Send the call again with thex-pe-workspaceheader set to that workspace.GET /v1/review-links/decisions: what clients answered in the last 30 days, newest first. On a link that schedules when approved,outcomesays what the approval did:scheduled,past_time,no_time,no_accounts,blockedorneeds_team.
Webhooks
post.approval_requested: a draft was sent for approval.post.approved: an approver approved a post.
See Webhooks.
Not in the API yet
- Accepting or rejecting a suggested caption edit. Do this in the app.
- These endpoints in the MCP tools.
For the app side of approvals, read Post approvals and Client approvals and review links.