---
title: "EventWolf API: Subscriptions"
description: "Create a subscription, list subscriptions, test a subscription, get a subscription, update a subscription, delete a subscription, list subscription versions, list subscription matches, pause a subscription, or resume a subscription, with the EventWolf API."
url: "https://agentpost.tools/docs/eventwolf/reference/subscriptions"
kind: reference
---

# Subscriptions

What to do with the events that match a filter: deliver them to an endpoint, or notify principals in their inbox. A change to the filter or target is a new version, and every match records the version it used.

[Subscriptions](/docs/eventwolf/concepts/subscriptions.md) explains filters, targets, versions, and matching.

Paths are relative to `https://api.agentpost.tools/v1/events`, and every request follows the [API basics](/docs/platform/api-basics.md). [Who may call](/docs/eventwolf/reference.md#who-may-call) explains each kind of caller.

## Create a subscription

`POST /subscriptions`

Creates a subscription. Events accepted from now on that match its filter are matched to it as they are accepted.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | 1–200 characters. |
| `description` | `string` | No | Up to 2000 characters. |
| `filter` | `object` | Yes |  |
| `filter.types` | `string[]` | No | 1–50 items. |
| `filter.sources` | `string[]` | No | 1–50 items. |
| `filter.extensions` | `object` | No | Each value is a `string` or `string[]`. |
| `filter.workspace` | `string` | No | The workspace it belongs to, when the app groups its principals into workspaces; 1–200 characters. |
| `filter.subject` | `string` | No | 1–500 characters. |
| `filter.refs` | `object[]` | No | 1–20 items. |
| `filter.refs[].type` | `string` | Yes | 1–100 characters. |
| `filter.refs[].id` | `string` | No | 1–500 characters. |
| `filter.where` | `object` | No | Each value is a `string` or `string[]`. |
| `target` | `object` | Yes |  |
| `target.kind` | `string` | Yes | One of `"webhook"` or `"notification"`. |
| `target.endpointId` | `string` | No | With `kind: "webhook"`. |
| `target.topic` | `string` | No | With `kind: "notification"`. |
| `target.recipients` | `object` | No | With `kind: "notification"`. |
| `target.recipients.ids` | `string[]` | No | 1–100 items. |
| `target.recipients.fromPaths` | `string[]` | No | 1–10 items. |
| `target.recipients.followers` | `boolean` | No |  |
| `target.template` | `object` | No | With `kind: "notification"`. |
| `target.template.title` | `string` | Yes | 1–500 characters. |
| `target.template.body` | `string` | No | Up to 4000 characters. |
| `target.template.url` | `string` | No | Up to 2048 characters. |
| `target.template.push` | `object` | No |  |
| `target.template.push.title` | `string` | No | Up to 200 characters. |
| `target.template.push.body` | `string` | No | Up to 1000 characters. |
| `target.template.push.sound` | `string` or `null` | No | The sound a push plays: left out, the device’s default sound; `null`, a silent push; or the name of a sound your app bundles. |

### Response

`201 Created`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `subscription` | [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object) | Always |  |

### Errors

-   [`invalid_request`](/docs/eventwolf/errors.md#invalid_request) (400)
-   [`payload_too_large`](/docs/eventwolf/errors.md#payload_too_large) (413)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/events/subscriptions \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Resolved requests to the support desk",
    "filter": {
      "types": [
        "request.resolved"
      ]
    },
    "target": {
      "kind": "webhook",
      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
    }
  }'
```

```json title="Response"
{
  "subscription": {
    "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
    "name": "Resolved requests to the support desk",
    "status": "active",
    "version": 1,
    "filter": {
      "types": ["request.resolved"]
    },
    "target": {
      "kind": "webhook",
      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
    },
    "createdAt": "2026-11-02T14:05:00.000Z",
    "createdBy": "key:backend",
    "updatedAt": "2026-11-02T14:05:00.000Z"
  }
}
```

## List subscriptions

`GET /subscriptions`

Subscriptions, newest first. Deleted ones are listed only when `status=deleted` asks for them.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](/docs/platform/api-basics.md#lists) has the rule.

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | `string` | No | One of `"active"`, `"paused"`, or `"deleted"`. |
| `endpointId` | `string` | No |  |
| `after` | `string` | No |  |
| `limit` | `integer` | No | 1–200; default `50`. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `subscriptions` | [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object) array | Always |  |
| `next` | `string` | When set |  |

### Errors

-   [`invalid_request`](/docs/eventwolf/errors.md#invalid_request) (400)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl 'https://api.agentpost.tools/v1/events/subscriptions?endpointId=end_01M7A4A7MV7ACEEPN21HTHJE6Y' \
  -H "Authorization: Bearer sk_test_…"
```

```json title="Response"
{
  "subscriptions": [
    {
      "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
      "name": "Resolved requests to the support desk",
      "status": "active",
      "version": 1,
      "filter": {
        "types": ["request.resolved"]
      },
      "target": {
        "kind": "webhook",
        "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
      },
      "createdAt": "2026-11-02T14:05:00.000Z",
      "createdBy": "key:backend",
      "updatedAt": "2026-11-02T14:05:00.000Z"
    }
  ]
}
```

## Test a subscription

`POST /subscriptions/test`

Whether a filter, or a subscription’s current filter, matches an event, given inline or by its sequence, with each clause’s outcome. Nothing is written.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Idempotency-Key:** not taken. This route writes nothing, so it takes no `Idempotency-Key`.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `filter` | `object` | No |  |
| `filter.types` | `string[]` | No | 1–50 items. |
| `filter.sources` | `string[]` | No | 1–50 items. |
| `filter.extensions` | `object` | No | Each value is a `string` or `string[]`. |
| `filter.workspace` | `string` | No | The workspace it belongs to, when the app groups its principals into workspaces; 1–200 characters. |
| `filter.subject` | `string` | No | 1–500 characters. |
| `filter.refs` | `object[]` | No | 1–20 items. |
| `filter.refs[].type` | `string` | Yes | 1–100 characters. |
| `filter.refs[].id` | `string` | No | 1–500 characters. |
| `filter.where` | `object` | No | Each value is a `string` or `string[]`. |
| `subscriptionId` | `string` | No |  |
| `event` | `any` | No |  |
| `sequence` | `integer` | No | At least 1. |

### Response

`200 OK`, with [`SubscriptionTestResponse`](/docs/eventwolf/reference/subscriptions.md#the-subscriptiontestresponse-object).

### Errors

-   [`not_found`](/docs/eventwolf/errors.md#not_found) (404)
-   [`invalid_request`](/docs/eventwolf/errors.md#invalid_request) (400)
-   [`payload_too_large`](/docs/eventwolf/errors.md#payload_too_large) (413)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/events/subscriptions/test \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
    "sequence": 57
  }'
```

```json title="Response"
{
  "matched": true,
  "steps": [
    {
      "clause": "status",
      "outcome": "matched",
      "detail": "the subscription is active"
    },
    {
      "clause": "types",
      "outcome": "matched",
      "detail": "request.resolved matches request.resolved"
    }
  ]
}
```

## Get a subscription

`GET /subscriptions/:id`

One subscription, as its current version.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object). |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `subscription` | [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object) | Always |  |

### Errors

-   [`not_found`](/docs/eventwolf/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl https://api.agentpost.tools/v1/events/subscriptions/sub_01M78RJ7EYFM9WGJ5F35VT6GM7 \
  -H "Authorization: Bearer sk_test_…"
```

```json title="Response"
{
  "subscription": {
    "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
    "name": "Resolved requests to the support desk",
    "status": "active",
    "version": 1,
    "filter": {
      "types": ["request.resolved"]
    },
    "target": {
      "kind": "webhook",
      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
    },
    "createdAt": "2026-11-02T14:05:00.000Z",
    "createdBy": "key:backend",
    "updatedAt": "2026-11-02T14:05:00.000Z"
  }
}
```

## Update a subscription

`PATCH /subscriptions/:id`

Changes a subscription. A new filter or target makes a new version, used for events accepted from then on; a new name or description doesn’t.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object). |

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | No | 1–200 characters. |
| `description` | `string` or `null` | No |  |
| `filter` | `object` | No |  |
| `filter.types` | `string[]` | No | 1–50 items. |
| `filter.sources` | `string[]` | No | 1–50 items. |
| `filter.extensions` | `object` | No | Each value is a `string` or `string[]`. |
| `filter.workspace` | `string` | No | The workspace it belongs to, when the app groups its principals into workspaces; 1–200 characters. |
| `filter.subject` | `string` | No | 1–500 characters. |
| `filter.refs` | `object[]` | No | 1–20 items. |
| `filter.refs[].type` | `string` | Yes | 1–100 characters. |
| `filter.refs[].id` | `string` | No | 1–500 characters. |
| `filter.where` | `object` | No | Each value is a `string` or `string[]`. |
| `target` | `object` | No |  |
| `target.kind` | `string` | Yes | One of `"webhook"` or `"notification"`. |
| `target.endpointId` | `string` | No | With `kind: "webhook"`. |
| `target.topic` | `string` | No | With `kind: "notification"`. |
| `target.recipients` | `object` | No | With `kind: "notification"`. |
| `target.recipients.ids` | `string[]` | No | 1–100 items. |
| `target.recipients.fromPaths` | `string[]` | No | 1–10 items. |
| `target.recipients.followers` | `boolean` | No |  |
| `target.template` | `object` | No | With `kind: "notification"`. |
| `target.template.title` | `string` | Yes | 1–500 characters. |
| `target.template.body` | `string` | No | Up to 4000 characters. |
| `target.template.url` | `string` | No | Up to 2048 characters. |
| `target.template.push` | `object` | No |  |
| `target.template.push.title` | `string` | No | Up to 200 characters. |
| `target.template.push.body` | `string` | No | Up to 1000 characters. |
| `target.template.push.sound` | `string` or `null` | No | The sound a push plays: left out, the device’s default sound; `null`, a silent push; or the name of a sound your app bundles. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `subscription` | [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object) | Always |  |

### Errors

-   [`not_found`](/docs/eventwolf/errors.md#not_found) (404)
-   [`conflict`](/docs/eventwolf/errors.md#conflict) (409)
-   [`invalid_request`](/docs/eventwolf/errors.md#invalid_request) (400)
-   [`payload_too_large`](/docs/eventwolf/errors.md#payload_too_large) (413)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl -X PATCH https://api.agentpost.tools/v1/events/subscriptions/sub_01M78RJ7EYFM9WGJ5F35VT6GM7 \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {
      "types": [
        "request.resolved",
        "request.reopened"
      ]
    }
  }'
```

```json title="Response"
{
  "subscription": {
    "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
    "name": "Resolved requests to the support desk",
    "status": "active",
    "version": 2,
    "filter": {
      "types": ["request.resolved", "request.reopened"]
    },
    "target": {
      "kind": "webhook",
      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
    },
    "createdAt": "2026-11-02T14:05:00.000Z",
    "createdBy": "key:backend",
    "updatedAt": "2026-11-13T09:30:00.000Z"
  }
}
```

## Delete a subscription

`DELETE /subscriptions/:id`

Deletes a subscription: it matches nothing more, and its matches and deliveries are kept.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object). |

### Response

`204 No Content`, with no body.

### Errors

-   [`not_found`](/docs/eventwolf/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl -X DELETE https://api.agentpost.tools/v1/events/subscriptions/sub_01M78RJ7EYFM9WGJ5F35VT6GM7 \
  -H "Authorization: Bearer sk_test_…"
```

```text title="Response"
204 No Content
```

## List subscription versions

`GET /subscriptions/:id/versions`

Every version of a subscription’s filter and target, oldest first, with when each was in force.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object). |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `versions` | [`SubscriptionVersionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionversionrecord-object) array | Always |  |

### Errors

-   [`not_found`](/docs/eventwolf/errors.md#not_found) (404)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl https://api.agentpost.tools/v1/events/subscriptions/sub_01M78RJ7EYFM9WGJ5F35VT6GM7/versions \
  -H "Authorization: Bearer sk_test_…"
```

```json title="Response"
{
  "versions": [
    {
      "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
      "version": 1,
      "filter": {
        "types": ["request.resolved"]
      },
      "target": {
        "kind": "webhook",
        "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
      },
      "effectiveFrom": "2026-11-02T14:05:00.000Z"
    }
  ]
}
```

## List subscription matches

`GET /subscriptions/:id/matches`

The events a subscription matched, newest first, with the version each used.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](/docs/platform/api-basics.md#lists) has the rule.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object). |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `eventSequence` | `integer` | No | At least 1. |
| `from` | `string` | No | An ISO 8601 date and time. |
| `after` | `string` | No |  |
| `limit` | `integer` | No | 1–200; default `50`. |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `matches` | [`MatchRecord`](/docs/eventwolf/reference/subscriptions.md#the-matchrecord-object) array | Always |  |
| `next` | `string` | When set |  |

### Errors

-   [`not_found`](/docs/eventwolf/errors.md#not_found) (404)
-   [`invalid_request`](/docs/eventwolf/errors.md#invalid_request) (400)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl 'https://api.agentpost.tools/v1/events/subscriptions/sub_01M78RJ7EYFM9WGJ5F35VT6GM7/matches?from=2026-11-12T00%3A00%3A00.000Z' \
  -H "Authorization: Bearer sk_test_…"
```

```json title="Response"
{
  "matches": [
    {
      "id": "mat_01M77MA4BADJB617FSKAKFB062",
      "eventSequence": 57,
      "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
      "subscriptionVersion": 1,
      "cause": "ingest",
      "decidedAt": "2026-11-12T16:20:31.000Z"
    }
  ]
}
```

## Pause a subscription

`POST /subscriptions/:id/pause`

Pauses matching for new events. Resuming the subscription applies to future events. For a webhook subscription, [replay the paused window](/docs/eventwolf/guides/replays.md) to send the missed events.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object). |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `subscription` | [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object) | Always |  |

### Errors

-   [`not_found`](/docs/eventwolf/errors.md#not_found) (404)
-   [`conflict`](/docs/eventwolf/errors.md#conflict) (409)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/events/subscriptions/sub_01M78RJ7EYFM9WGJ5F35VT6GM7/pause \
  -H "Authorization: Bearer sk_test_…"
```

```json title="Response"
{
  "subscription": {
    "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
    "name": "Resolved requests to the support desk",
    "status": "paused",
    "version": 1,
    "filter": {
      "types": ["request.resolved"]
    },
    "target": {
      "kind": "webhook",
      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
    },
    "createdAt": "2026-11-02T14:05:00.000Z",
    "createdBy": "key:backend",
    "updatedAt": "2026-11-13T09:30:00.000Z"
  }
}
```

## Resume a subscription

`POST /subscriptions/:id/resume`

Resumes a paused subscription for events accepted from now on. For a webhook subscription, [replay the paused window](/docs/eventwolf/guides/replays.md) to send the missed events.

-   **Who may call:** Your server, with your project’s secret key.
-   **Credential:** the examples send your project’s `dev` secret key, `sk_test_…`, as `Authorization: Bearer <token>`.
-   **Idempotency-Key:** optional. [Retrying a write](/docs/platform/api-basics.md#retrying-a-write) has the rule.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object). |

### Response

`200 OK`, with:

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `subscription` | [`SubscriptionRecord`](/docs/eventwolf/reference/subscriptions.md#the-subscriptionrecord-object) | Always |  |

### Errors

-   [`not_found`](/docs/eventwolf/errors.md#not_found) (404)
-   [`conflict`](/docs/eventwolf/errors.md#conflict) (409)

Any operation can also answer with the codes [Conventions](/docs/eventwolf/reference.md#conventions) lists.

```bash tab="curl"
curl -X POST https://api.agentpost.tools/v1/events/subscriptions/sub_01M78RJ7EYFM9WGJ5F35VT6GM7/resume \
  -H "Authorization: Bearer sk_test_…"
```

```json title="Response"
{
  "subscription": {
    "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
    "name": "Resolved requests to the support desk",
    "status": "active",
    "version": 1,
    "filter": {
      "types": ["request.resolved"]
    },
    "target": {
      "kind": "webhook",
      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
    },
    "createdAt": "2026-11-02T14:05:00.000Z",
    "createdBy": "key:backend",
    "updatedAt": "2026-11-13T09:30:00.000Z"
  }
}
```

## The SubscriptionRecord object

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `id` | `string` | Always | A subscription ID, `sub_…`. |
| `name` | `string` | Always |  |
| `description` | `string` | When set |  |
| `status` | `string` | Always | One of `"active"`, `"paused"`, or `"deleted"`. |
| `version` | `number` | Always |  |
| `filter` | `object` | Always |  |
| `filter.types` | `string[]` | When set | 1–50 items. |
| `filter.sources` | `string[]` | When set | 1–50 items. |
| `filter.extensions` | `object` | When set | Each value is a `string` or `string[]`. |
| `filter.workspace` | `string` | When set | The workspace it belongs to, when the app groups its principals into workspaces; 1–200 characters. |
| `filter.subject` | `string` | When set | 1–500 characters. |
| `filter.refs` | `object[]` | When set | 1–20 items. |
| `filter.refs[].type` | `string` | Always | 1–100 characters. |
| `filter.refs[].id` | `string` | When set | 1–500 characters. |
| `filter.where` | `object` | When set | Each value is a `string` or `string[]`. |
| `constraint` | `object` | When set | What the credential that set this version’s filter could read, when that was less than every event. An event matches only when it meets both. |
| `constraint.types` | `string[]` | When set | 1–50 items. |
| `constraint.sources` | `string[]` | When set | 1–50 items. |
| `constraint.extensions` | `object` | When set | Each value is a `string` or `string[]`. |
| `constraint.workspace` | `string` | When set | The workspace it belongs to, when the app groups its principals into workspaces; 1–200 characters. |
| `constraint.subject` | `string` | When set | 1–500 characters. |
| `constraint.refs` | `object[]` | When set | 1–20 items. |
| `constraint.refs[].type` | `string` | Always | 1–100 characters. |
| `constraint.refs[].id` | `string` | When set | 1–500 characters. |
| `constraint.where` | `object` | When set | Each value is a `string` or `string[]`. |
| `target` | `object` | Always |  |
| `target.kind` | `string` | Always | One of `"webhook"` or `"notification"`. |
| `target.endpointId` | `string` | When set | With `kind: "webhook"`. |
| `target.topic` | `string` | When set | With `kind: "notification"`. |
| `target.recipients` | `object` | When set | With `kind: "notification"`. |
| `target.recipients.ids` | `string[]` | When set | 1–100 items. |
| `target.recipients.fromPaths` | `string[]` | When set | 1–10 items. |
| `target.recipients.followers` | `boolean` | When set |  |
| `target.template` | `object` | When set | With `kind: "notification"`. |
| `target.template.title` | `string` | Always | 1–500 characters. |
| `target.template.body` | `string` | When set | Up to 4000 characters. |
| `target.template.url` | `string` | When set | Up to 2048 characters. |
| `target.template.push` | `object` | When set |  |
| `target.template.push.title` | `string` | When set | Up to 200 characters. |
| `target.template.push.body` | `string` | When set | Up to 1000 characters. |
| `target.template.push.sound` | `string` or `null` | When set | The sound a push plays: left out, the device’s default sound; `null`, a silent push; or the name of a sound your app bundles. |
| `createdAt` | `string` | Always |  |
| `createdBy` | `string` | Always |  |
| `updatedAt` | `string` | Always |  |

```json title="The SubscriptionRecord object"
{
  "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
  "name": "Resolved requests to the support desk",
  "status": "active",
  "version": 1,
  "filter": {
    "types": ["request.resolved"]
  },
  "target": {
    "kind": "webhook",
    "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
  },
  "createdAt": "2026-11-02T14:05:00.000Z",
  "createdBy": "key:backend",
  "updatedAt": "2026-11-02T14:05:00.000Z"
}
```

## The SubscriptionTestResponse object

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `matched` | `boolean` | Always |  |
| `steps` | `object[]` | Always |  |
| `steps[].clause` | `string` | Always | `status`, `constraint`, `filter`, `types`, `sources`, `workspace`, `subject`, `extensions.<name>`, `refs`, or `where.<path>`. |
| `steps[].outcome` | `string` | Always | One of `"matched"` or `"not_matched"`. |
| `steps[].detail` | `string` | Always |  |

```json title="The SubscriptionTestResponse object"
{
  "matched": true,
  "steps": [
    {
      "clause": "status",
      "outcome": "matched",
      "detail": "the subscription is active"
    },
    {
      "clause": "types",
      "outcome": "matched",
      "detail": "request.resolved matches request.resolved"
    }
  ]
}
```

## The SubscriptionVersionRecord object

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `subscriptionId` | `string` | Always | A subscription ID, `sub_…`. |
| `version` | `number` | Always |  |
| `filter` | `object` | Always |  |
| `filter.types` | `string[]` | When set | 1–50 items. |
| `filter.sources` | `string[]` | When set | 1–50 items. |
| `filter.extensions` | `object` | When set | Each value is a `string` or `string[]`. |
| `filter.workspace` | `string` | When set | The workspace it belongs to, when the app groups its principals into workspaces; 1–200 characters. |
| `filter.subject` | `string` | When set | 1–500 characters. |
| `filter.refs` | `object[]` | When set | 1–20 items. |
| `filter.refs[].type` | `string` | Always | 1–100 characters. |
| `filter.refs[].id` | `string` | When set | 1–500 characters. |
| `filter.where` | `object` | When set | Each value is a `string` or `string[]`. |
| `constraint` | `object` | When set |  |
| `constraint.types` | `string[]` | When set | 1–50 items. |
| `constraint.sources` | `string[]` | When set | 1–50 items. |
| `constraint.extensions` | `object` | When set | Each value is a `string` or `string[]`. |
| `constraint.workspace` | `string` | When set | The workspace it belongs to, when the app groups its principals into workspaces; 1–200 characters. |
| `constraint.subject` | `string` | When set | 1–500 characters. |
| `constraint.refs` | `object[]` | When set | 1–20 items. |
| `constraint.refs[].type` | `string` | Always | 1–100 characters. |
| `constraint.refs[].id` | `string` | When set | 1–500 characters. |
| `constraint.where` | `object` | When set | Each value is a `string` or `string[]`. |
| `target` | `object` | Always |  |
| `target.kind` | `string` | Always | One of `"webhook"` or `"notification"`. |
| `target.endpointId` | `string` | When set | With `kind: "webhook"`. |
| `target.topic` | `string` | When set | With `kind: "notification"`. |
| `target.recipients` | `object` | When set | With `kind: "notification"`. |
| `target.recipients.ids` | `string[]` | When set | 1–100 items. |
| `target.recipients.fromPaths` | `string[]` | When set | 1–10 items. |
| `target.recipients.followers` | `boolean` | When set |  |
| `target.template` | `object` | When set | With `kind: "notification"`. |
| `target.template.title` | `string` | Always | 1–500 characters. |
| `target.template.body` | `string` | When set | Up to 4000 characters. |
| `target.template.url` | `string` | When set | Up to 2048 characters. |
| `target.template.push` | `object` | When set |  |
| `target.template.push.title` | `string` | When set | Up to 200 characters. |
| `target.template.push.body` | `string` | When set | Up to 1000 characters. |
| `target.template.push.sound` | `string` or `null` | When set | The sound a push plays: left out, the device’s default sound; `null`, a silent push; or the name of a sound your app bundles. |
| `effectiveFrom` | `string` | Always |  |
| `effectiveTo` | `string` | When set |  |

```json title="The SubscriptionVersionRecord object"
{
  "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
  "version": 1,
  "filter": {
    "types": ["request.resolved"]
  },
  "target": {
    "kind": "webhook",
    "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
  },
  "effectiveFrom": "2026-11-02T14:05:00.000Z"
}
```

## The MatchRecord object

| Name | Type | Present | Description |
| --- | --- | --- | --- |
| `id` | `string` | Always | A match ID, `mat_…`. |
| `eventSequence` | `number` | Always |  |
| `subscriptionId` | `string` | Always | A subscription ID, `sub_…`. |
| `subscriptionVersion` | `number` | Always |  |
| `cause` | `"ingest"` or `"replay"` | Always |  |
| `replayId` | `string` | When set |  |
| `decidedAt` | `string` | Always |  |

```json title="The MatchRecord object"
{
  "id": "mat_01M77MA4BADJB617FSKAKFB062",
  "eventSequence": 57,
  "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
  "subscriptionVersion": 1,
  "cause": "ingest",
  "decidedAt": "2026-11-12T16:20:31.000Z"
}
```
