POST /v1/environments/{environment_id}/archive
Archives the specified environment. Once archived, the environment’s status becomes "archived" and it cannot host new sessions; existing sessions are unaffected.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT> |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
environment_id | string | Yes | Environment unique identifier (with the env_ prefix) |
Request body
No request body.Example request
Example response
HTTP 200 OKResponse fields
| Field | Type | Description |
|---|---|---|
id | string | Environment unique identifier |
type | string | Always "environment" |
name | string | Environment name |
description | string | Environment description |
status | string | Environment status; "archived" after this call |
config | Environment config | Environment configuration |
metadata | Metadata object | Custom metadata |
archived | boolean | Whether archived; true after this call |
archived_at | string|null | Archive time (ISO 8601) |
created_at | string | Creation time (ISO 8601) |
updated_at | string | Time of the archive operation (ISO 8601) |
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 401 | authentication_error | PAT invalid or expired |
| 403 | permission_error | Not authorized for this resource |
| 404 | not_found_error | Environment with the given ID does not exist |
Notes
- The operation is idempotent; archiving an already-archived environment does not raise an error.
Related
Cloud environment setup
Choose the container, network, and dependencies your agent runs in.