Unarchive an agent
Ends the archive window and returns the agent to its state before archive (draft, live or paused); a live agent takes calls again at once. Phone numbers released by archive are not assigned again: assign them with the phone-number operations. It works until the deletion starts, also after archive_deadline while a running call, campaign or legal hold delays the deletion. Once the deletion has started it is refused with agent_deleting, and once it has finished the agent is not_found. An agent that is not archived is refused with 409 conflict, details.reason=not_archived. Either a member or any key of the workspace can unarchive an agent archived by the other.
Authentication
Create and manage workspace-owned keys through the existing app session routes, outside this public API. Creator and manager identities are audit actors only. Key validity follows workspace policy, expiry and explicit revocation, independently of creator membership. Do not include a workspace-selection header.
Path parameters
Headers
Stable key per logical intent, 1–255 printable characters. Persist it before sending. Retry the same key/body after an uncertain result for 24 hours. A changed body conflicts. Beyond retention, reconcile the resource before retrying; this is not permanent deduplication. Current authorization is rechecked on replay. Evaluation order: authenticate and check current authorization; look up intent; replay its stored receipt before checking the current revision; only a new intent evaluates If-Match and executes. Fingerprint includes method, path, body and original If-Match. A changed request returns idempotency_key_reused. The server stores only a keyed (HMAC) fingerprint, and no error or response ever returns a fingerprint or hash of a request. In-flight intent returns 409 idempotency_in_progress with Retry-After; retry the same intent after reconciliation. Receipts describe that attempt, not current resource state. A replay returns the original status code and body, with the response header Idempotent-Replayed: true.
Response headers
Strong agent-identity revision, as getAgent returns. Archive and unarchive do not change it; use it for a later updateAgent.
true when this response replays a stored Idempotency-Key result. The status and body equal the original.
Response
draft: never published. live: admits calls. paused: refuses new calls but keeps configuration and history. archived: the 14-day archive window (archiveAgent); hidden from listAgents by default, readable by ID, and draft edits, publication, rollback and call start are refused. unarchiveAgent returns the agent to its state before archive until archive_deadline; after it the agent is permanently deleted and reads as not_found. Open response vocabulary. Preserve unknown values; never assume they mean success.
Exactly 14 days after archived_at. From this time the agent is permanently deleted unless unarchiveAgent restores it first; a running call, campaign or legal hold can delay the deletion, never bring it forward. Null unless state is archived.
Optional caller-chosen resource key: an opaque external identifier that matches your own record (for example a CRM ID, a configuration-file ID or a UUID) to this resource. Rasen still generates the canonical id; use id in paths and references. Case-sensitive, compared exactly, never normalized or parsed. 1-128 characters from A-Z a-z 0-9 . _ : ~ - and starting with a letter or digit; UUIDs and ULIDs are valid. Unique per resource type within one workspace; separate environment workspaces can reuse the same key. Set only at creation and immutable afterwards. A create with a key that already exists returns 409 resource_key_conflict with details.existing_id; it never updates or returns the existing resource. Not an Idempotency-Key: that header identifies one request intent for 24 hours, and a same-intent replay returns its original receipt before the resource-key check runs. Uniqueness includes archived resources. A key becomes free again only after its resource is permanently deleted or erased (a deleted secret or a deleted knowledge source); archive never frees it.