Webhooks

Being told when something happens, instead of asking. Deliveries are signed with the Standard Webhooks headers (webhook-id, webhook-timestamp, webhook-signature); acknowledge with a 2xx within 10 seconds.

Base URL https://app.mandala.computer/api/v1. Every request carries an API key, and failures take the shape under Errors.

GET/webhooks

List webhooksviewer+

Every webhook subscription on the account, with its health. No secret is ever in this list — the secret is shown once, when the subscription is created or its secret rotated.

An API key issued against a workspace sees the subscriptions confined to that workspace only.

Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials.

curl

base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body "${base_url%/}"'/webhooks' \
  -H "Authorization: Bearer $MANDALA_API_KEY"

Python — Mandala SDK 0.27.0

# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client

with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
    result = client.webhooks.list()
    print(result)

TypeScript — Mandala SDK 0.27.0

// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";

const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const result = await client.webhooks.list();
console.log(JSON.stringify(result, null, 2));

200 Illustrative successful response.

HTTP 200
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17

[
  {
    "id": "whk-e1f2a3b4c5d6e7f8",
    "url": "https://example.com/mandala-events",
    "description": "Desktop readiness notifications",
    "events": [
      "computer.ready"
    ],
    "computers": [],
    "enabled": true,
    "disabled_reason": null,
    "disabled_at": null,
    "last_success_at": null,
    "last_failure_at": null,
    "last_status": null,
    "last_error": null,
    "created_by": "apikey:key-0a1b2c3d4e5f",
    "created_at": "2026-09-16T12:00:00.000Z",
    "updated_at": "2026-09-16T12:00:00.000Z"
  }
]

401 Platform bearer credential missing.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer

