Skip to main content
POST /v1/deployments/{id}/archive Archives a deployment. Archived deployments stop all scheduled runs and are hidden from default listings (pass include_archived=true to the List endpoint to see them). The archived_at timestamp is set and upcoming_runs_at becomes empty. The deployment name is appended with _archived_<unix_timestamp> to free the original name for reuse.
Archiving is irreversible via the API. There is currently no unarchive endpoint.

Path parameters

ParameterTypeDescription
idstringDeployment ID with the dep_ prefix

Headers

HeaderRequiredDescription
AuthorizationYesBearer $QODER_PAT
Content-TypeYesapplication/json

Request body

No request body is required.

Example request

curl -X POST "https://api.qoder.com/api/v1/cloud/deployments/dep_019ec55a2b687b3f94eee77dd77e4b2a/archive" \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json"

Example response

HTTP 200 OK Returns the full Deployment object with archived_at set.
{
  "agent": {
    "id": "agent_019ebb21ef8e7df6a559052c94875160",
    "type": "agent",
    "version": 1
  },
  "archived_at": "2026-06-14T08:58:42Z",
  "created_at": "2026-06-14T08:58:01Z",
  "description": "Deployment created for API documentation verification",
  "environment_id": "env_019e49a1780171daac1e6b01f290ac2b",
  "id": "dep_019ec55a2b687b3f94eee77dd77e4b2a",
  "initial_events": [
    {
      "content": "Generate today's status report",
      "type": "user.message"
    }
  ],
  "metadata": {
    "cas_config": {
      "config": {
        "max_concurrent": 1,
        "max_retries": 0,
        "timeout_ms": 300000
      },
      "session_strategy": "new_session",
      "stats": {
        "consecutive_failures": 0,
        "last_triggered_at": "2026-06-14T08:58:17Z",
        "next_trigger_at": "2026-06-15T01:30:00Z",
        "total_failures": 0,
        "total_runs": 1
      }
    }
  },
  "name": "api-doc-verification-deployment-v2_archived_1781427523",
  "paused_reason": null,
  "resources": [],
  "schedule": {
    "expression": "30 9 * * 1-5",
    "last_run_at": "2026-06-14T08:58:17Z",
    "timezone": "Asia/Shanghai",
    "type": "cron",
    "upcoming_runs_at": []
  },
  "status": "active",
  "type": "deployment",
  "updated_at": "2026-06-14T08:58:42Z",
  "vault_ids": []
}

Errors

HTTPTypeTrigger
401authentication_errorPAT invalid or expired
404not_found_errorDeployment does not exist
409conflict_errorDeployment is already archived
See Errors for the full error envelope.

Pause a deployment

Pause scheduling while preserving configuration (reversible).

List deployments

Page through all deployments under the account.

Create a deployment

Create a new cron-scheduled or manually-triggered deployment.

Errors reference

All API error codes and the error envelope convention.