Returns a paged list of subscriptions, or a single subscription by id.
| Name | Type | Description |
|---|---|---|
| id | int | Route parameter — subscription ID for single lookup. Optional. |
| project_id | int | Filter by project ID. Pass the string "null" for site-wide. Optional. |
| page_num | int | Zero-based page index (decremented automatically by the API entry point). |
| page_size | int | Records per page. Default 20. |
Single subscription array or list of subscription arrays.
Creates or updates an event subscription.
| Name | Type | Description |
|---|---|---|
| id | int | Route or body parameter — 0 or absent to create. Optional. |
| name | string | Display name for the subscription. Required on create. |
| enabled | bool | Whether the subscription fires. Default true. Optional. |
| event_pattern | string | Glob pattern, e.g. "scm.*" or "scm.push.created". Required. |
| action_type | string | Must be "webhook" in v1. Required. |
| action_config | array | Action-type-specific config. For webhooks: {"url": "…"}. Required. |
| retry_policy | array | Override the event's default retry/backoff. Optional. |
| retention_days | int | Days to keep delivery rows. Default 30. Optional. |
| regenerate_secret | bool | Rotate the HMAC secret (update only). Optional. |
Associative array with `location` key; also contains `secret` on create/regen.
Deletes a subscription and cascades to its delivery rows.
| Name | Type | Description |
|---|---|---|
| id | int | Route parameter — subscription ID. Required. |
Empty array on success.