Webhooks API · subscriptions

Subscribe the calling app to topics at a URL

PUT /subscriptions/{subscriptionId}

Subscribe the calling app to topics at a URL, or change a subscription: the app mints subscriptionId (whs_…) and sends the whole of it.

Events from the moment of saving on are delivered — none from before. Appends webhooks.subscription-saved. 409 TopicNotGranted for a topic whose scope the installation was not granted; 400 UnsafeWebhookUrl for a URL that is not https or names a private address (a first-party app may name the platform's own hosts); 404 WebhookSubscriptionNotFound for an id another app holds. Idempotent by content: a retry that changes nothing is acknowledged and appends nothing.

Access

Requires a signed-in session: an app token: subscriptions and their deliveries belong to the calling app alone, and each topic is held to its own grant

Send Authorization: Bearer $APP_TOKEN.

How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.

Retries

Idempotent by content: a retry that changes nothing is acknowledged and appends nothing.

Why every write carries a key: Idempotency and retries.

Facts appended

  • webhooks.subscription-saved

What a fact is: Facts and the journal.

AI agent tool

No agent tool. An app's webhook plumbing — its subscriptions, delivery log and signing secret — answers that app's own token alone; an agent acts as a person and reads what happened through the journals' tools instead.

Connecting an agent: AI agents.

Example

curl
curl -X PUT 'https://webhooks.getmanifold.io/subscriptions/whs_01a158d9-6a70-7aa9-a2e3-50b645a781d0' \
  -H "Authorization: Bearer $APP_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://hooks.tidewater-labels.example/manifold",
  "topics": [
    "order.created",
    "shipment.shipped"
  ]
}'
JavaScript (fetch)
const response = await fetch("https://webhooks.getmanifold.io/subscriptions/whs_01a158d9-6a70-7aa9-a2e3-50b645a781d0", {
  method: "PUT",
  headers: { Authorization: `Bearer ${process.env.APP_TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "url": "https://hooks.tidewater-labels.example/manifold",
    "topics": [
      "order.created",
      "shipment.shipped"
    ]
  }),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();
Request body · application/json
{
  "url": "https://hooks.tidewater-labels.example/manifold",
  "topics": [
    "order.created",
    "shipment.shipped"
  ]
}
Response · 200 · application/json
{
  "id": "whs_01a158d9-6a70-7aa9-a2e3-50b645a781d0",
  "tenantId": "org_01a15889-fa80-7d83-add6-41f282c51558",
  "appId": "app_01a158db-8198-7d68-bdb3-a6b194c0ce9e",
  "installationId": "ins_01a158dd-98c0-7c1e-9f42-3b7d2a1e6c05",
  "url": "https://hooks.tidewater-labels.example/manifold",
  "topics": [
    "order.created",
    "shipment.shipped"
  ],
  "createdAt": "2026-10-20T11:00:00.000Z",
  "updatedAt": "2026-10-20T11:00:00.000Z"
}

The panel writes this call in other languages. It does not send it: Manifold's APIs do not take calls from a web page on another site, so run the call from your own code or terminal. The whole API as OpenAPI: webhooks.openapi.json. Base URL https://webhooks.getmanifold.io.

Errors

Every refusal is a status and a JSON body whose _tag names it. A refused call changes nothing.

400

RefusalWhat it meansWhat to do
UnsafeWebhookUrl url, reason The address is not a public HTTPS URL.Use a public HTTPS URL.

401

RefusalWhat it meansWhat to do
Unauthorized reason The token is missing, expired or not one Manifold issued.Get a fresh token and send the call again.
TokenAlreadyUsed tokenId A single-use app token was already spent.Mint a new token for this call.

402

RefusalWhat it meansWhat to do
SubscriptionRequired status The organization's subscription has lapsed, so writes are refused.An owner settles billing. Reads still work meanwhile.

403

RefusalWhat it meansWhat to do
AppTokenRequired reason Only an app's own token may call this, not a person's.Call it with the app's token.
TenantRequired userId The token names no organization.Choose the organization, then get a new token.
ScopeRequired required The token's roles do not grant the scope this call needs.Ask an owner or admin for a role that grants it.

404

RefusalWhat it meansWhat to do
WebhookSubscriptionNotFound subscriptionId No such record in this organization.Check the id in the path or the body.

409

RefusalWhat it meansWhat to do
TopicNotGranted topic, scope The app's grant does not cover this webhook topic. scope names what it needs.Ask for that scope in the app's grant.
MirroredFromSource source This area is fed by your source system until the organization goes live.Make the change in the source system, or go live first.

503

RefusalWhat it meansWhat to do
RequestLogUnavailable tokenId, reason The service could not record the request, so it did nothing.Send the same request again shortly.

How refusals work everywhere: Errors.