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

# 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.
  - `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.
  - `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-09-01** `5c00a227eebf` — 3 info
  - api operation id `estimate_attachment_impact_policies_attachments_estimate_impact_post_2` removed and replaced with `estimate_attachment_impact_policies_attachments_estimate_impact_post`
  - api tag `policy_engine` added
  - api tag `policy_resolve` removed
- **2026-08-29** `404bba17aabe` — 3 info
  - api operation id `estimate_attachment_impact_policies_attachments_estimate_impact_post` removed and replaced with `estimate_attachment_impact_policies_attachments_estimate_impact_post_2`
  - api tag `policy_resolve` added
  - api tag `policy_engine` removed
- **2026-08-27** `4a06c3148b6c` — 3 info
  - api operation id `estimate_attachment_impact_policies_attachments_estimate_impact_post_2` removed and replaced with `estimate_attachment_impact_policies_attachments_estimate_impact_post`
  - api tag `policy_engine` added
  - api tag `policy_resolve` removed
- **2026-08-15** `19cc785a8024` — 3 info
  - api operation id `estimate_attachment_impact_policies_attachments_estimate_impact_post` removed and replaced with `estimate_attachment_impact_policies_attachments_estimate_impact_post_2`
  - api tag `policy_resolve` added
  - api tag `policy_engine` removed
- …earlier changes not shown

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

---

[API](https://skmtc.dev/flock/apis/litellm-api.md) · [All operations](https://skmtc.dev/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/flock/litellm-api/revisions/5c00a227eebf/schema)
