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.
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
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
project | object | No | The project; a key's own when absent. A person names one. |
url | string | Yes | |
types | "sandbox.creating" | "sandbox.running" | "sandbox.stopping" | "sandbox.sleeping" | "sandbox.waking" | "sandbox.stopped" | "sandbox.deleting" | "sandbox.deleted" | "sandbox.error" | "sandbox.changed"[] | No | |
description | string | No | |
enabled | boolean | No | Default true. |
Answer
201. The webhook and its secret, shown this once.
{
"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"
}| Field | Type | Always | What it is |
|---|---|---|---|
webhook | Webhook | Yes | |
secret | string | Yes | whsec_ 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
| Client | Call |
|---|---|
| TypeScript | pod.webhooks.create({ url, … }) |
| Python | pod.webhooks.create(url=…, …) |