Approvals and webhooks

Hold an agent's post until a person approves it from a link, and get a signed POST when a post is published, fails or needs approval.

Telling your agent to post is your approval: the post goes out the way you asked. To see a post first, tell your agent to ask for approval, and nothing goes out until a person on your team approves it. Google Business Profile, Pinterest, TikTok and YouTube posts sent with an API key or the connector always wait for a person, as those platforms require. Postwyre can also tell your own systems when a post is published, when it fails, and when a post is waiting for approval.

Ask for approval

Send requireApproval: true with action set to schedule or now. It works on POST /api/posts and on the connector's create_post tool. Approval is asked for one post at a time. There is no brand setting that holds every agent post.

Hold a draft for review

Send requireApproval: true with action set to draft to have a person review a post before anything about it is sent, even before the brand has a connected account. Accounts can be left out, and scheduledAt, if given, is the time the post is proposed for. Nothing is sent or counted. When a person approves it:

  • If it has accounts and its time is still ahead, it goes into the queue at that time, as a scheduled post does once approved.
  • Otherwise it becomes a draft with no time: the proposed time is dropped, so the person who sends it sets the time then. A person in Postwyre can change it and send it, and can still change it once it is scheduled. An API key or the connector can't change or send it, only delete it.

Approving it never sends it early, and the page never offers to post it now.

With schedule or now, Postwyre checks the post as if it were being sent: the accounts, each platform's text limit, the schedule window and that the brand has a plan. A draft hold is checked for its text and proposed time, and, when it names accounts, as if it were being sent, except for the plan. Then it saves the post with status pending_approval. Nothing is sent and nothing is counted against the plan. The answer carries approval.url, the link to send a person.

To see what is still waiting, call list_pending_approvals on the connector, or GET /api/posts?status=pending_approval. Both include each link. Sending the same idempotencyKey again returns the same post and the same link.

The link opens a page that needs a person signed in to Postwyre. Any member of the post's brand can decide, whatever their role, and whichever brand they have open. Anyone else sees "This link does not work for you", the same message as for a link that does not exist.

Each link is for one post in one brand. It carries a signature Postwyre makes from the post and the brand, so it can't be guessed or changed to point at another post.

A link works for 7 days, or, for a post scheduled later than that, until 24 hours after the post's time, so a batch planned two weeks ahead keeps working links until each post is due. A deployment can set the 7 days from 1 to 30 with APPROVAL_LINK_DAYS. Once a link expires the post is never sent, and the scheduler marks it not_approved within the hour.

The approval page

The page shows one preview for each account, the way that platform shows the post, with its pictures or video. It is built to work on a phone. It has three buttons:

  • Approve sends the post the way the agent asked. A post set to now posts right away, and the page shows each account's result with a link to the live post. A scheduled post goes into the queue at its time. Either way it is counted against the plan when it is approved. If the plan's monthly media sent, or a trial's posts or media sent, is used up, nothing is approved or posted and the page says so above the buttons: the person who owns the plan gets an Open Billing link, and anyone else, an admin included, is told who owns the plan, by name when Postwyre can show one, and asked to have them change it. If its time has already passed, the button is Approve and post now.
  • Edit lets you change the text for each account on the page. Save, check the previews, then approve. Each platform's limit is checked when you save.
  • Reject asks you to confirm, with an optional reason of up to 500 characters, then marks the post not_approved. It is never sent and can't be changed. The agent reads the reason in approval.reason. You can delete it from the queue.

If someone else changed the post after you opened the page, Approve asks you to reload first, so you only ever approve the text you saw.

What an agent can't do

Only a person signed in to the app can approve, edit or reject. An API key or a connector sign-in is refused, so an agent can ask for approval but never give it. The one exception is the quality bar below, which an owner or admin turns on: then Postwyre approves a post that passes it, never the agent. While a post waits, the API and the connector can't change, send or retry it. The agent can delete it to withdraw the request. Once a scheduled post is approved it goes out as it was approved: its text, accounts and time can't be changed and it can't go back to a draft. It can still be deleted.

