---
title: "Webhook Subscriptions"
description: "REST endpoints for webhook subscriptions. Bearer-auth required."
section: "API"
group: "REST"
order: 81
---

## GET /api/webhook-subscriptions

List webhook subscriptions.

**Query parameters**

- `limit` (optional): Page size (1–100, default 100).
- `after` (optional): Keyset cursor — return the page after this row (next page).
- `before` (optional): Keyset cursor — return the page before this row (prev page).
- `ids` (optional): Comma-separated list of IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).
- `filter` (optional): Nested filter expression (`<Entity>Filter`): AND/OR/NOT + per-field comparison operators + relation traversal. JSON-encoded on the query string.
- `orderBy` (optional): Multi-key sort (`<Entity>OrderBy[]`): array of `{ field: direction }` applied in order. Directions: asc/desc plus the four explicit nulls variants. JSON-encoded on the query string.
- `webhook_endpoint_id` (optional): Filter to subscriptions tied to a specific endpoint.
- `workspace_id` (optional): Filter subscriptions to this workspace.
- `include_deleted` (optional): Soft-deleted subscription visibility. `false` (default) — active rows only. `true` — active plus soft-deleted. `only` — soft-deleted only.
- `name` (optional): Case-insensitive substring match on name.
- `enabled` (optional): Shorthand: filter where `enabled` equals this value.
- `created_by` (optional): Shorthand: filter where `createdBy` equals this value.
- `runtime_user_id` (optional): Shorthand: filter where `runtimeUserId` equals this value.

**Response**

```json
{
  "data": [
    {
      "id": "<...>",
      "workspaceId": "<...>",
      "name": "<...>",
      "url": "<...>",
      "filter": "<...>",
      "enabled": "<...>",
      "createdBy": "<...>",
      "runtimeUserId": "<...>",
      "createdAt": "<...>",
      "updatedAt": "<...>"
    }
  ],
  "pageInfo": {
    "total": "number",
    "hasNextPage": "boolean",
    "hasPreviousPage": "boolean",
    "startCursor": "string",
    "endCursor": "string"
  }
}
```

## POST /api/webhook-subscriptions

Create a webhook subscription

**Request body**

```json
{
  "workspaceId": "string",
  "name": "string",
  "url": "string",
  "secret?": "string",
  "filter?": {}
}
```

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "url": "string",
  "filter": "any",
  "enabled": "boolean",
  "createdBy": "string",
  "runtimeUserId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```

## GET /api/webhook-subscriptions/{id}

Get a single webhook subscription by ID.

**Path parameters**

- `id` (required): Webhook subscription to retrieve.

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "url": "string",
  "filter": "any",
  "enabled": "boolean",
  "createdBy": "string",
  "runtimeUserId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```

## PATCH /api/webhook-subscriptions/{id}

Update a webhook subscription

**Path parameters**

- `id` (required): The webhook subscription's prefixed ID.

**Request body**

```json
{
  "name?": "string",
  "url?": "string",
  "secret?": "string",
  "filter?": {},
  "enabled?": "boolean",
  "runtimeUserId?": "string"
}
```

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "url": "string",
  "filter": "any",
  "enabled": "boolean",
  "createdBy": "string",
  "runtimeUserId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```

## DELETE /api/webhook-subscriptions/{id}

Soft-delete a webhook subscription.

**Path parameters**

- `id` (required): Webhook subscription to soft-delete.

**Response**

```json
{
  "success": "boolean"
}
```

## DELETE /api/webhook-subscriptions/{id}/purge

Permanently delete a soft-deleted webhook subscription.

**Path parameters**

- `id` (required): Soft-deleted webhook subscription to permanently delete.

**Response**

```json
{
  "success": "boolean"
}
```

## POST /api/webhook-subscriptions/{id}/restore

Restore a soft-deleted webhook subscription.

**Path parameters**

- `id` (required): Soft-deleted webhook subscription to restore.

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "url": "string",
  "filter": "any",
  "enabled": "boolean",
  "createdBy": "string",
  "runtimeUserId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```
