Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.qoder.com/llms.txt

Use this file to discover all available pages before exploring further.

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

HeaderRequiredDescription
AuthorizationYesBearer <PAT>

Path parameters

ParameterTypeRequiredDescription
environment_idstringYesEnvironment unique identifier (with the env_ prefix)

Request body

No request body.

Example request

curl -s -X POST 'https://openapi.qoder.sh/api/v1/cloud/environments/env_019e3bb39b6774d8878cd0b9d237574b/archive' \
  -H "Authorization: Bearer $QODER_PAT"

Example response

HTTP 200 OK
{
  "id": "env_019e3bb39b6774d8878cd0b9d237574b",
  "type": "environment",
  "name": "doc-test-env",
  "description": "Environment used for API documentation testing",
  "status": "archived",
  "config": {
    "type": "cloud",
    "networking": {
      "type": "limited"
    },
    "packages": {
      "apt": [
        "curl"
      ]
    }
  },
  "created_at": "2026-05-18T15:28:07.017808Z",
  "updated_at": "2026-05-18T15:28:08.459536Z"
}

Response fields

FieldTypeDescription
idstringEnvironment unique identifier
typestringAlways "environment"
namestringEnvironment name
descriptionstringEnvironment description
statusstringEnvironment status; "archived" after this call
configobjectEnvironment configuration
created_atstringCreation time (ISO 8601)
updated_atstringTime of the archive operation (ISO 8601)

Errors

HTTPTypeTrigger
401authentication_errorPAT invalid or expired
403permission_errorNot authorized for this resource
404not_found_errorEnvironment with the given ID does not exist
409conflict_errorEnvironment is already archived
See Errors for the full error envelope.