In the queue, posts waiting for approval have their own group with a Review and approve button that opens the same page.

Approve several at once

When an agent plans a week or two of posts, each with its own link, one page shows them all. The queue says how many posts are waiting, with Review all above the list, and list_pending_approvals and schedule_posts_bulk (with requireApproval) answer batchUrl, the same page as a link. It needs the same sign-in as a post's link: any member of the brand, and anyone else sees "This link does not work for you".

The page lists every post of the brand still waiting, soonest first, each as a card with its time and a preview of each account (tap an account's name to switch the preview). Each card has Approve, Edit, which opens that post's own page, and Reject. Approve all approves every post on the page as you saw it. A post that someone changed since you opened the page, or whose time has passed, is not approved: its card says why, and the rest still go. A post over the plan's monthly cap says so on its card and in the bar at the bottom of the page: the person who owns the plan gets an Open Billing link, and anyone else, an admin included, is told who owns the plan, by name when Postwyre can show one, and asked to have them change it. If some posts hit the pause for unusually high volume and others are over the plan's cap, the bar names the pause first, then gives the posts over the cap the same next step on a second line. A post whose time has passed can still be sent now from its own card. If approving needs a plan the brand does not have, Approve all approves nothing more and says so. It approves a few posts at a time, so when some were already approved before that, the page says how many, and those stay approved.

Quality bar

Approving every post by hand takes time when an agent plans a few weeks of them. An owner or admin can turn on Send posts that pass the quality bar without waiting for approval in Settings, Brand. It is off for every brand until then, and only a person signed in to Postwyre can turn it on or off: an API key or the connector can read it (GET /api/workspaces/current/quality-bar, or qualityBar in list_pending_approvals) but not change it. Each brand decides for itself, even brands on one plan.

With it on, a post your agent creates with requireApproval: true and action set to schedule or now is checked as soon as it is made. It goes out on its own, at its time, only when all of these hold:

  • The agent sent selfReview with the post, { "verdict": "pass", "reasons": ["..."] }: its own check of the post. Only the verdict is acted on. A post with no selfReview, or a fail verdict, waits for you.
  • Each platform would take it: its text limit and other rules.
  • Hashtags: at most 2 on X, 3 on LinkedIn and 1 on Threads, from the platform guide, and at most 30 on Instagram, its own limit. A brand voice that says no hashtags, or one to three, is held to that. @ mentions: at most 20.
  • No em or en dashes, and none of the phrases that read as written by AI, such as "delve", "let's dive in" or "I hope this helps".
  • The brand voice: none of its words to avoid, none of its claims to never make as written, and its emoji rule.
  • It is not a repeat of one of the account's last 30 posts: 80% or more of the same three-word runs counts as a repeat.
  • Every link is https and answers within 5 seconds with a page that loads. Up to 10 links are checked.
  • A picture or video is there when the platform needs one.
  • The account has room under the daily limit: at most 2 posts sent this way per account per day by default, counted by the day each goes out in the brand's time zone. An owner or admin can set it from 1 to 10.

A post that fails any of them waits for you exactly as before, and its approval page lists the reasons. list_pending_approvals answers them in heldBecause, and the post's approval.qualityBar has each check. A post that passes shows "Approved by the quality bar" in its history, with what was checked, and is counted against the plan like any approved post.

Some posts always wait for a person, whatever the bar says: posts to Google Business Profile, Pinterest, TikTok and YouTube, whose terms ask for a person to approve each post, and to LinkedIn, whose terms forbid automating posting. So do drafts held for review, posts held from the app, and every post of a brand with no plan yet, since the card is asked for at the first approval.

When you turn it on, Postwyre runs the posts already waiting through the bar once. One that passes is approved; if its time has gone by, it moves to the brand's next free posting time. One that fails stays waiting with its reasons. Posts made before agents could send selfReview have none, so they wait for you.

Webhooks

Add an endpoint

An owner or admin adds endpoints in the Webhooks section of the Team page. Enter an https address, pick the events, and click Add webhook. Postwyre shows the signing secret once, right after you add it. If you lose it, remove the endpoint and add it again. An owner or admin's connected AI app or key can do the same with the connector's list_webhooks, add_webhook and remove_webhook tools (see Connect your AI), with the same checks, and the secret is shown once there too.

The same is possible through the API from a signed-in session as an owner or admin. These REST routes refuse an API key. Through the connector, adding one needs an owner or admin key that can send, because an endpoint receives your post text.

  • GET /api/webhooks lists the brand's endpoints with the last result of each.
  • POST /api/webhooks with { "url": "https://...", "events": ["post.published", "post.failed", "post.approval_requested"] } adds one and answers with endpoint and secret.
  • DELETE /api/webhooks/{id} removes one, and anything still waiting to go to it.

These routes and the approval page's own route, /api/approvals/{token}, are in /openapi.json, marked as needing a signed-in session.

The address must be a public https address on port 443, with no sign-in details in it. Postwyre checks every address the name resolves to when you add it, and again on every request, and refuses local and private network addresses. It does not follow redirects, so give the final address.

Limits, shared by every brand on one plan:

  • Up to 3 endpoints.
  • Up to 400 requests a day, first tries and retries together, counted per UTC day. Past that, the rest wait for the next day, and any not sent within 24 hours of its event is dropped.
  • The brand needs a plan. Webhooks are sent by the scheduler, so they can't be added on a deployment where it is not turned on.

Events

  • post.published: one account's post went live. data has postId, deliveryId, platform, accountHandle, url (the live post) and publishedAt. A post to three accounts sends three.
  • post.failed: one account's post failed for good, after any automatic retries, or because the account was disconnected before it went out. data has postId, deliveryId, platform, accountHandle, attempts, errorCode, one of Postwyre's own codes, and error, why it failed in Postwyre's words (never the platform's raw text or error name).
  • post.approval_requested: a post was created with requireApproval, by an agent or through the API. data has postId, approvalUrl, action, scheduledAt, expiresAt and accounts.

