Skip to content
ShapelessAI← Back
Publishing

Get post events by webhook

Register an https URL and get a signed POST the moment a post is published or fails for good, and as each comment under it and each plug settles, so a CRM, a Slack bot or an agent's own runtime reacts without polling.

View as Markdown

Signed per Standard Webhooks (HMAC-SHA256 over id, timestamp and body; any of their libraries verifies it in one call), retried on a backoff for about three days, every attempt in a delivery log that can resend one. Only public addresses are ever called. A test call proves the receiver before a post depends on it.

Ask in plain words

  • "tell my server when a post goes live"
  • "ping Slack when a post fails"
  • "webhook for published social posts"
  • "send post events to my n8n"

From an agent host (MCP)

Server: https://shapelessai.com/mcp (add it to your host).

  • webhooks_save: An https URL that gets a signed POST (Standard Webhooks: verify webhook-signature with the returned secret, dedupe on webhook-id) when a post is published or fails, and when each comment-chain item or plug settles: create one (no id; url, events default all), edit it (id; url, events, description, disabled, rotateSecret), send a signed webhook.test now (id, test: true), or delete it (id, delete: true). A non-2xx is retried for about three days; GET /api/webhooks/{id} is the delivery log. Needs the write scope.

From code (REST)

Bearer API key with the scope each call names (auth, OpenAPI).

  • GET /api/webhooks (read scope): The account's webhook endpoints, each with its signing secret.
  • POST /api/webhooks (write scope): Register an https URL for signed events: {url, events?, description?}; events default to all of post.published, post.failed, post.comment (each comment-chain item), post.plug (each plug). Signed per Standard Webhooks (webhook-id, webhook-timestamp, webhook-signature: HMAC-SHA256 with the secret); a non-2xx is retried for about three days.
  • GET /api/webhooks/{id} (read scope): One endpoint and its delivery log, newest first (50): event, status pending|delivered|failed, attempts, the last answer, the body sent.
  • PATCH /api/webhooks/{id} (write scope): Edit an endpoint: {url?, events?, description?, disabled?, rotateSecret?}. rotateSecret: true replaces the secret; the old one stops verifying at once.
  • DELETE /api/webhooks/{id} (write scope): Delete an endpoint; nothing still owed to it is sent.
  • POST /api/webhooks/{id}/test (write scope): Send one signed webhook.test event now and answer {ok, status, error, delivery}: proves the receiver before a post depends on it. Never retried.
  • POST /api/webhooks/{id}/deliveries/{deliveryId} (write scope): Send one logged delivery again now, same webhook-id, freshly signed; a failure goes back on the retry schedule.

The body

POST /api/webhooks:

  • url string, required: https, on a public address.
  • events array: Default: every event.
  • description string

PATCH /api/webhooks/{id}:

  • url string
  • events array
  • description string | null
  • disabled boolean
  • rotateSecret boolean (true)

From a terminal (CLI)

  • shapeless webhooks list
  • shapeless webhooks show
  • shapeless webhooks create
  • shapeless webhooks edit
  • shapeless webhooks test
  • shapeless webhooks redeliver
  • shapeless webhooks delete

Example

curl -s https://shapelessai.com/api/webhooks -H "Authorization: Bearer $SHAPELESS_API_KEY" -H "Content-Type: application/json" -d '{"url":"https://example.com/hooks/shapeless","events":["post.published","post.failed"]}'
// MCP tool call
{ "tool": "webhooks_save", "arguments": { "url": "https://example.com/hooks/shapeless" } }
shapeless webhooks create https://example.com/hooks/shapeless

Refusals

StatusMeaning
400Not an https URL, a private or internal address, an unknown event, or 10 endpoints already.
404No such webhook.
400Nothing to change or a bad field.
404No such delivery on this webhook.

Where else

More in Publishing

Publish a post · Post to a set of accounts · Tag posts and sign them · Share a post preview · Attach a sound to an Instagram Reel · Review the queue · Set the posting schedule · Answer comments and work the inbox

Every capability · Docs · /llms.txt