Add a webhook endpoint
create_webhookInstead of polling get_post, have Shager POST events to your HTTPS endpoint (a CRM, your agent's server): post.destination.published (data: post_id, destination_id, channel_id, network, account, format, remote_url, remote_post_id, published_at, notice), post.destination.failed (… error, unconfirmed), post.completed (post_id, status, counts, destinations[] with state and remote_url), approval.decided (post_id, approval_id, decision, post_status, reviewer.name, comment). Body: { id, type, created_at, data } (data always has workspace_id). The id is the same on every retry: dedupe on it. Order is not guaranteed. Headers: Shager-Event-Id, Shager-Event-Type and Shager-Signature: t=,v1=<hex HMAC-SHA256 of "." with the secret>. Verify it on the raw body in constant time and refuse timestamps older than 5 minutes. Answer 2xx within 10 s. Anything else (redirects included) is retried: 6 attempts over about a day. An endpoint whose every attempt fails for 3 days is turned off; a successful send_test_webhook turns it back on. Signing secret (whsec_…): the REST API returns it once, in this response. Through an AI assistant it is never returned: the person copies a fresh one in the app (the workspace's Settings → webhooks → "New signing key") and puts it in the receiving system. https only; private, local and credentialed URLs are refused. Up to 10 endpoints per workspace. Publishing never waits for webhooks. (Not available in an unclaimed sandbox.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | https:// URL that receives the events. | |
| events | No | Event types to send. Omit for every event, including ones added later. | |
| description | No | What it is for (shown in the app). | |
| workspace_id | Yes | Workspace id from list_workspaces |