> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rasen.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rasen.ai/_mcp/server.

## Version 1.8.0: webhooks for call events

The API version moves from 1.7.0 to 1.8.0. Nine new operations register HTTPS endpoints that
receive call events:

* `POST /webhook-endpoints` (`createWebhookEndpoint`) and `GET /webhook-endpoints`
  (`listWebhookEndpoints`)
* `GET /webhook-endpoints/{endpoint_id}` (`getWebhookEndpoint`), `PUT /webhook-endpoints/{endpoint_id}`
  (`replaceWebhookEndpoint`) and `DELETE /webhook-endpoints/{endpoint_id}` (`deleteWebhookEndpoint`)
* `POST /webhook-endpoints/{endpoint_id}/rotate-secret` (`rotateWebhookSigningSecret`)
* `POST /webhook-endpoints/{endpoint_id}/test` (`sendWebhookTestEvent`)
* `GET /webhook-endpoints/{endpoint_id}/deliveries` (`listWebhookDeliveries`)
* `POST /webhook-deliveries/{delivery_id}/resend` (`resendWebhookDelivery`)

They require the new capability `webhooks.manage`, which `GET /context` lists. An endpoint
subscribes to `call.completed`, `call.failed` and `call.analyzed`. Each request is signed with the
endpoint's secret in the `webhook-signature` header. Delivery is at least once, with a stable
`webhook-id`, and has no ordering guarantee. A workspace has at most 10 endpoints that are not
deleted.

**What to do:** Nothing for existing integrations. To receive call events, see
[Receive call events with webhooks](/guides/webhooks) and [Webhook events](/reference/webhook-events).

## Archive and restore an agent

New operations: `POST /agents/{agent_id}/archive` (`archiveAgent`) and
`POST /agents/{agent_id}/unarchive` (`unarchiveAgent`). Both require `agents.write`. Archive stops
the agent's calls, releases its phone numbers and starts a 14-day window. At `archive_deadline` the
agent is deleted for good. Unarchive returns the agent to its state before the archive.

* `Agent` gains `archived_at` and `archive_deadline`. Both are `null` unless `state` is `archived`.
* New error codes: `409 archive_blocked` (work of the agent is running; `details.reason` says
  which) and `409 agent_deleting` (the deletion has started).
* Unarchive of an agent that is not archived answers `409 conflict` with
  `details.reason: not_archived`.

**What to do:** Nothing for existing integrations. If you parse `Agent` with a strict schema, allow
the two new fields. See [Archive and restore an agent](/guides/archive-agent).

## Knowledge snapshot operations deprecated

`createKnowledgeSnapshot`, `listKnowledgeSnapshots` and `getKnowledgeSnapshot` are marked
`deprecated: true`. They keep their request and response shapes and keep working. Publication does
not need or read an explicit snapshot: it freezes the sources of the agent's library itself.
`createKnowledgeSnapshot` can refuse a source that reports `ready` with `409 conflict` and
`reason: sources_not_ready`.

**What to do:** Do not add the snapshot operations to a new integration. Add sources to the agent
library and publish the agent. See [Deprecations](/deprecations) and
[Knowledge](/guides/knowledge).

## Usable Knowledge sources report `ready`

A source that publication uses as bounded prompt context used to report `state: fallback`. Every
source read and list now reports it as `ready` with `failure: null`, and a `state=ready` filter also
matches it. A `state=fallback` filter is still accepted. `failure` is `null` unless `state` is
`failed`.

`KnowledgeSource` gains an optional, nullable `next_step`. The answer to an add sets it to the action
that makes the source usable in calls, for example "Publish the agent to use this source in calls."
It is `null` on other answers.

**What to do:** Wait for `ready` or `failed`. Remove code that waits for `fallback`. See
[Deprecations](/deprecations).

## `at_capacity` says whose limit was reached

`503 at_capacity` from `createCall` and `createAgentSession` gains the details `active` and `reason`.
With `reason: workspace_limit`, the workspace already runs `details.active` calls at the same time,
and its limit is `details.limit` (3 by default). Any other `reason` means that the platform is at
capacity. Nothing was started or dialled.

**What to do:** For `workspace_limit`, end a call or wait for one to finish. In both cases, wait at
least `Retry-After` seconds, then send the identical request with the same `Idempotency-Key`. Never
retry with a new key. See [Idempotency and replay](/concepts/idempotency).