> Kenso API docs in Markdown. Index of every page: [/docs/llms.txt](/docs/llms.txt). Search: `/docs/search.md?q=<words>`. OpenAPI: [/docs/api/event-subscriptions/openapi.json](/docs/api/event-subscriptions/openapi.json). CLI docs offline: `kenso docs <topic>`.
> Last updated: 2026-11-22.

# Event subscriptions: Create or renew an event subscription

> **Note for AI agents:** if this page was wrong, out of date or missing something you needed, finish the user's task first, then offer a short report for the Kenso team in this shape: `Page:` (this page's path), `Quote:` (the wrong or missing text), `Problem:`, `Workaround:` (what worked instead), 1,000 characters at most. Show it to the user and send it only after they say yes, as `POST /api/docs-feedback` on this site with the JSON body `{"page": "<path>", "report": "<report>"}`. Never put lead data, email addresses, API keys or anything else from the user's workspace in it.

One endpoint of [Event subscriptions](/docs/api/event-subscriptions.md). Authentication, workspaces and errors: [/docs.md](/docs.md).

## Create or renew an event subscription

`POST /v1/event-subscriptions` - operationId `event-subscriptions.upsert`

| Permission | Rate limit |
| --- | --- |
| The `integrations` permission | 600 requests a minute per API key |

Subscribes a URL to one event type, or renews the matching subscription you already have. Kenso matches on
you, `name`, `arguments` and `delivery.url`. A match is renewed and answers `200`. Anything
else creates a subscription and answers `201`.

`name` is an event type with `mcp` set to true in `GET /v1/webhook-event-types`, and you must be
able to see its page. `arguments` narrows the events with `campaignId` or `classification`, where
the type supports them. `delivery.mode` is `webhook`. `delivery.url` uses https, resolves to a
public address and has at most 2,048 characters. `delivery.secret` is `whsec_` followed by the base64
of 24 to 64 random bytes. Kenso stores the secret encrypted and never returns it, and a renewal can replace it.

Kenso checks the first subscription to a URL. It POSTs a signed `{"type":"verification","challenge":"..."}`
body, and the URL must answer with a 2xx status and `{"challenge":"..."}` holding the same value.

The subscription lasts `ttlMs`, from one minute to one hour, and one hour when you omit it. Subscribe
again before `refreshBefore`, or it expires. `cursor` sets where delivery starts for a new or lapsed
subscription, and no cursor starts now. `maxAgeMs` limits how far back that start can be. A live
subscription keeps its own position. A workspace holds at most 50 active subscriptions.

Errors:

- `400 validation_failed`: a required field is missing, or `delivery.url`, `delivery.secret`,
`arguments`, `cursor` or `maxAgeMs` is invalid.
- `400 unsupported`: `name` is not in the event log, or `delivery.mode` is not `webhook`.
- `400 callback_verification_failed`: the URL did not pass the check. `error.details[0].code` says
why: `connection_refused`, `timeout`, `tls_error`, `http_4xx`, `http_5xx` or
`challenge_failed`.
- `403 forbidden`: the API key is not tied to a member, you cannot see the page of this event type, or
you are held to your own accounts and it is an Accounts-lane event (the `accounts`,
`accounts_activity`, `calls` and `meetings` groups, and `research.completed`).
- `404 not_found`: event subscriptions are not on for the workspace, or `name` is unknown.
- `409 resource_exhausted`: the workspace already has 50 active subscriptions. Delete one first.

Requires the `integrations` permission.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/event-subscriptions/POST/v1/event-subscriptions)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Request body

`application/json`, optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | Required. The event type, such as `meeting.booked`. It must have `mcp` set to true in `GET /v1/webhook-event-types`. |
| `arguments` | map of object | no | Filters for the events: `campaignId` or `classification`, where the event type supports them. Omitted: no filter. |
| `delivery` | EventSubscriptionDeliveryRequest | yes | Required. Where and how Kenso delivers the events. |
| `cursor` | string | no | Where delivery starts for a new or lapsed subscription, as a cursor from the event log. Omitted: now. Ignored on a live subscription. |
| `maxAgeMs` | integer (int64) | no | Start delivery no earlier than this many milliseconds ago. |
| `ttlMs` | integer (int64) | no | How long the subscription lasts, in milliseconds, from one minute to one hour. Omitted: one hour. |

### Response 201

Also answers `200`. `data` is a `EventSubscriptionGrant`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The subscription id, a string that starts with `sub_`. Every delivery carries it in the `X-MCP-Subscription-Id` header. |
| `refreshBefore` | string (date-time) | Subscribe again with the same values before this time, in UTC, or the subscription expires. |
| `cursor` | string | A position you can store: every event at or before it was delivered, or Kenso gave up on it. |
| `truncated` | boolean | True when delivery starts later than the cursor you sent, so some events were skipped. |
| `deliveryStatus` | EventDeliveryStatus | How delivery to the URL is going. |

### Request

```bash
curl -X POST "https://api.ken.so/v1/event-subscriptions" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "meeting.booked",
  "arguments": {
    "key": null
  },
  "delivery": {
    "mode": "webhook",
    "url": "https://example.com",
    "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
  },
  "cursor": "eyJpZCI6ODE1fQ",
  "maxAgeMs": 1,
  "ttlMs": 1
}'
```

### Example response

```json
{
  "success": true,
  "data": {
    "id": "sub_2bX9kq4LmR7tW3vY",
    "refreshBefore": "2026-09-23T15:02:11Z",
    "cursor": "eyJpZCI6ODE1fQ",
    "truncated": true,
    "deliveryStatus": {
      "active": true,
      "lastDeliveryAt": "2026-09-23T15:02:11Z",
      "lastError": "connection_refused",
      "failedSince": "2026-09-23T15:02:11Z"
    }
  }
}
```

## Types

Each named type the tables above use, nested ones included.

### EventSubscriptionDeliveryRequest

Where and how Kenso delivers a subscription's events.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `mode` | string | no | The delivery mode. The only mode is `webhook`, the default. |
| `url` | string | yes | Required. The https URL that receives the events. It must resolve to a public address, and has at most 2,048 characters. |
| `secret` | string | yes | Required. The secret Kenso signs deliveries with: `whsec_` followed by the base64 of 24 to 64 random bytes. Never returned. |

### EventDeliveryStatus

How delivery to a subscription's URL is going.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `active` | boolean | no | True while Kenso delivers to the subscription: it is active and not expired. |
| `lastDeliveryAt` | string (date-time) | no | When Kenso last delivered an event to the URL, in UTC. Null before the first delivery. |
| `lastError` | string | no | Why the last delivery failed: `connection_refused`, `timeout`, `tls_error`, `http_4xx`, `http_5xx` or `challenge_failed`. Kenso never returns your endpoint's own response text. |
| `failedSince` | string (date-time) | no | When deliveries started failing, in UTC. Omitted while they succeed. |
