Skip to main content
Webhooks let mFoundry push real-time event notifications to your own infrastructure the moment something meaningful happens — a project is created, a workflow completes, or a task is assigned. The Webhooks API lets you register, inspect, and remove webhook subscriptions programmatically, without touching the dashboard. All webhook endpoints sit under /v1/webhooks.

GET /v1/webhooks

List all webhook subscriptions registered in your organization. Use this endpoint to audit active subscriptions or retrieve webhook IDs for deletion. Example response:

POST /v1/webhooks

Register a new webhook subscription. mFoundry will send an HTTP POST request to your specified URL each time one of the subscribed events fires.
string
required
The destination URL that mFoundry will deliver event payloads to. Must use https:// — plaintext HTTP endpoints are not accepted.
array
required
An array of event type strings to subscribe to. You must provide at least one event. Example: ["workflow.completed", "project.created"]. See the Available Events section below for all valid values.
string
A shared secret used to sign outgoing webhook payloads. If you omit this field, mFoundry auto-generates a cryptographically secure secret for you. The secret is returned once in the creation response and cannot be retrieved again.
Example response (201 Created):
The secret value is returned only in this creation response and is never exposed again through the API. Store it securely in your application’s secrets manager immediately. If you lose the secret, delete the webhook and create a new one.

DELETE /v1/webhooks/:id

Delete a webhook subscription. mFoundry immediately stops delivering events to the associated URL. This action cannot be undone. On success, the API returns 204 No Content with no response body.
string
required
The unique identifier of the webhook to delete (for example, wh_abc123).

Available Events

Subscribe to any combination of the following event types when creating a webhook:

Signature Verification

Every webhook payload mFoundry delivers includes an X-mFoundry-Signature header containing an HMAC-SHA256 hex digest, computed using your webhook’s secret and the raw request body. You should validate this signature before processing any payload to confirm that it originated from mFoundry and has not been tampered with. For a complete walkthrough of the verification algorithm, see the Webhooks configuration guide. The verification pattern looks like this:
Always use a constant-time comparison function (such as crypto.timingSafeEqual in Node.js or hmac.compare_digest in Python) when comparing HMAC signatures. Standard string equality operators are vulnerable to timing attacks that can leak information about the expected value.