---
title: "A delivery to your endpoint"
method: POST
path: "event"
---

# A delivery to your endpoint

`POST event` (webhook)

Sent to each subscription’s `url` (see `POST /webhooks`), signed with the Standard Webhooks headers `webhook-id`, `webhook-timestamp` and `webhook-signature`. Answer with a 2xx within 10 seconds; anything else is retried.

## Payload

- union: What a delivery POSTs: an event exactly as the computer’s `events_url` socket frames it, a `gap` frame, or a `webhook.test` from `POST /webhooks/{id}/test`. Switch on `type`, and ignore one you do not know.
  - WebhookComputerEvent
    - `seq` integer, required: Orders events on one computer and nothing else. It restarts when the host’s daemon does.
    - `cursor` string, required: Opaque. Add it as `since=` to the computer’s `events_url` to read on from this event.
    - `at` string, required: When the host recorded it, RFC 3339 in UTC.
    - `type` string, required: One of the subscription vocabulary: `window.opened`, `window.closed`, `window.focused`, `window.blurred`, `clipboard.changed`, `process.exited`, `computer.idle`, `computer.ready`, `computer.started`, `computer.stopped`, `computer.suspended`. Treat a type you do not know as one to ignore: the vocabulary can grow.
    - `computer` string, required: The computer’s id.
    - `source` 'daemon' | 'guest', required: `daemon` when the host saw it, `guest` when the guest said so.
    - `data` object: The payload, shaped by `type`. Absent when the event has none.
  - WebhookGapEvent
    - `cursor` string, required: The computer’s own position after the gap: read on from here with `since=`.
    - `at` string, required: RFC 3339 in UTC.
    - `type` 'gap', required
    - `computer` string, required: The computer’s id.
    - `source` 'daemon', required
    - `data` object, required
      - `detail` string, required: That events happened this computer can no longer replay.
      - `oldest_cursor` string: The oldest position it still holds, when it holds any.
  - WebhookTestEvent
    - `at` string, required: When the test was asked for, RFC 3339 in UTC.
    - `type` 'webhook.test', required
    - `computer` '', required: Empty: a test is about no computer.
    - `source` 'control-plane', required
    - `data` object, required
      - `subscription` string, required: The subscription tested.

## Acknowledgement `2XX`

Accepted. Any other answer, or none in 10 seconds, is retried.

---

[API](https://skmtc.dev/mandala/apis/mandala-computer-api.md) · [All operations](https://skmtc.dev/mandala/apis/mandala-computer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mandala/apis/mandala-computer-api/revisions/2afbb87fa703?raw)