The scheduler sends webhooks on its next pass. An event from a post going out or being changed usually arrives within a minute or two. One that waits for the scheduler's hourly pass, such as a disconnected account, arrives within the hour.

The request

Each event is a POST with a JSON body:

{
  "id": "evt_...",
  "type": "post.published",
  "createdAt": "2026-11-02T14:00:03.000Z",
  "workspaceId": "...",
  "data": { "postId": "...", "platform": "bluesky", "url": "https://bsky.app/profile/..." }
}

It carries three headers:

  • Postwyre-Event: the event type.
  • Postwyre-Event-Id: the same as id. It stays the same on every retry and on every endpoint, so store it and ignore an id you have already handled.
  • Postwyre-Signature: t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256 of <t>.<raw body> with your endpoint's secret.

To check a request, compute the HMAC over the raw body as received, compare it in constant time, and refuse a t more than five minutes old:

import { createHmac, timingSafeEqual } from "node:crypto";

function isFromPostwyre(secret, rawBody, header) {
  const parts = Object.fromEntries(header.split(",").map((part) => part.split("=")));
  const t = Number(parts.t);
  if (!parts.v1 || Math.abs(Date.now() / 1000 - t) > 300) return false;
  const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return parts.v1.length === expected.length && timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected));
}

Retries

Answer with any 2xx status to accept an event. Any other status, no answer within 5 seconds, or no connection counts as a failed try. Postwyre tries up to 5 times, waiting at least 1 minute, 5 minutes, 30 minutes and 2 hours between tries, and never longer than 24 hours after the event. Tries happen on the scheduler's passes, so the shortest real wait is about a minute. Each pass sends at most 3 requests to any one endpoint, so a slow endpoint does not hold up others. Then it stops. The Team page shows each endpoint's last result and its error in plain words. Postwyre keeps the record of each delivery for 30 days.

On this page