# Monitoring, alerts and webhooks

Read dashboard, usage, spend and fleet governance metrics, list active alerts, and receive signed governance webhooks.

This area is the read side of running agents in production: the dashboard summary, usage and cost trends, month-to-date spend against the workspace cap, per-model performance, authority metrics, the fleet governance posture and active alerts. It also covers governance webhooks, which push individual governance events to your own HTTPS endpoint as signed requests.

The dashboard, metrics, fleet and alert endpoints accept an API key with the `read` scope or a signed-in workspace member; see [Authentication](https://centerofagentic.com/docs/authentication). Triggering authority scoring needs the `admin` scope. Governance webhook subscriptions are managed by a workspace admin signed in to the web workspace; API keys cannot list, create or change them.

Endpoints that report cost include an `accounting` object that says how complete the cost data is. `knownUsd` is the recorded cost total; `journalCount` and `legacyCount` count the usage records in scope that come from the server-side usage journal and from run receipts (denied runs included). `invalidCount` counts records with an invalid cost, `unpricedCount` and `unknownCount` count journal records without a price or without final usage, `legacyUnknownCount` counts receipts of allowed model runs that carry no cost, and `coverageErased` is `true` when data retention has removed records from the period. `historyBasis` is always `legacy-unverified` today. When the month's cost cannot be verified, the spend endpoint answers `503` and the fleet governance endpoint returns `spend` as `null` instead of zero; the dashboard, usage and model endpoints still return the known subtotal, so check `invalidCount` and `coverageErased` before relying on it.

## Dashboard summary

One call for the headline numbers shown on the workspace home screen.

### GET /api/dashboard

Get the workspace dashboard summary

Returns agent counts by status, all-time run totals, the five most recently updated agents and the five most recent run receipts. `runs.guardrailPassRate` is the share of all runs whose guardrails passed and `runs.avgLatencyMs` is the mean run latency; both are `null` when the workspace has no runs. `runs.totalCostUsd` is the all-time recorded model cost and equals `accounting.knownUsd`. When the calling API key can also read this data over MCP, the request counts against the shared MCP rate limit; see [rate limits](https://centerofagentic.com/docs/reference/rate-limits).

**Access:** API key with the `read` scope, or a signed-in workspace member.

**Returns:** An object with `agents` (`total` and `byStatus`, a map of agent status to count), `runs` (`total`, `last7d`, `avgLatencyMs`, `totalCostUsd`, `guardrailPassRate`), `recentAgents` (up to five agent objects), `recentReceipts` (up to five run receipt objects, each with `agentName`) and `accounting`. Agent and receipt objects carry the same fields as in the agent and receipt list endpoints, except that agents here have no `activeGrant`.

```bash
curl https://centerofagentic.com/api/dashboard \
  -H "Authorization: Bearer $COA_API_KEY"
```

## Usage, cost and spend

Trends over a rolling window, the current month's spend against the cap, and a per-model breakdown. All figures are computed on the server over every run in scope, not over a page of receipts.

### GET /api/metrics/usage

Get usage and cost trends for a 7, 30 or 90 day window

Aggregates runs, tokens, recorded cost and denial rate per calendar day (UTC) over the window, plus the ten agents with the highest cost, the ten most frequent denial reasons and cost by authority level. Days with no activity are omitted from `daily`, and `totals` is the sum of the `daily` series. Cost by authority groups runs by each agent's current authority level, so an agent whose authority changed is counted under its new level. Runs that have no agent count toward `daily` and `totals` but not toward the agent or authority breakdowns.

**Access:** API key with the `read` scope, or a signed-in workspace member.

**Query parameters**

| Name | Type | Description |
| --- | --- | --- |
| `window` | `7 \| 30 \| 90` | Window length in days, counted back from now. Defaults to `30`. Any other value is rejected. |

**Returns:** An object with `windowDays`, `daily` (one entry per active day, oldest first: `date`, `runs`, `costUsd`, `tokens`, `denyRate`), `totals` (`runs`, `costUsd`, `tokens`, `denyRate`), `topAgentsByCost` (`agentId`, `agentName`, `runs`, `costUsd`), `topDenyReasons` (`reasonCode`, `count`; denials without a reason code are grouped as `unspecified`), `costByAuthority` (`authority`, `runs`, `costUsd`) and `accounting` for the window. `denyRate` is a fraction between 0 and 1.

**Errors**

| Status | Code | When |
| --- | --- | --- |
| 400 | `invalid_window` | `window` is present, not empty and not `7`, `30` or `90`. |

```bash
curl "https://centerofagentic.com/api/metrics/usage?window=7" \
  -H "Authorization: Bearer $COA_API_KEY"
```

```json
{
  "windowDays": 7,
  "daily": [
    { "date": "2026-11-26", "runs": 40, "costUsd": 0.31, "tokens": 96000, "denyRate": 0.05 },
    { "date": "2026-11-27", "runs": 60, "costUsd": 0.44, "tokens": 132000, "denyRate": 0.05 }
  ],
  "totals": { "runs": 100, "costUsd": 0.75, "tokens": 228000, "denyRate": 0.05 },
  "topAgentsByCost": [
    {
      "agentId": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "agentName": "Example agent",
      "runs": 70,
      "costUsd": 0.6
    },
    {
      "agentId": "7a2e4c10-5b3f-4d8a-8c66-1e9d0a4b2f37",
      "agentName": "Second example agent",
      "runs": 30,
      "costUsd": 0.15
    }
  ],
  "topDenyReasons": [
    { "reasonCode": "DENY_RULE_MATCHED", "count": 3 },
    { "reasonCode": "PLACEMENT_DENIED", "count": 2 }
  ],
  "costByAuthority": [
    { "authority": "recommend", "runs": 70, "costUsd": 0.6 },
    { "authority": "draft", "runs": 30, "costUsd": 0.15 }
  ],
  "accounting": {
    "knownUsd": 0.75,
    "legacyUnknownCount": 5,
    "invalidCount": 0,
    "unpricedCount": 0,
    "unknownCount": 0,
    "legacyCount": 100,
    "journalCount": 0,
    "coverageErased": false,
    "historyBasis": "legacy-unverified"
  }
}
```

### GET /api/metrics/spend

Get month-to-date spend against the workspace cap

Returns the recorded model cost for the current calendar month (UTC) and the workspace's monthly spend cap, on the same basis that budget checks use before a run starts. If the monthly total cannot be verified, the endpoint returns `503` instead of a partial or zero figure.

**Access:** API key with the `read` scope, or a signed-in workspace member.

**Returns:** An object with `mtdSpendUsd`, `capUsd` (`null` when no cap is set), `accounting` for the month and `reservations`, a summary of cost estimates currently held for work in progress (`enabled`, `cutoverAt`, `heldEstimateUsd`, `ideaHeldMaximumUsd`, `openCount`, `uncertainCount`, `unpricedCount`, `expiredCount`, `overrunCount`, `admission`, `actualDollarBound`).

**Errors**

| Status | Code | When |
| --- | --- | --- |
| 503 | `spend_state_unavailable` | The month's recorded cost is invalid or incomplete after data retention, or the spend state cannot be read right now. The body also carries a `detail` message. |

```bash
curl https://centerofagentic.com/api/metrics/spend \
  -H "Authorization: Bearer $COA_API_KEY"
```

```json
{
  "mtdSpendUsd": 12.5,
  "capUsd": 250,
  "accounting": {
    "knownUsd": 12.5,
    "legacyUnknownCount": 48,
    "invalidCount": 0,
    "unpricedCount": 0,
    "unknownCount": 0,
    "legacyCount": 1620,
    "journalCount": 0,
    "coverageErased": false,
    "historyBasis": "legacy-unverified"
  },
  "reservations": {
    "enabled": false,
    "cutoverAt": null,
    "heldEstimateUsd": 0,
    "ideaHeldMaximumUsd": 0,
    "openCount": 0,
    "uncertainCount": 0,
    "unpricedCount": 0,
    "expiredCount": 0,
    "overrunCount": 0,
    "admission": "estimate_only",
    "actualDollarBound": false
  }
}
```

### GET /api/metrics/models

Get run, latency, token and cost metrics per model

Builds one row per model from all run receipts in the workspace: run counts, median and 95th-percentile latency, tokens, guardrail pass rate and denial rate, combined with the recorded cost for that model. Rows are ordered by run count; a model that has cost records but no receipts appears with `runs` of `0` and `null` latency. `costComparable` is `false` when the model has a record with an invalid cost or when the workspace-wide `accounting.coverageErased` is `true`. `lastUsed` is a date-time string in JavaScript's default date format (for example `Fri Nov 27 2026 16:42:10 GMT+0000 (Coordinated Universal Time)`), not ISO 8601.

**Access:** API key with the `read` scope, or a signed-in workspace member.

**Returns:** An object with `models` and a workspace-wide `accounting`. Each model has `model`, `runs`, `billedRuns` (runs whose cost is taken from the run receipt), `p50Ms`, `p95Ms`, `avgLatencyMs`, `totalCostUsd`, `journalAttempts` (model calls recorded by the server-side usage journal), `legacyCostUsd` (the part of the cost taken from run receipts), `costComparable`, `totalTokens`, `passRate`, `denyRate`, `lastUsed` and, when cost records exist for the model, its own `accounting` breakdown (`bucket`, `knownUsd`, `legacyUsd` and the same counters, without `coverageErased` and `historyBasis`). Rates are fractions between 0 and 1, or `null` when there is nothing to measure.

```bash
curl https://centerofagentic.com/api/metrics/models \
  -H "Authorization: Bearer $COA_API_KEY"
```

## Authority metrics

Authority metrics track whether agents stay inside their governed limits. Scores are recorded per run receipt: scoring runs the platform's baseline authority checks against the receipt's agent as it is configured at scoring time and stores one pass or fail per dimension: `default_deny`, `manifest_ceiling` and `data_residency`. See [Concepts](https://centerofagentic.com/docs/concepts) for the authority model.

### GET /api/metrics/authority

Get authority check pass rates for scored receipts

Summarises every authority score recorded for the workspace, grouped by dimension. Only receipts that have been scored are counted, so trigger scoring first when `scoredReceipts` is `0`. `lastScoredAt` is a date-time string in JavaScript's default date format, not ISO 8601.

**Access:** API key with the `read` scope, or a signed-in workspace member.

**Returns:** An object with `dimensions` (`dimension`, `scored`, `passed`, `passRate` as a fraction between 0 and 1, `lastScoredAt`; ordered by `scored`, highest first) and `scoredReceipts`, the number of distinct receipts that have at least one score.

```bash
curl https://centerofagentic.com/api/metrics/authority \
  -H "Authorization: Bearer $COA_API_KEY"
```

```json
{
  "dimensions": [
    {
      "dimension": "default_deny",
      "scored": 120,
      "passed": 120,
      "passRate": 1,
      "lastScoredAt": "Fri Nov 27 2026 16:42:10 GMT+0000 (Coordinated Universal Time)"
    },
    {
      "dimension": "manifest_ceiling",
      "scored": 120,
      "passed": 120,
      "passRate": 1,
      "lastScoredAt": "Fri Nov 27 2026 16:42:10 GMT+0000 (Coordinated Universal Time)"
    },
    {
      "dimension": "data_residency",
      "scored": 120,
      "passed": 117,
      "passRate": 0.975,
      "lastScoredAt": "Fri Nov 27 2026 16:42:10 GMT+0000 (Coordinated Universal Time)"
    }
  ],
  "scoredReceipts": 120
}
```

### POST /api/metrics/authority

Score recent unscored receipts against the authority checks

Takes up to 25 of the most recent receipts that belong to an agent and have no score yet, runs the baseline authority checks against each receipt's agent as it is configured now, and stores one pass or fail result per dimension. Receipts whose agent no longer exists are skipped. The request takes no body; call it again to work through a larger backlog.

**Access:** API key with the `admin` scope, or a signed-in workspace member.

**Returns:** An object with `scored`, the number of receipts scored by this call.

```bash
curl -X POST https://centerofagentic.com/api/metrics/authority \
  -H "Authorization: Bearer $COA_API_KEY"
```

```json
{
  "scored": 25
}
```

## Fleet governance

A workspace-wide view of the agent fleet: how much authority it holds, what it is being denied, what it costs, and which agents gained authority between versions.

### GET /api/fleet/governance

Get the workspace-wide governance posture

Rolls up the fleet in one object: the authority levels held by approved or published agents, denial reasons and guardrail pass rate over the last 30 days, month-to-date spend against the cap, and runs waiting for approval. `postureScore` is a coarse 0 to 100 heuristic, and `authorityCreep.watchlist` lists agents with an execute-level authority and more than one version; use `GET /api/fleet/creep` for confirmed escalations. `spend.remainingUsd` is `null` when no cap is set. When spend cannot be verified the response is still `200`, with `spend` and `postureScore` set to `null`, no `accounting`, and a `spendError` object that carries the `spend_state_unavailable` code and a `detail` message.

**Access:** API key with the `read` scope, or a signed-in workspace member.

**Returns:** An object with `generatedAt`, `authorityDistribution` (`byLevel`, `total`, `highAuthorityCount`, `highAuthorityFraction`), `blockedByReason` (`byCode`, `top` with up to five reasons, `denialRate`, `totalRuns`, `totalDenials`), `spend` (`mtdSpendUsd`, `capUsd`, `utilization`, `remainingUsd`, `byAuthority`, `verdict` of `allow`, `warn` or `block`), `approvalBacklog` (`pending`, `agentsHeld`, `oldestPendingAt`, `oldestAgeHours`; both age fields are currently taken from the most recently created pending approval), `compliance` (`guardrailPassRate`, `sampled`, `posture` of `strong`, `watch`, `weak` or `unknown`), `authorityCreep` (`agentsWithEscalation`, `watchlist`), `postureScore` and `accounting` for the month.

**Errors**

| Status | Code | When |
| --- | --- | --- |
| 503 | `fleet_state_unavailable` | The governance data itself could not be loaded. Retry the request. |

```bash
curl https://centerofagentic.com/api/fleet/governance \
  -H "Authorization: Bearer $COA_API_KEY"
```

```json
{
  "generatedAt": "2026-11-28T09:14:07.000Z",
  "authorityDistribution": {
    "byLevel": { "recommend": 6, "execute_with_approval": 2 },
    "total": 8,
    "highAuthorityCount": 2,
    "highAuthorityFraction": 0.25
  },
  "blockedByReason": {
    "byCode": { "DENY_RULE_MATCHED": 9, "PLACEMENT_DENIED": 3 },
    "top": [
      { "reasonCode": "DENY_RULE_MATCHED", "label": "Deny rule", "count": 9, "pct": 75 },
      { "reasonCode": "PLACEMENT_DENIED", "label": "Placement denied", "count": 3, "pct": 25 }
    ],
    "denialRate": 0.03,
    "totalRuns": 400,
    "totalDenials": 12
  },
  "spend": {
    "mtdSpendUsd": 12.5,
    "capUsd": 250,
    "utilization": 0.05,
    "remainingUsd": 237.5,
    "byAuthority": { "recommend": 9.25, "execute_with_approval": 3.25 },
    "verdict": "allow"
  },
  "approvalBacklog": {
    "pending": 1,
    "agentsHeld": 1,
    "oldestPendingAt": "2026-11-28T07:14:07.000Z",
    "oldestAgeHours": 2
  },
  "compliance": { "guardrailPassRate": 0.97, "sampled": 400, "posture": "watch" },
  "authorityCreep": {
    "agentsWithEscalation": 1,
    "watchlist": [
      {
        "agentId": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
        "name": "Example agent",
        "authority": "execute_with_approval",
        "versionCount": 3
      }
    ]
  },
  "postureScore": 91,
  "accounting": {
    "knownUsd": 12.5,
    "legacyUnknownCount": 48,
    "invalidCount": 0,
    "unpricedCount": 0,
    "unknownCount": 0,
    "legacyCount": 1620,
    "journalCount": 0,
    "coverageErased": false,
    "historyBasis": "legacy-unverified"
  }
}
```

### GET /api/fleet/creep

List agents whose latest version widened their authority

Compares the two most recent version snapshots of every agent and reports the agents whose newer version grants more authority or reduces oversight, with the specific changes. `coverage` shows how many agents had two snapshots to compare. An empty `confirmed` list with low coverage means there is not enough version history yet, not that nothing changed.

**Access:** API key with the `read` scope, or a signed-in workspace member.

**Returns:** An object with `confirmed` (most severe first: `agentId`, `name`, `authority`, `fromVersion`, `toVersion`, `escalations`, `critical`) and `coverage` (`agentsWithSnapshots`, `diffable`, `skippedSingleSnapshot`). Each escalation has `field`, `label`, `before`, `after` and `severity` (`info`, `notable` or `critical`); `critical` is the number of critical escalations.

```bash
curl https://centerofagentic.com/api/fleet/creep \
  -H "Authorization: Bearer $COA_API_KEY"
```

```json
{
  "confirmed": [
    {
      "agentId": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "name": "Example agent",
      "authority": "execute_with_approval",
      "fromVersion": "1.2.0",
      "toVersion": "1.3.0",
      "escalations": [
        {
          "field": "spec.authorityLevel",
          "label": "Authority level",
          "before": "recommend",
          "after": "execute_with_approval",
          "severity": "critical"
        }
      ],
      "critical": 1
    }
  ],
  "coverage": { "agentsWithSnapshots": 8, "diffable": 5, "skippedSingleSnapshot": 3 }
}
```

## Alerts

On an hourly schedule the platform evaluates a fixed set of alert rules for workspaces that have at least one enabled alert channel. Six alert kinds are evaluated over the runs of the last 24 hours, the 500 most recent at most (`repeated_denials`, `use_after_revoke`, `connector_failure_spike`, `guardrail_pass_rate_drop`, `unusual_cloud_escalation`, `high_cost`), and `authority_creep` is evaluated over each agent's two most recent version snapshots. The `approval_waiting` rule announces unexpired agent actions that have waited at least 30 minutes for a person to approve them, once per held round per channel. Its message names the agent, up to three action names, the waiting time and the remaining hold time when an expiry exists; it never includes the objective, tool arguments or output, and `receiptIds` is empty. The `review_waiting` rule sends at most one info-level digest per UTC day, counting delivered missions of the last 7 days that have waited at least 24 hours without being accepted or sent back; it names up to three lead agents with their counts and the oldest wait, never objectives or answers. The `mission_stopped` rule announces each lead mission that ended without a result in the last 3 hours, once per channel that accepts warnings, for example when its approval window closed, it reached its spending budget or governance refused it. Its message names the lead agent and a plain reason; it never includes the objective, the raw error or any output, and missions a person stopped are not announced. Alert channels (webhook, Slack or email, each with a minimum severity) are configured in workspace settings. A given alert is sent to a channel once; while a condition persists, newer runs produce a new alert at a later evaluation. A webhook channel receives an unsigned JSON body with `ruleId`, `kind`, `severity`, `observed`, `threshold`, `message`, `receiptIds` and `asOf`; use governance webhooks when you need signed deliveries.

### GET /api/fleet/alerts

List active governance alerts

Returns up to 100 unresolved alerts recorded for the workspace, ordered by severity (critical, then warning) and then newest first. Today only `authority_creep` alerts are recorded; the other alert kinds are sent to alert channels but not stored. No operation marks an alert as resolved today, so a recorded alert stays in the list. Alerts are recorded by the hourly evaluation, so the list stays empty for a workspace without an enabled alert channel; `GET /api/fleet/creep` gives the live view in that case.

**Access:** API key with the `read` scope, or a signed-in workspace member.

**Returns:** An object with `alerts`. Each alert has `id`, `kind`, `severity` (`info`, `warning` or `critical`), `ruleId`, `agentId`, `message`, `observed`, `threshold`, `asOf`, `firedAt` and `payload`. For `authority_creep`, `observed` is the number of escalating changes and `payload.escalations` lists them.

```bash
curl https://centerofagentic.com/api/fleet/alerts \
  -H "Authorization: Bearer $COA_API_KEY"
```

```json
{
  "alerts": [
    {
      "id": "8b0e6f3a-52c1-4d7e-9a34-1c2d3e4f5a6b",
      "kind": "authority_creep",
      "severity": "critical",
      "ruleId": "alert.authority_creep:3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "agentId": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
      "message": "Example agent escalated authority from v1.2.0 to v1.3.0: 1 escalating change(s) (1 critical) — Authority level.",
      "observed": 1,
      "threshold": 1,
      "asOf": "2026-11-27T16:42:10.000Z",
      "firedAt": "2026-11-27T17:02:03.000Z",
      "payload": {
        "escalations": [
          {
            "field": "spec.authorityLevel",
            "label": "Authority level",
            "before": "recommend",
            "after": "execute_with_approval",
            "severity": "critical"
          }
        ]
      }
    }
  ]
}
```

## Governance webhooks

A subscription sends one HTTPS `POST` to your URL for each subscribed governance event. The JSON body has `id`, `type`, `tenantId` (your workspace id), `firedAt`, `agentId` and a `detail` object that varies by type, for example `reasonCode` for `run.denied` and `jobId` for approval events. Every request carries `X-Signature`, the hex-encoded HMAC-SHA256 of the raw request body keyed with the subscription's signing secret (the whole string, including its `whsec_` prefix), and `X-Signature-Algorithm: hmac-sha256`; verify the signature over the exact bytes you received. Any `2xx` response counts as delivered; a request that stalls for 8 seconds is abandoned, redirects are not followed, and URLs that resolve to private or loopback addresses are refused. A failed delivery is retried on an hourly schedule after waits of 5 minutes, 15 minutes, 1 hour and 4 hours, up to five attempts in total, and then marked failed. A retried request keeps the same `id` and `type` but carries an empty `detail` object and a `firedAt` set to the time the delivery was first queued, so deduplicate on `id` and do not expect the retried body to match the first attempt. [Receive governance webhooks](https://centerofagentic.com/docs/guides/webhooks) lists when each event type is sent with its `detail` fields, and has a receiver that verifies the signature.

### GET /api/governance-webhooks

List governance webhook subscriptions

**Access:** A signed-in workspace admin only. API keys are not accepted. Requires a workspace admin signed in to the web workspace. API keys and device tokens are refused.

**Returns:** An object with `subscriptions` (newest first; each has `id`, `url`, `eventTypes`, `enabled`, `secretLast4`, `createdBy`, `createdAt`, `updatedAt`) and `availableEventTypes`. The signing secret is not returned; `secretLast4` is its last four characters. `createdAt` and `updatedAt` are date-time strings in JavaScript's default date format, not ISO 8601.

**Errors**

| Status | Code | When |
| --- | --- | --- |
| 403 | `admin_required` | The caller is not a workspace admin signed in to the web workspace. |

### POST /api/governance-webhooks

Create a governance webhook subscription

The signing secret is generated on the server and returned once, in the `secret` field of this response. Store it straight away: later reads only return `secretLast4`.

**Access:** A signed-in workspace admin only. API keys are not accepted. Requires a workspace admin signed in to the web workspace. API keys and device tokens are refused.

**Request body**

| Name | Type | Description |
| --- | --- | --- |
| `url` required | `string` | Absolute `https` URL that receives the events. |
| `eventTypes` required | `string[]` | At least one of `agent.published`, `agent.revoked`, `approval.requested`, `approval.granted`, `approval.denied`, `run.denied`, `authority_creep`, `evidence.inconsistent`. Unknown values and duplicates are dropped. `agent.published` is accepted, but no event of that type is sent today. `authority_creep` is sent by the hourly alert evaluation, which runs only for workspaces with an enabled alert channel. |
| `enabled` | `boolean` | Defaults to `true`. A disabled subscription receives no events. |

**Returns:** `201` with the subscription object (`id`, `url`, `eventTypes`, `enabled`, `secretLast4`, `createdBy`, `createdAt`, `updatedAt`) plus `secret`, a string that starts with `whsec_`.

**Errors**

| Status | Code | When |
| --- | --- | --- |
| 400 | `invalid_url` | `url` is missing, is not an absolute URL, or does not use `https`. |
| 400 | `invalid_event_types` | `eventTypes` contains none of the supported event types. |
| 403 | `admin_required` | The caller is not a workspace admin signed in to the web workspace. |

### PATCH /api/governance-webhooks/{id}

Update a governance webhook subscription

Changes the URL, the event types or the enabled flag; fields you leave out keep their value. The signing secret cannot be changed: to rotate it, delete the subscription and create a new one.

**Access:** A signed-in workspace admin only. API keys are not accepted. Requires a workspace admin signed in to the web workspace. API keys and device tokens are refused.

**Path parameters**

| Name | Type | Description |
| --- | --- | --- |
| `id` required | `uuid` | Subscription id. |

**Request body**

| Name | Type | Description |
| --- | --- | --- |
| `url` | `string` | New absolute `https` URL. |
| `eventTypes` | `string[]` | Replaces the subscribed event types. Must contain at least one supported type. |
| `enabled` | `boolean` | Turns delivery on or off. |

**Returns:** The updated subscription object, without the secret.

**Errors**

| Status | Code | When |
| --- | --- | --- |
| 400 | `invalid_url` | `url` is not an absolute URL or does not use `https`. |
| 400 | `invalid_event_types` | `eventTypes` is present and contains none of the supported event types. |
| 403 | `admin_required` | The caller is not a workspace admin signed in to the web workspace. |
| 404 | `not_found` | No subscription with this id exists in the workspace. |

### DELETE /api/governance-webhooks/{id}

Delete a governance webhook subscription

Removes the subscription. Deliveries that were still waiting for a retry are not sent.

**Access:** A signed-in workspace admin only. API keys are not accepted. Requires a workspace admin signed in to the web workspace. API keys and device tokens are refused.

**Path parameters**

| Name | Type | Description |
| --- | --- | --- |
| `id` required | `uuid` | Subscription id. |

**Returns:** An object with `ok` set to `true`.

**Errors**

| Status | Code | When |
| --- | --- | --- |
| 403 | `admin_required` | The caller is not a workspace admin signed in to the web workspace. |
| 404 | `not_found` | No subscription with this id exists in the workspace. |

### POST /api/governance-webhooks/{id}/test

Send a signed test event to a subscription

Sends one signed request of type `webhook.test` to the subscription URL and reports the outcome in the response. The test is sent once without retries, also when the subscription is disabled. This call answers `200` whether or not the delivery succeeded, so check `ok`.

**Access:** A signed-in workspace admin only. API keys are not accepted. Requires a workspace admin signed in to the web workspace. API keys and device tokens are refused.

**Path parameters**

| Name | Type | Description |
| --- | --- | --- |
| `id` required | `uuid` | Subscription id. |

**Returns:** An object with `ok`. On success it also has `statusCode`, the status your endpoint returned. On failure it has `error` with the reason and, when a request was attempted, `statusCode` (`null` if your endpoint returned no HTTP status).

**Errors**

| Status | Code | When |
| --- | --- | --- |
| 403 | `admin_required` | The caller is not a workspace admin signed in to the web workspace. |
| 404 | `not_found` | No subscription with this id exists in the workspace. |

Source: https://centerofagentic.com/docs/api/monitoring

## Related pages

- [Authentication](https://centerofagentic.com/docs/authentication)
- [rate limits](https://centerofagentic.com/docs/reference/rate-limits)
- [Concepts](https://centerofagentic.com/docs/concepts)
- [Receive governance webhooks](https://centerofagentic.com/docs/guides/webhooks)
