---
updatedAt: 2026-10-25T15:46:36.000Z
agentTools:
  projectIndex: https://docs.superwise.ai/llms.txt
---

# Archive Agent

Archives an agent by its ID. To list archived agents, set `only_archived` to `true` in [List agents](https://docs.superwise.ai/reference/get_agents).

## When to use it

Use it to retire an agent you may want to restore later with [Unarchive an agent](https://docs.superwise.ai/reference/unarchive_agent). To stop an agent's real-time interactions but keep it in place, use [Unpublish an agent](https://docs.superwise.ai/reference/deactivate_agent_v1_agents__agent_id__unpublish_post). To remove it entirely, use [Delete an agent](https://docs.superwise.ai/reference/delete_agent).

## Required parameters

* `agent_id` (path): the ID of the agent.

## Example request

Archive the agent `AGENT_ID`:

```bash
curl -X POST "https://api.superwise.ai/v1/agents/AGENT_ID/archive" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

Replace `YOUR_TOKEN` with a bearer token. [Creating a bearer token](https://docs.superwise.ai/reference/getting-started-with-your-api) shows how to get one from the client ID and secret key you create in [Generate access token](https://docs.superwise.ai/docs/generate-tokens). The agent then appears in [List agents](https://docs.superwise.ai/reference/get_agents) only when `only_archived` is `true`.

## Response

A successful call returns `200 OK`. The response body is not documented.

**Related:** [Unarchive an agent](https://docs.superwise.ai/reference/unarchive_agent), [List agents](https://docs.superwise.ai/reference/get_agents), [Delete an agent](https://docs.superwise.ai/reference/delete_agent), [Run a bulk action on agents](https://docs.superwise.ai/reference/agent_bulk_action)

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "paths": {
    "/v1/agents/{agent_id}/archive": {
      "post": {
        "tags": [
          "Agents"
        ],
        "summary": "Archive Agent",
        "operationId": "archive_agent",
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Agent Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Unprocessable Entity"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    }
  },
  "info": {
    "title": "Superwise Main Entities",
    "description": "API reference",
    "version": "0.1.0"
  },
  "components": {
    "securitySchemes": {
      "implicit": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://authentication.superwise.ai/identity/resources/auth/v1/api-token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "implicit": []
    }
  ],
  "servers": [
    {
      "url": "api.superwise.ai",
      "description": "Superwise Api Gateway"
    }
  ]
}
```