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

# Archive Guardrail

Archives a guardrail by its ID. To list archived guardrails, set `only_archived` to `true` in [List guardrails](https://docs.superwise.ai/reference/get_guardrails).

## When to use it

Use it to retire a guardrail you may want to restore later with [Unarchive a guardrail](https://docs.superwise.ai/reference/unarchive_guardrail). Deleting a guardrail cannot be undone, so archive it when you are not sure.

## Required parameters

* `guardrail_id` (path): the ID of the guardrail.

## Example request

Archive the guardrail `GUARDRAIL_ID`:

```bash
curl -X POST "https://api.superwise.ai/v1/guardrails/GUARDRAIL_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 guardrail then appears in [List guardrails](https://docs.superwise.ai/reference/get_guardrails) only when `only_archived` is `true`.

## Response

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

**Related:** [Unarchive a guardrail](https://docs.superwise.ai/reference/unarchive_guardrail), [List guardrails](https://docs.superwise.ai/reference/get_guardrails), [Delete a guardrail](https://docs.superwise.ai/reference/delete_guardrail), [Run a bulk action on guardrails](https://docs.superwise.ai/reference/guardrail_bulk_action)

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "paths": {
    "/v1/guardrails/{guardrail_id}/archive": {
      "post": {
        "tags": [
          "Guardrails"
        ],
        "summary": "Archive Guardrail",
        "operationId": "archive_guardrail",
        "parameters": [
          {
            "name": "guardrail_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid4",
              "title": "Guardrail 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"
    }
  ]
}
```