Skip to navigation

Archive a workspace

Archives the workspace, as the Archive action in the app does: its inbound numbers and its share are released now, every key of the workspace is refused with workspace_archived, and the workspace is deleted at delete_at (28 days) unless it is restored. Refused with 409 workspace_busy while calls, campaigns or other work run. An archive that stands is answered as it is. Only an organisation key (ra_org_…) with organisation operations on; a workspace key gets 403 forbidden, and a key of another organisation gets 404 not_found. The workspace list of the key does not limit it: it covers every workspace of the organisation. Rasen-Workspace is ignored. Requires Idempotency-Key: a replay returns the first status and body with Idempotent-Replayed true, after the key is checked again (a disabled key gets 401). Two keys of the organisation that send the same operation, path, body and Idempotency-Key share one receipt.

Authentication

AuthorizationBearer

An organisation-owned key whose secret starts ra_org_. The Owner or an Admin of an organisation that Rasen has invited makes it in the app; no API operation makes, changes, rotates or revokes a key. On a workspace operation send the workspace ID in the Rasen-Workspace header; without it the answer is 400 invalid_request with details.field Rasen-Workspace. A workspace outside the organisation or outside the key’s workspace list is 404 not_found. An organisation that is not invited gets 403 organisation_api_not_enabled.

Path parameters

organisation_idstringRequired1-128 characters

The organisation of the key. Another organisation answers the hidden not_found.

workspace_idstringRequired1-128 characters

A workspace of the organisation. A workspace of another organisation answers not_found.

Headers

Idempotency-KeystringRequired1-255 characters

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

X-Request-IdstringOptional
Safe server request correlation ID.
RateLimit-LimitintegerOptional
Requests allowed in the current window for the tightest applicable limit.
RateLimit-RemainingintegerOptional
Requests left in the current window.
RateLimit-ResetintegerOptional
Seconds until the current window resets.
Idempotent-ReplayedstringOptional

true when this response replays a stored Idempotency-Key result. The status and body equal the original, except that a secret is null and any query of a webhook endpoint url is masked as ?… (the stored record keeps no credential).

Response

The archive.
workspace_idstring
access_statestring or null

Open response vocabulary. Preserve unknown values; never assume they mean success.

delete_atdatetime or null
numbers_releasedinteger>=0
Inbound numbers this archive released. 0 on a restore and on an archive that stood already.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error