> ## Documentation Index
> Fetch the complete documentation index at: https://docs.weflayr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Archive routing strategy

> Archive a routing strategy.

Every version is kept.

> [!WARNING]
>
> Changes live routing: the AI gateway refuses the calls that send an archived strategy's `strategy/<slug>` as their model.

## Parameters

Passed in the request body.

**slug** `string` *required*

The slug of the strategy to archive.

The response also carries `blockers` (what prevents the usual next step), in plain words. It is empty when the usual workflow applies.

```python Python theme={null}
import weflayr
from weflayr.openapi.models import ArchiveRoutingStrategyInput

client = weflayr.client()  # reads WEFLAYR_API_KEY

client.archive_routing_strategy(body=ArchiveRoutingStrategyInput.from_dict({
    "slug": "summarize-profile-router",
}))
```

```js Node.js theme={null}
const weflayr = require('weflayr');

const client = weflayr.client(); // reads WEFLAYR_API_KEY

await weflayr.api.archiveRoutingStrategy({
  client,
  throwOnError: true,
  body: {
    slug: 'summarize-profile-router',
  },
});
```

```bash cURL theme={null}
curl -X POST https://app.weflayr.com/api/routing-strategy-archive/ \
  -H "Authorization: Bearer $WEFLAYR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "summarize-profile-router"
  }'
```

```json 200 theme={null}
{
  "slug": "summarize-profile-router",
  "version": 1,
  "document": {
    "name": "Summarize profile router",
    "slug": "summarize-profile-router",
    "allowed_deployments": [
      {
        "model": "gpt-6-luna",
        "provider": "openai",
        "region": "GLOBAL",
        "reasoning_effort": null
      },
      {
        "model": "claude-sonnet-5-5",
        "provider": "anthropic",
        "region": "GLOBAL",
        "reasoning_effort": null
      }
    ],
    "global_rule": "same_quality_lowest_cost",
    "switch_from_cached_model_or_cheaper_better_model_condition": "same_or_better_quality_is_unlikely",
    "fallback": {
      "retry_attempts": 0,
      "strategy": "default"
    },
    "override_rules": [],
    "self_heal": true,
    "apply_auto_caching_from_benchmark": false,
    "benchmark_source": {
      "benchmark_uuid": "7b0f3f0e-5d8e-4a57-9d52-0a3f6a2c1e11"
    }
  },
  "archived_at": "2026-10-23T08:00:00+00:00",
  "updated_at": "2026-10-20T09:30:00+00:00",
  "url": "https://app.weflayr.com/dashboard/routing-strategies/?strategy=summarize-profile-router",
  "blockers": [
    "The strategy is archived: the AI gateway refuses calls that send 'strategy/summarize-profile-router'."
  ]
}
```

```json 401 theme={null}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
```

```json 404 theme={null}
{"error": "No routing strategy has the slug 'nope'. List the project's strategies, archived ones included, with get_routing_strategies (status=all)."}
```

```json 422 theme={null}
{"error": "Invalid request payload.", "detail": [{"field": "slug", "error": "Field required"}]}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.