---
title: "Estimate Attachment Impact"
method: POST
path: "/policies/attachments/estimate-impact"
tags: ["policy_engine"]
---

# Estimate Attachment Impact

`POST /policies/attachments/estimate-impact`

## Request

- Base URL: `https://api.sea-lion.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sea-lion.ai/policies/attachments/estimate-impact`
- Auth: API key in header `x-litellm-api-key`

Estimate how many keys and teams would be affected by a policy attachment.

Use this before creating an attachment to preview the blast radius.

Example Request:
```bash
curl -X POST "http://localhost:4000/policies/attachments/estimate-impact" \
    -H "Authorization: Bearer <your_api_key>" \
    -H "Content-Type: application/json" \
    -d '{
        "policy_name": "hipaa-compliance",
        "tags": ["healthcare", "health-*"]
    }'
```

## Request body

- PolicyAttachmentCreateRequest: Request body for creating a policy attachment.
  - `default` boolean: Apply this attachment only when no non-default attachment matches the request.
  - `keys` string[], nullable: Key aliases or patterns this attachment applies to.
  - `models` string[], nullable: Model names or patterns this attachment applies to.
  - `policy_name` string, required: Name of the policy to attach.
  - `priority` integer, nullable: Explicit execution order, lower runs first. Prioritised attachments run before those without one.
  - `scope` string, nullable: Use '*' for global scope (applies to all requests).
  - `tags` string[], nullable: Tag patterns this attachment applies to. Supports wildcards (e.g., health-*).
  - `teams` string[], nullable: Team aliases or patterns this attachment applies to.

## Response `200`

Successful Response

- AttachmentImpactResponse: Response for estimating the impact of a policy attachment.
  - `affected_keys_count` integer: Number of keys that would be affected (named + unnamed).
  - `affected_teams_count` integer: Number of teams that would be affected (named + unnamed).
  - `sample_keys` string[]: Sample of affected key aliases (up to 10).
  - `sample_teams` string[]: Sample of affected team aliases (up to 10).
  - `unnamed_keys_count` integer: Number of affected keys without an alias.
  - `unnamed_teams_count` integer: Number of affected teams without an alias.

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-21** `f2fb14eab3f5`: 6 info
  - api tag `policy_engine` added
  - api tag `Policies` removed
  - added the new optional request property `default`
  - added the new optional request property `priority`
  - …2 more

[Operation history](https://skmtc.dev/sea-lion/apis/litellm-api/changes/policies/attachments/estimate-impact/post.md)

---

[API](https://skmtc.dev/sea-lion/apis/litellm-api.md) · [All operations](https://skmtc.dev/sea-lion/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sea-lion/apis/litellm-api/revisions/f2fb14eab3f5?raw)
