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

# Estimate Attachment Impact

`POST /policies/attachments/estimate-impact`

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.
  - `policy_name` string, required — Name of the policy to attach.
  - `scope` string, nullable — Use '*' for global scope (applies to all requests).
  - `teams` string[], nullable — Team aliases or patterns this attachment applies to.
  - `keys` string[], nullable — Key aliases or patterns this attachment applies to.
  - `models` string[], nullable — Model names or patterns this attachment applies to.
  - `tags` string[], nullable — Tag patterns this attachment applies to. Supports wildcards (e.g., health-*).

## 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).
  - `unnamed_keys_count` integer — Number of affected keys without an alias.
  - `unnamed_teams_count` integer — Number of affected teams without an alias.
  - `sample_keys` string[] — Sample of affected key aliases (up to 10).
  - `sample_teams` string[] — Sample of affected team aliases (up to 10).

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/sea-lion/apis/litellm-api.md) · [All operations](https://skmtc.net/sea-lion/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sea-lion/litellm-api/revisions/79928a3d37d3/schema)