{
  "error": "Authentication required",
  "reason": "missing",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential invalid.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "invalid API key",
  "reason": "invalid",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential revoked.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "API key revoked",
  "reason": "revoked",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

405 Unsupported method on this public path; HEAD returns these headers without a body.

HTTP 405
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Allow: GET, HEAD, POST, OPTIONS

{
  "error": "method not allowed",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

Response

The subscriptions, oldest first.

Response fields

idalwaysstring

whk- and sixteen hex characters.

urlalwaysstring

Where deliveries are POSTed. https:// only. The URL as the platform parsed it, which can differ in spelling from what you sent: the host lower-cased, a default port dropped, a bare origin ending in /.

descriptionalwaysstring

Free text, for your listing. Empty when you gave none.

eventsalwaysstring[]

The event types this subscription receives. Empty means every type. The vocabulary is the event socket’s (the computer’s events_url) less file.changed: window.opened, window.closed, window.focused, window.blurred, clipboard.changed, process.exited, computer.idle, computer.ready, computer.started, computer.stopped, computer.suspended.

computersalwaysstring[]

The computer ids this subscription receives events for. Empty means every computer in scope. Not checked against your computers when you set it — a subscription may name a computer you are about to create.

enabledalwaysboolean

Whether deliveries are made. Set false by the platform when an endpoint has failed for a day, when the account moves to a plan without webhooks, or when the person or key that created it loses access — see disabled_reason. Back to true by you with PATCH, which starts fresh, or, for plan, by the platform when you choose a plan again, which starts fresh too. An enabled subscription delivers nothing while its account is suspended, or while the person who created it or last turned it back on is suspended or has their seat suspended: it stays true and resumes by itself (see POST /webhooks).

disabled_reasonalways"customer" | "failing" | "plan" | "creator_removed" | "key_revoked" | "session_revoked" | "pre_verification" | "reset_unproven_identity" | "null"

Why enabled is false: customer when you disabled it, failing when the platform did — a delivery ran out of attempts and nothing had been accepted for 24 hours, counted from the later of the last 2xx and when the subscription was last enabled or its account reactivated — and plan when the account moved to a plan without webhooks. A plan subscription is enabled again, oldest first, as many as the plan allows, when the account chooses a plan that includes webhooks. creator_removed when the person behind created_by was removed from the account, left it, or was made a viewer; key_revoked when the API key in created_by was revoked as leaked from the dashboard, or the Connected app it was made through had its connection ended because a refresh token was presented again after it had been replaced; session_revoked when the dashboard session it was made, retargeted or turned back on from was signed out as leaked; pre_verification when it was made, retargeted or turned back on before that person's email was verified, and the first proof of the address (a password reset, the verification link or code, or a Google or GitHub sign-in) turned it off; reset_unproven_identity when that person reset their password and the reset disconnected a GitHub or Google sign-in whose email was never confirmed by a code, since whoever held that sign-in could have made it. None comes back on its own: an owner or member enables it with PATCH. null while enabled.

disabled_atalwaysstring or null

RFC 3339 timestamp, or null while enabled.

last_success_atalwaysstring or null

When the endpoint last answered 2xx to any delivery. null until it has.

last_failure_atalwaysstring or null

When a delivery attempt last failed. null until one has.

last_statusalwaysinteger or null

The HTTP status of the newest attempt, whatever it was. null before any attempt, or when the newest got no answer.

last_erroralwaysWebhookLastError or null

Why the newest attempt failed: when its failure was recorded, the status (or null for no answer), the one-line error and the delivery it was for. The newest by when the outcome was recorded, so a retry of an old delivery counts; an attempt still in flight does not, and nor does a delivery the platform dropped without sending. It stays until an attempt is accepted, whatever happens to the delivery row. null before any attempt has failed, and once the newest attempt was accepted. A failure recorded before this field existed is shown only when it is under six days old and its delivery is still kept, and may be null even then.

workspace_idstring

The workspace this subscription is confined to. Present only when it was created with a workspace-scoped API key; absent on an account-wide subscription.

created_byalwaysstring or null

Who created it, or last changed its url: the email of the person signed in to the dashboard, or apikey: and the key- id of the API key they used, as the audit log names them. This is whose removal, demotion to viewer or leaked key disables it (disabled_reason). null to a workspace-scoped key when it was a person, whose address such a key is not told.

created_atalwaysstring

RFC 3339 timestamp.

updated_atalwaysstring

RFC 3339 timestamp.

Failures

403

Also, with no reason, to a key limited to computers: this is not a call it may make. A suspended account may still make this read: a 403 here is about the credential or the person holding it, never the account’s suspension.

POST/webhooks

Create a webhookmember+

Subscribe an HTTPS endpoint to this account’s events. The answer carries the signing secret once; it is not readable again, and POST /webhooks/{id}/rotate is how you get a new one.

WHAT ARRIVES. A POST per event to url, whose body is the event object exactly as the computer’s event socket (its events_url) frames it — type, at, computer, seq, cursor, source, data — byte for byte, with nothing added and nothing wrapped around it. cursor is the bridge back to the stream: a job woken by process.exited that wants everything since can open the computer’s events_url with since= that cursor added. computer says which machine, and every subscription may receive events from many. Two bodies are not events and lack fields: a gap (below) has no seq, and a test delivery (type: "webhook.test", from POST /webhooks/{id}/test) has neither seq nor cursor. data is left out of an event that has none. WebhookEvent in the OpenAPI document (its top-level webhooks) is all three as a schema.

HEADERS. content-type: application/json, user-agent: Mandala-Webhooks/1, and the three [Standard Webhooks](https://www.standardwebhooks.com) headers: webhook-id (the delivery id, unchanged across retries), webhook-timestamp (Unix seconds, the time of THIS attempt) and webhook-signature (v1, and base64 of HMAC-SHA256 over <id>.<timestamp>.<raw body>, keyed by the secret’s bytes after whsec_, base64-decoded). Any Standard Webhooks verifier library checks it; verify the RAW request bytes, never a re-serialised body. Refuse a webhook-timestamp more than 300 seconds from your clock, and remember each webhook-id you accept for at least that long — together those two close every replay, and a retry of a delivery you already accepted is then recognised rather than processed twice. mandala-subscription names the subscription and is NOT signed: route on it, never authorise on it.

ACKNOWLEDGE WITH A 2xx BEFORE DOING THE WORK. An attempt is cut at 10 seconds and counted as a failure; anything else — a non-2xx, a timeout, a refused connection, a TLS error, a redirect (never followed) — is retried: eight attempts over about fourteen hours (30 s, 2 min, 10 min, 30 min, 1 h, 4 h, 8 h), then the delivery is exhausted: list those with GET /webhooks/{id}/deliveries?state=exhausted, and read the newest failure on the subscription’s last_error. Retries carry the same webhook-id and a fresh timestamp and signature. No ordering is promised: deliveries for one subscription run four at a time and retries interleave with new events, so order by seq per computer if you care. At least once while the account is active, and nothing is dropped without a record, apart from what a suspension of the account or of the subscription’s creator skips (below) and the guest’s own limits: events with source: "guest" reach webhooks at a limited rate per computer, and one whose data is over 16 KiB of JSON is not sent at all. Both still reach the computer’s events_url.

A FULL QUEUE. A subscription holds at most 10,000 deliveries not yet finished (pending or in_flight). An event that arrives while it is full is not queued: it is recorded as a dropped delivery with last_error: "queue full" (GET /webhooks/{id}/deliveries?state=dropped) and never sent. What was already queued is kept, a gap is still queued, and new events queue again as the backlog drains. Read the missed events from the computer’s events_url while its stream still holds them.

AN ENDPOINT THAT KEEPS FAILING IS DISABLED: when a delivery runs out of attempts and nothing has been accepted for 24 hours, enabled becomes false with disabled_reason: "failing", pending deliveries are dropped, and PATCH {"enabled": true} starts it again. The 24 hours count from the later of the last 2xx and when the subscription was last enabled: created enabled, enabled again with PATCH, turned back on by a plan, or its account reactivated. So an endpoint enabled again gets a fresh 24 hours, not the remainder of a day that began at its last 2xx.

WHEN THE PLAN ENDS. An account that moves to a plan without webhooks has every enabled subscription disabled with disabled_reason: "plan". Deliveries already queued are still made (unless the account is suspended, below), and so is one more kind for the next 24 hours: computer.stopped, so you hear about the computers stopped because the plan ended (subject to the subscription’s own events and computers). Nothing else is queued. Until the account has a plan again, a new url, enabled: true and a test are 402; reading, filters, rotating and deleting still work. Choosing a plan that includes webhooks enables them again, oldest first, as many as it allows, each starting fresh as a PATCH would; the rest stay disabled with disabled_reason: "plan".

WHILE THE ACCOUNT IS SUSPENDED nothing new is queued and nothing is sent, whatever the plan. Events the platform reads while it is suspended are skipped for good: they are never delivered, and neither a gap nor the computer.stopped above stands in for them. That turns on when an event is read, not when it happened, so one from just before the suspension can be skipped and one from late in it can still arrive after reactivation. Reconcile with a listing and each computer’s events_url after reactivation. Subscriptions keep their settings. Deliveries already pending stay pending, next_at possibly in the past, and go out after reactivation however long that takes, with the original body and a fresh webhook-timestamp, so at can be old. An attempt not yet started spends no attempt and counts nothing against the endpoint; one under way finishes and records its result. Reactivation restarts the 24 hours above. GET /webhooks, GET /webhooks/{id} and GET /webhooks/{id}/deliveries still answer; every write, POST /webhooks/{id}/test included, is a 403 with reason: "revoked".

WHILE ITS CREATOR IS SUSPENDED. A subscription is paused while the person who created it, or the person who last turned it back on, is suspended by the platform or has their seat on the account suspended. It still reads enabled: true with no disabled_reason, but nothing new is queued for it: events the platform reads during the pause are skipped for good, as for a suspended account. Deliveries queued before the pause are dropped as they come up for sending, with last_error: "paused: the person this subscription answers for is suspended". Delivery resumes by itself when that person or seat is restored; reconcile from each computer’s events_url then. A person removed from the account, or made a viewer, disables it instead (creator_removed).

GAPS. If the hypervisor holding a computer was unreachable for longer than its event journal holds, you get a {"type": "gap", "computer": …} delivery whose data.detail says events were lost and whose cursor is the computer’s own — the same frame the socket sends, and it arrives whatever events filters on. Reconcile with a listing rather than assume nothing happened.

A plan that includes webhooks allows ten subscriptions per account, and the eleventh is a 409 naming the cap; a trial includes none (402). The count is the whole account’s, so an API key confined to a workspace can meet the cap while GET /webhooks shows it fewer than ten.

Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials.

curl

base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body -X POST "${base_url%/}"'/webhooks' \
  -H "Authorization: Bearer $MANDALA_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{"url":"https://ci.example.com/mandala","events":["process.exited","computer.ready"]}'

Python — Mandala SDK 0.27.0

# Python 3.10+: pip install mandala-computer==0.27.0
import json, os
from mandala_computer import Client

with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
    body = json.loads("{\"url\":\"https://ci.example.com/mandala\",\"events\":[\"process.exited\",\"computer.ready\"]}")
    result = client.webhooks.create(body["url"], events=body["events"])
    print("Secret returned once; store result.secret securely without logging it.")

TypeScript — Mandala SDK 0.27.0

// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";

const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const body = {"url":"https://ci.example.com/mandala","events":["process.exited","computer.ready"]};
const result = await client.webhooks.create(body);
console.log("Secret returned once; store result.secret securely without logging it.");

201 Illustrative successful response.

HTTP 201
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17

{
  "id": "whk-e1f2a3b4c5d6e7f8",
  "url": "https://ci.example.com/mandala",
  "description": "",
  "events": [
    "process.exited",
    "computer.ready"
  ],
  "computers": [],
  "enabled": true,
  "disabled_reason": null,
  "disabled_at": null,
  "last_success_at": null,
  "last_failure_at": null,
  "last_status": null,
  "last_error": null,
  "created_by": "apikey:key-0a1b2c3d4e5f",
  "created_at": "2026-09-16T12:00:00.000Z",
  "updated_at": "2026-09-16T12:00:00.000Z",
  "secret": "whsec_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8="
}

401 Platform bearer credential missing.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer

{
  "error": "Authentication required",
  "reason": "missing",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential invalid.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "invalid API key",
  "reason": "invalid",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential revoked.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "API key revoked",
  "reason": "revoked",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

405 Unsupported method on this public path; HEAD returns these headers without a body.

HTTP 405
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Allow: GET, HEAD, POST, OPTIONS

{
  "error": "method not allowed",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

Request body

urlrequiredstring

Where to POST. https:// only, no username or password in it, at most 2048 characters — counted on the string you send, before it is parsed, so a non-ASCII character may count as two — and it must resolve to a public address — a hostname whose answers include a private, loopback, link-local or otherwise reserved address is refused, and so is a literal one. A port other than 443 is fine. The name is looked up when you send it: one that does not resolve then is a 400 (<host> did not resolve) even when the cause is a passing DNS failure, so a name you have not published yet cannot be registered, and the same request works once it resolves. The lookup is given about 5 seconds: a name whose nameservers do not answer in that time is a 400 too, <host> did not resolve in time, and is worth sending again. What is stored is the URL as parsed: the host lower-cased, a default port dropped, and a / added to a bare origin, so compare against the stored url rather than what you sent. At most 2048 characters.

descriptionstring

Free text for your listing, up to 200 characters. At most 200 characters.

events"window.opened" | "window.closed" | "window.focused" | "window.blurred" | "clipboard.changed" | "process.exited" | "computer.idle" | "computer.ready" | "computer.started" | "computer.stopped" | "computer.suspended"[]

Event types to deliver, from the vocabulary on Webhook. Omit or send [] for every type. An unknown type is a 400 that lists them.

computersstring[]

Computer ids to deliver for, up to 64, each a non-empty string of at most 64 characters. Omit or send [] for every computer in scope. At most 64 items.

enabledboolean

Start it disabled with false, to enable later. Defaults to true.

Response

The subscription, with its secret — shown once.

Response fields

idalwaysstring

whk- and sixteen hex characters.

urlalwaysstring

Where deliveries are POSTed.

descriptionalwaysstring
eventsalwaysstring[]

As on Webhook.

computersalwaysstring[]

As on Webhook.

enabledalwaysboolean
disabled_reasonalwaysstring or null
disabled_atalwaysstring or null
last_success_atalwaysstring or null
last_failure_atalwaysstring or null
last_statusalwaysinteger or null
last_erroralwaysWebhookLastError or null
workspace_idstring

As on Webhook: present only on a workspace-confined subscription.

created_byalwaysstring or null

As on Webhook.

created_atalwaysstring

RFC 3339 timestamp.

updated_atalwaysstring

RFC 3339 timestamp.

secretalwaysstring

The signing secret: whsec_ and 44 characters of base64. Shown here and never again — store it now. Every delivery is signed with it; see the resource description for how to verify.

Failures

403

Also, with no reason, Verify your email before creating, retargeting, re-enabling or rotating a webhook.: the person this credential belongs to has not verified their email address. Nothing is changed; verify it in the dashboard first.

Also, with no reason, to a key with an expires_at: this would grant access that outlives it. Use the dashboard or a key that does not expire.

Also, with no reason, to a key limited to computers: this is not a call it may make.

413

This route reads at most 16 KiB (16384 bytes) of request body, less than the general cap.

GET/webhooks/{id}

Read a webhookviewer+

One subscription, with its health: when the endpoint last accepted a delivery, when one last failed, the status of the newest attempt, and whether the platform has disabled it. Never the secret.

Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials.

curl

base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body "${base_url%/}"'/webhooks/whk-e1f2a3b4c5d6e7f8' \
  -H "Authorization: Bearer $MANDALA_API_KEY"

Python — Mandala SDK 0.27.0

# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client

with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
    id = "whk-e1f2a3b4c5d6e7f8"
    result = client.webhooks.get(id)
    print(result)

TypeScript — Mandala SDK 0.27.0

// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";

const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "whk-e1f2a3b4c5d6e7f8";
const result = await client.webhooks.get(id);
console.log(JSON.stringify(result, null, 2));

200 Illustrative successful response.

HTTP 200
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17

{
  "id": "whk-e1f2a3b4c5d6e7f8",
  "url": "https://example.com/mandala-events",
  "description": "Desktop readiness notifications",
  "events": [
    "computer.ready"
  ],
  "computers": [],
  "enabled": true,
  "disabled_reason": null,
  "disabled_at": null,
  "last_success_at": null,
  "last_failure_at": null,
  "last_status": null,
  "last_error": null,
  "created_by": "apikey:key-0a1b2c3d4e5f",
  "created_at": "2026-09-16T12:00:00.000Z",
  "updated_at": "2026-09-16T12:00:00.000Z"
}

401 Platform bearer credential missing.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer

{
  "error": "Authentication required",
  "reason": "missing",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential invalid.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "invalid API key",
  "reason": "invalid",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential revoked.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "API key revoked",
  "reason": "revoked",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

405 Unsupported method on this public path; HEAD returns these headers without a body.

HTTP 405
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Allow: GET, HEAD, PATCH, DELETE, OPTIONS

{
  "error": "method not allowed",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

Path parameters

idrequiredstring

The webhook id.

Response

The subscription.

Response fields

idalwaysstring

whk- and sixteen hex characters.

urlalwaysstring

Where deliveries are POSTed. https:// only. The URL as the platform parsed it, which can differ in spelling from what you sent: the host lower-cased, a default port dropped, a bare origin ending in /.

descriptionalwaysstring

Free text, for your listing. Empty when you gave none.

eventsalwaysstring[]

The event types this subscription receives. Empty means every type. The vocabulary is the event socket’s (the computer’s events_url) less file.changed: window.opened, window.closed, window.focused, window.blurred, clipboard.changed, process.exited, computer.idle, computer.ready, computer.started, computer.stopped, computer.suspended.

computersalwaysstring[]

The computer ids this subscription receives events for. Empty means every computer in scope. Not checked against your computers when you set it — a subscription may name a computer you are about to create.

enabledalwaysboolean

Whether deliveries are made. Set false by the platform when an endpoint has failed for a day, when the account moves to a plan without webhooks, or when the person or key that created it loses access — see disabled_reason. Back to true by you with PATCH, which starts fresh, or, for plan, by the platform when you choose a plan again, which starts fresh too. An enabled subscription delivers nothing while its account is suspended, or while the person who created it or last turned it back on is suspended or has their seat suspended: it stays true and resumes by itself (see POST /webhooks).

disabled_reasonalways"customer" | "failing" | "plan" | "creator_removed" | "key_revoked" | "session_revoked" | "pre_verification" | "reset_unproven_identity" | "null"

Why enabled is false: customer when you disabled it, failing when the platform did — a delivery ran out of attempts and nothing had been accepted for 24 hours, counted from the later of the last 2xx and when the subscription was last enabled or its account reactivated — and plan when the account moved to a plan without webhooks. A plan subscription is enabled again, oldest first, as many as the plan allows, when the account chooses a plan that includes webhooks. creator_removed when the person behind created_by was removed from the account, left it, or was made a viewer; key_revoked when the API key in created_by was revoked as leaked from the dashboard, or the Connected app it was made through had its connection ended because a refresh token was presented again after it had been replaced; session_revoked when the dashboard session it was made, retargeted or turned back on from was signed out as leaked; pre_verification when it was made, retargeted or turned back on before that person's email was verified, and the first proof of the address (a password reset, the verification link or code, or a Google or GitHub sign-in) turned it off; reset_unproven_identity when that person reset their password and the reset disconnected a GitHub or Google sign-in whose email was never confirmed by a code, since whoever held that sign-in could have made it. None comes back on its own: an owner or member enables it with PATCH. null while enabled.

disabled_atalwaysstring or null

RFC 3339 timestamp, or null while enabled.

last_success_atalwaysstring or null

When the endpoint last answered 2xx to any delivery. null until it has.

last_failure_atalwaysstring or null

When a delivery attempt last failed. null until one has.

last_statusalwaysinteger or null

The HTTP status of the newest attempt, whatever it was. null before any attempt, or when the newest got no answer.

last_erroralwaysWebhookLastError or null

Why the newest attempt failed: when its failure was recorded, the status (or null for no answer), the one-line error and the delivery it was for. The newest by when the outcome was recorded, so a retry of an old delivery counts; an attempt still in flight does not, and nor does a delivery the platform dropped without sending. It stays until an attempt is accepted, whatever happens to the delivery row. null before any attempt has failed, and once the newest attempt was accepted. A failure recorded before this field existed is shown only when it is under six days old and its delivery is still kept, and may be null even then.

workspace_idstring

The workspace this subscription is confined to. Present only when it was created with a workspace-scoped API key; absent on an account-wide subscription.

created_byalwaysstring or null

Who created it, or last changed its url: the email of the person signed in to the dashboard, or apikey: and the key- id of the API key they used, as the audit log names them. This is whose removal, demotion to viewer or leaked key disables it (disabled_reason). null to a workspace-scoped key when it was a person, whose address such a key is not told.

created_atalwaysstring

RFC 3339 timestamp.

updated_atalwaysstring

RFC 3339 timestamp.

Failures

403

Also, with no reason, to a key limited to computers: this is not a call it may make. A suspended account may still make this read: a 403 here is about the credential or the person holding it, never the account’s suspension.

PATCH/webhooks/{id}

Update a webhookmember+

Change the endpoint, the description, the filters, or enabled. Fields you omit are left as they are; a body that names none of them is a 400.

A new url is checked exactly as on create. enabled: true clears a failing disable and starts fresh: the 24 hours before it can be disabled for failing again count from now, not from its last 2xx. Sent to a subscription that is already enabled, it does not restart them. enabled: false stops deliveries and records that you chose to. It is not a pause that holds events for later: most events while it is disabled are never queued, and a queued delivery whose next attempt falls due while it is disabled is dropped. Nor is it a clean cut: a retry that was not yet due, or an event that reaches the platform late, can still be delivered after you enable it again. Read the computer’s events_url with since= to reconcile, and dedupe on webhook-id.

While the account’s plan includes no webhooks, a body with a url or with enabled: true is a 402 and nothing changes; the description, the filters and enabled: false can still be set.

Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials.

curl

base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body -X PATCH "${base_url%/}"'/webhooks/whk-e1f2a3b4c5d6e7f8' \
  -H "Authorization: Bearer $MANDALA_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{"enabled":true}'

Python — Mandala SDK 0.27.0

# Python 3.10+: pip install mandala-computer==0.27.0
import json, os
from mandala_computer import Client

with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
    id = "whk-e1f2a3b4c5d6e7f8"
    body = json.loads("{\"enabled\":true}")
    result = client.webhooks.update(id, **body)
    print(result)

TypeScript — Mandala SDK 0.27.0

// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";

const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "whk-e1f2a3b4c5d6e7f8";
const body = {"enabled":true};
const result = await client.webhooks.update(id, body);
console.log(JSON.stringify(result, null, 2));

200 Illustrative successful response.

HTTP 200
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17

{
  "id": "whk-e1f2a3b4c5d6e7f8",
  "url": "https://example.com/mandala-events",
  "description": "Desktop readiness notifications",
  "events": [
    "computer.ready"
  ],
  "computers": [],
  "enabled": true,
  "disabled_reason": null,
  "disabled_at": null,
  "last_success_at": null,
  "last_failure_at": null,
  "last_status": null,
  "last_error": null,
  "created_by": "apikey:key-0a1b2c3d4e5f",
  "created_at": "2026-09-16T12:00:00.000Z",
  "updated_at": "2026-09-16T12:00:01.000Z"
}

401 Platform bearer credential missing.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer

{
  "error": "Authentication required",
  "reason": "missing",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential invalid.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "invalid API key",
  "reason": "invalid",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential revoked.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "API key revoked",
  "reason": "revoked",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

405 Unsupported method on this public path; HEAD returns these headers without a body.

HTTP 405
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Allow: GET, HEAD, PATCH, DELETE, OPTIONS

{
  "error": "method not allowed",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

Path parameters

idrequiredstring

The webhook id.

Request body

urlstring

Where to POST. https:// only, no username or password in it, at most 2048 characters — counted on the string you send, before it is parsed, so a non-ASCII character may count as two — and it must resolve to a public address — a hostname whose answers include a private, loopback, link-local or otherwise reserved address is refused, and so is a literal one. A port other than 443 is fine. The name is looked up when you send it: one that does not resolve then is a 400 (<host> did not resolve) even when the cause is a passing DNS failure, so a name you have not published yet cannot be registered, and the same request works once it resolves. The lookup is given about 5 seconds: a name whose nameservers do not answer in that time is a 400 too, <host> did not resolve in time, and is worth sending again. What is stored is the URL as parsed: the host lower-cased, a default port dropped, and a / added to a bare origin, so compare against the stored url rather than what you sent. At most 2048 characters.

descriptionstring

Free text for your listing, up to 200 characters. At most 200 characters.

events"window.opened" | "window.closed" | "window.focused" | "window.blurred" | "clipboard.changed" | "process.exited" | "computer.idle" | "computer.ready" | "computer.started" | "computer.stopped" | "computer.suspended"[]

Event types to deliver, from the vocabulary on Webhook. Omit or send [] for every type. An unknown type is a 400 that lists them.

computersstring[]

Computer ids to deliver for, up to 64, each a non-empty string of at most 64 characters. Omit or send [] for every computer in scope. At most 64 items.

enabledboolean

Whether deliveries are made.

Response

The subscription as stored.

Response fields

idalwaysstring

whk- and sixteen hex characters.

urlalwaysstring

Where deliveries are POSTed. https:// only. The URL as the platform parsed it, which can differ in spelling from what you sent: the host lower-cased, a default port dropped, a bare origin ending in /.

descriptionalwaysstring

Free text, for your listing. Empty when you gave none.

eventsalwaysstring[]

The event types this subscription receives. Empty means every type. The vocabulary is the event socket’s (the computer’s events_url) less file.changed: window.opened, window.closed, window.focused, window.blurred, clipboard.changed, process.exited, computer.idle, computer.ready, computer.started, computer.stopped, computer.suspended.

computersalwaysstring[]

The computer ids this subscription receives events for. Empty means every computer in scope. Not checked against your computers when you set it — a subscription may name a computer you are about to create.

enabledalwaysboolean

Whether deliveries are made. Set false by the platform when an endpoint has failed for a day, when the account moves to a plan without webhooks, or when the person or key that created it loses access — see disabled_reason. Back to true by you with PATCH, which starts fresh, or, for plan, by the platform when you choose a plan again, which starts fresh too. An enabled subscription delivers nothing while its account is suspended, or while the person who created it or last turned it back on is suspended or has their seat suspended: it stays true and resumes by itself (see POST /webhooks).

disabled_reasonalways"customer" | "failing" | "plan" | "creator_removed" | "key_revoked" | "session_revoked" | "pre_verification" | "reset_unproven_identity" | "null"

Why enabled is false: customer when you disabled it, failing when the platform did — a delivery ran out of attempts and nothing had been accepted for 24 hours, counted from the later of the last 2xx and when the subscription was last enabled or its account reactivated — and plan when the account moved to a plan without webhooks. A plan subscription is enabled again, oldest first, as many as the plan allows, when the account chooses a plan that includes webhooks. creator_removed when the person behind created_by was removed from the account, left it, or was made a viewer; key_revoked when the API key in created_by was revoked as leaked from the dashboard, or the Connected app it was made through had its connection ended because a refresh token was presented again after it had been replaced; session_revoked when the dashboard session it was made, retargeted or turned back on from was signed out as leaked; pre_verification when it was made, retargeted or turned back on before that person's email was verified, and the first proof of the address (a password reset, the verification link or code, or a Google or GitHub sign-in) turned it off; reset_unproven_identity when that person reset their password and the reset disconnected a GitHub or Google sign-in whose email was never confirmed by a code, since whoever held that sign-in could have made it. None comes back on its own: an owner or member enables it with PATCH. null while enabled.

disabled_atalwaysstring or null

RFC 3339 timestamp, or null while enabled.

last_success_atalwaysstring or null

When the endpoint last answered 2xx to any delivery. null until it has.

last_failure_atalwaysstring or null

When a delivery attempt last failed. null until one has.

last_statusalwaysinteger or null

The HTTP status of the newest attempt, whatever it was. null before any attempt, or when the newest got no answer.

last_erroralwaysWebhookLastError or null

Why the newest attempt failed: when its failure was recorded, the status (or null for no answer), the one-line error and the delivery it was for. The newest by when the outcome was recorded, so a retry of an old delivery counts; an attempt still in flight does not, and nor does a delivery the platform dropped without sending. It stays until an attempt is accepted, whatever happens to the delivery row. null before any attempt has failed, and once the newest attempt was accepted. A failure recorded before this field existed is shown only when it is under six days old and its delivery is still kept, and may be null even then.

workspace_idstring

The workspace this subscription is confined to. Present only when it was created with a workspace-scoped API key; absent on an account-wide subscription.

created_byalwaysstring or null

Who created it, or last changed its url: the email of the person signed in to the dashboard, or apikey: and the key- id of the API key they used, as the audit log names them. This is whose removal, demotion to viewer or leaked key disables it (disabled_reason). null to a workspace-scoped key when it was a person, whose address such a key is not told.

created_atalwaysstring

RFC 3339 timestamp.

updated_atalwaysstring

RFC 3339 timestamp.

Failures

403

Also, with no reason, Verify your email before creating, retargeting, re-enabling or rotating a webhook.: the person this credential belongs to has not verified their email address. Nothing is changed; verify it in the dashboard first. Only for a url other than the one it has, or enabled: true on a disabled subscription; the description, the filters, enabled: false and a resent url are not refused.

Also, with no reason, to a key with an expires_at: this would grant access that outlives it. Use the dashboard or a key that does not expire.

Also, with no reason, to a key limited to computers: this is not a call it may make.

413

This route reads at most 16 KiB (16384 bytes) of request body, less than the general cap.

DELETE/webhooks/{id}

Delete a webhookmember+

Removes the subscription and every delivery record it holds, pending ones included. Nothing more is sent to the endpoint.

Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials.

curl

base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body -X DELETE "${base_url%/}"'/webhooks/whk-e1f2a3b4c5d6e7f8' \
  -H "Authorization: Bearer $MANDALA_API_KEY"

Python — Mandala SDK 0.27.0

# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client

with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
    id = "whk-e1f2a3b4c5d6e7f8"
    result = client.webhooks.delete(id)
    print(result)

TypeScript — Mandala SDK 0.27.0

// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";

const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "whk-e1f2a3b4c5d6e7f8";
const result = await client.webhooks.delete(id);
console.log(JSON.stringify(result, null, 2));

200 Illustrative successful response.

HTTP 200
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17

{
  "ok": true
}

401 Platform bearer credential missing.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer

{
  "error": "Authentication required",
  "reason": "missing",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential invalid.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "invalid API key",
  "reason": "invalid",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential revoked.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "API key revoked",
  "reason": "revoked",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

405 Unsupported method on this public path; HEAD returns these headers without a body.

HTTP 405
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Allow: GET, HEAD, PATCH, DELETE, OPTIONS

{
  "error": "method not allowed",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

Path parameters

idrequiredstring

The webhook id.

Response

Gone.

Response fields

okboolean

Always true. A failure is a status code, not ok: false.

Failures

403

Also, with no reason, to a key limited to computers: this is not a call it may make.

POST/webhooks/{id}/rotate

Rotate a webhook secretmember+

Mints a new secret and answers it — once, like a create. The old one goes on being honoured for 24 hours: every delivery in that window carries two signatures on the one webhook-signature header, new first, separated by a space, and a verifier that accepts either passes throughout. Rotating again inside the window replaces the previous secret rather than keeping three.

Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials.

curl

base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body -X POST "${base_url%/}"'/webhooks/whk-e1f2a3b4c5d6e7f8/rotate' \
  -H "Authorization: Bearer $MANDALA_API_KEY"

Python — Mandala SDK 0.27.0

# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client

with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
    id = "whk-e1f2a3b4c5d6e7f8"
    result = client.webhooks.rotate(id)
    print("Secret returned once; store result.secret securely without logging it.")

TypeScript — Mandala SDK 0.27.0

// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";

const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "whk-e1f2a3b4c5d6e7f8";
const result = await client.webhooks.rotate(id);
console.log("Secret returned once; store result.secret securely without logging it.");

200 Illustrative successful response.

HTTP 200
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17

{
  "id": "whk-e1f2a3b4c5d6e7f8",
  "url": "https://example.com/mandala-events",
  "description": "Desktop readiness notifications",
  "events": [
    "computer.ready"
  ],
  "computers": [],
  "enabled": true,
  "disabled_reason": null,
  "disabled_at": null,
  "last_success_at": null,
  "last_failure_at": null,
  "last_status": null,
  "last_error": null,
  "created_by": "apikey:key-0a1b2c3d4e5f",
  "created_at": "2026-09-16T12:00:00.000Z",
  "updated_at": "2026-09-16T12:00:01.000Z",
  "secret": "whsec_Hx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQA="
}

401 Platform bearer credential missing.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer

{
  "error": "Authentication required",
  "reason": "missing",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential invalid.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "invalid API key",
  "reason": "invalid",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential revoked.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "API key revoked",
  "reason": "revoked",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

405 Unsupported method on this public path; HEAD returns these headers without a body.

HTTP 405
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Allow: POST, OPTIONS

{
  "error": "method not allowed",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

Path parameters

idrequiredstring

The webhook id.

Response

The subscription, with its new secret — shown once.

Response fields

idalwaysstring

whk- and sixteen hex characters.

urlalwaysstring

Where deliveries are POSTed.

descriptionalwaysstring
eventsalwaysstring[]

As on Webhook.

computersalwaysstring[]

As on Webhook.

enabledalwaysboolean
disabled_reasonalwaysstring or null
disabled_atalwaysstring or null
last_success_atalwaysstring or null
last_failure_atalwaysstring or null
last_statusalwaysinteger or null
last_erroralwaysWebhookLastError or null
workspace_idstring

As on Webhook: present only on a workspace-confined subscription.

created_byalwaysstring or null

As on Webhook.

created_atalwaysstring

RFC 3339 timestamp.

updated_atalwaysstring

RFC 3339 timestamp.

secretalwaysstring

The signing secret: whsec_ and 44 characters of base64. Shown here and never again — store it now. Every delivery is signed with it; see the resource description for how to verify.

Failures

403

Also, with no reason, Verify your email before creating, retargeting, re-enabling or rotating a webhook.: the person this credential belongs to has not verified their email address. Nothing is changed; verify it in the dashboard first.

Also, with no reason, to a key with an expires_at: this would grant access that outlives it. Use the dashboard or a key that does not expire.

Also, with no reason, to a key limited to computers: this is not a call it may make.

POST/webhooks/{id}/test

Send a test deliverymember+

Queues one signed delivery of a synthetic event — {"type": "webhook.test", "computer": "", "source": "control-plane", "at": …, "data": {"subscription": …}} — through the ordinary path, so it is signed, retried and recorded exactly as a real one. The answer is the delivery record, accepted rather than finished: read what the endpoint said back from GET /webhooks/{id}/deliveries. A disabled subscription is a 409; enable it first. While the account’s plan includes no webhooks, a test is a 402. A test sent while the subscription’s queue is full (10,000 deliveries not yet finished) is answered 202 with state: "dropped" and last_error: "queue full", and is not sent.

Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials.

curl

base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body -X POST "${base_url%/}"'/webhooks/whk-e1f2a3b4c5d6e7f8/test' \
  -H "Authorization: Bearer $MANDALA_API_KEY"

Python — Mandala SDK 0.27.0

# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client

with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
    id = "whk-e1f2a3b4c5d6e7f8"
    result = client.webhooks.test(id)
    print(result)

TypeScript — Mandala SDK 0.27.0

// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";

const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "whk-e1f2a3b4c5d6e7f8";
const result = await client.webhooks.test(id);
console.log(JSON.stringify(result, null, 2));

202 Illustrative successful response.

HTTP 202
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17

{
  "id": "whd-f1a2b3c4d5e6f7a8",
  "event_type": "webhook.test",
  "computer": "",
  "cursor": "test:whd-f1a2b3c4d5e6f7a8",
  "state": "pending",
  "attempts": 0,
  "next_at": "2026-09-16T12:00:00.000Z",
  "attempted_at": null,
  "last_status": null,
  "last_error": null,
  "delivered_at": null,
  "created_at": "2026-09-16T12:00:00.000Z"
}

401 Platform bearer credential missing.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer

{
  "error": "Authentication required",
  "reason": "missing",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential invalid.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "invalid API key",
  "reason": "invalid",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential revoked.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "API key revoked",
  "reason": "revoked",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

405 Unsupported method on this public path; HEAD returns these headers without a body.

HTTP 405
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Allow: POST, OPTIONS

{
  "error": "method not allowed",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

Path parameters

idrequiredstring

The webhook id.

Response

The queued delivery.

Response fields

idalwaysstring

whd- and sixteen hex characters: the webhook-id header this delivery carried, fixed across attempts.

event_typealwaysstring

The event’s type. gap for a gap frame; webhook.test for a test delivery.

computeralwaysstring

The computer the event is about. Empty on a test delivery.

cursoralwaysstring

The event’s own cursor — what to add as since= to the computer’s events_url to read on from it. Two kinds of delivery carry something else, which is not a socket position and must not be sent as since=: a test delivery’s is test: and its delivery id, and an event that arrived without a cursor of its own is keyed body: and a hash of its bytes.

statealways"pending" | "in_flight" | "delivered" | "exhausted" | "dropped"

pending (an attempt is scheduled), in_flight (one is running), delivered (a 2xx came back), exhausted (eight attempts failed) or dropped (never sent: the subscription was disabled or deleted first, its queue was full, or the person it answers for was suspended — see last_error).

attemptsalwaysinteger

How many times it has been sent. Eight is the last.

next_atalwaysstring or null

When the next attempt is due, RFC 3339. null once the delivery is finished.

attempted_atalwaysstring or null

When the newest attempt started. null before the first.

last_statusalwaysinteger or null

The HTTP status of the newest attempt, or null when it got no answer.

last_erroralwaysstring or null

One line about the newest failure, for example timeout, dns, refused, reset, unreachable, tls, redirect, address refused: <why> or status NNN; other values are possible, so match a patterned value on its prefix. A dropped delivery says why it was dropped. null after a success and before any attempt.

delivered_atalwaysstring or null

When the 2xx came back. null otherwise.

created_atalwaysstring

RFC 3339 timestamp: when the event reached the queue.

Failures

403

Also, with no reason, to a key limited to computers: this is not a call it may make.

GET/webhooks/{id}/deliveries

List deliveriesviewer+

Deliveries to this subscription, newest first by when they were queued, each with its state, its attempt count and the status or one-line error of its newest attempt: the newest hundred, unless limit says fewer. Finished deliveries are kept until seven days after they were queued; pending ones are kept until they finish. This is where an exhausted delivery shows up: while the account is active, nothing is dropped silently. A delivery exhausts about fourteen hours after it was queued, so on a busy subscription it is far from the newest — ask for state=exhausted, or page back with before. The answer is a plain array: a page shorter than limit is the last one. Events a suspension skipped are not here (see POST /webhooks).

Set MANDALA_API_KEY to your bearer key. MANDALA_BASE_URL, when set, is the full API base including /api/v1. Replace the illustrative resource IDs with yours. These pinned 0.27.0 SDK and direct HTTP examples do not read saved device-login credentials.

curl

base_url="${MANDALA_BASE_URL:-}"
if [ -z "$base_url" ]; then base_url='https://app.mandala.computer/api/v1'; fi
curl --fail-with-body "${base_url%/}"'/webhooks/whk-e1f2a3b4c5d6e7f8/deliveries' \
  -H "Authorization: Bearer $MANDALA_API_KEY"

Python — Mandala SDK 0.27.0

# Python 3.10+: pip install mandala-computer==0.27.0
import os
from mandala_computer import Client

with Client(api_key=os.environ["MANDALA_API_KEY"], base_url=os.environ.get("MANDALA_BASE_URL") or "https://app.mandala.computer/api/v1") as client:
    id = "whk-e1f2a3b4c5d6e7f8"
    result = client.webhooks.deliveries(id)
    print(result)

TypeScript — Mandala SDK 0.27.0

// Node.js 22+: npm install mandala-computer@0.27.0
import { Client } from "mandala-computer";

const apiKey = process.env.MANDALA_API_KEY;
if (!apiKey) throw new Error("Set MANDALA_API_KEY");
const client = new Client({apiKey, baseUrl: process.env.MANDALA_BASE_URL || "https://app.mandala.computer/api/v1"});
const id = "whk-e1f2a3b4c5d6e7f8";
const result = await client.webhooks.deliveries(id);
console.log(JSON.stringify(result, null, 2));

200 Illustrative successful response.

HTTP 200
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17

[
  {
    "id": "whd-f1a2b3c4d5e6f7a8",
    "event_type": "webhook.test",
    "computer": "",
    "cursor": "test:whd-f1a2b3c4d5e6f7a8",
    "state": "delivered",
    "attempts": 1,
    "next_at": null,
    "attempted_at": "2026-09-16T12:00:01.000Z",
    "last_status": 204,
    "last_error": null,
    "delivered_at": "2026-09-16T12:00:01.000Z",
    "created_at": "2026-09-16T12:00:00.000Z"
  }
]

401 Platform bearer credential missing.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer

{
  "error": "Authentication required",
  "reason": "missing",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential invalid.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "invalid API key",
  "reason": "invalid",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

401 Platform bearer credential revoked.

HTTP 401
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
WWW-Authenticate: Bearer error="invalid_token"

{
  "error": "API key revoked",
  "reason": "revoked",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

405 Unsupported method on this public path; HEAD returns these headers without a body.

HTTP 405
Content-Type: application/json
X-Request-ID: 3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17
Allow: GET, HEAD, OPTIONS

{
  "error": "method not allowed",
  "request_id": "3f2c9a1e-7b4d-4e8a-9c61-0d5f2b8e4a17"
}

Path parameters

idrequiredstring

The webhook id.

Query parameters

statestring

Only deliveries in this state. Anything else is a 400.

limitinteger

How many to return. Outside 1 to 100 is a 400. Default 100.

beforestring

The id of the last delivery of the previous page; the page is the deliveries queued before it. An id that is not a delivery to this subscription — or one pruned since — is a 400.

Response

One page of deliveries, newest first.

Response fields

idalwaysstring

whd- and sixteen hex characters: the webhook-id header this delivery carried, fixed across attempts.

event_typealwaysstring

The event’s type. gap for a gap frame; webhook.test for a test delivery.

computeralwaysstring

The computer the event is about. Empty on a test delivery.

cursoralwaysstring

The event’s own cursor — what to add as since= to the computer’s events_url to read on from it. Two kinds of delivery carry something else, which is not a socket position and must not be sent as since=: a test delivery’s is test: and its delivery id, and an event that arrived without a cursor of its own is keyed body: and a hash of its bytes.

statealways"pending" | "in_flight" | "delivered" | "exhausted" | "dropped"

pending (an attempt is scheduled), in_flight (one is running), delivered (a 2xx came back), exhausted (eight attempts failed) or dropped (never sent: the subscription was disabled or deleted first, its queue was full, or the person it answers for was suspended — see last_error).

attemptsalwaysinteger

How many times it has been sent. Eight is the last.

next_atalwaysstring or null

When the next attempt is due, RFC 3339. null once the delivery is finished.

attempted_atalwaysstring or null

When the newest attempt started. null before the first.

last_statusalwaysinteger or null

The HTTP status of the newest attempt, or null when it got no answer.

last_erroralwaysstring or null

One line about the newest failure, for example timeout, dns, refused, reset, unreachable, tls, redirect, address refused: <why> or status NNN; other values are possible, so match a patterned value on its prefix. A dropped delivery says why it was dropped. null after a success and before any attempt.

delivered_atalwaysstring or null

When the 2xx came back. null otherwise.

created_atalwaysstring

RFC 3339 timestamp: when the event reached the queue.

Failures

403

Also, with no reason, to a key limited to computers: this is not a call it may make. A suspended account may still make this read: a 403 here is about the credential or the person holding it, never the account’s suspension.