Make a webhook

Makes a webhook for a project: its HTTPS address, the event types it takes (none named takes every type) and its signing secret, `whsec_…`, answered this once.

POST/v1/webhooks

Makes a webhook for a project: its HTTPS address, the event types it takes (none named takes every type) and its signing secret, whsec_…, answered this once. A key makes one for its own project; a person names the project. A project holds at most 10 (quota_exceeded naming max_webhooks). The address is https, carries no user name or password, and is not an internal or reserved address or name (invalid naming url); the same rule is checked again before every delivery. A repeat with the same Idempotency-Key answers conflict: the secret is never answered twice.

A key with the webhooks:write scope.

Request

curl -X POST "https://api.pod.mapier.ai/v1/webhooks" \
  -H "Authorization: Bearer $POD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"example"}'

Parameters

NameInTypeRequiredWhat it is
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Body

FieldTypeRequiredWhat it is
projectobjectNoThe project; a key's own when absent. A person names one.
urlstringYes
types"sandbox.creating" | "sandbox.running" | "sandbox.stopping" | "sandbox.sleeping" | "sandbox.waking" | "sandbox.stopped" | "sandbox.deleting" | "sandbox.deleted" | "sandbox.error" | "sandbox.changed"[]No
descriptionstringNo
enabledbooleanNoDefault true.

Answer

201. The webhook and its secret, shown this once.

201
{
  "webhook": {
    "id": "whk_3ahrz6dmv29gqy5ckt18fp",
    "project": "prj_3ahrz6dmv29gqy5ckt18fp",
    "url": "https://app.example.com",
    "types": ["sandbox.creating"],
    "description": null,
    "enabled": false,
    "disabled_reason": null,
    "secret_rotation_ends_at": null,
    "created_by": "example",
    "created_at": "2026-11-23T12:00:00.000Z",
    "updated_at": "2026-11-23T12:00:00.000Z"
  },
  "secret": "example"
}
FieldTypeAlwaysWhat it is
webhookWebhookYes
secretstringYeswhsec_ and the base64 of 32 random bytes. Shown once; Pod keeps it only encrypted for its cells. Check deliveries with it (Standard Webhooks v1; the SDKs' verifyWebhook).

Errors

The refusals this call is known for: invalid, forbidden, not_found, quota_exceeded. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptpod.webhooks.create({ url, … })
Pythonpod.webhooks.create(url=…, …)