---
title: "Resolve Policies For Context"
method: POST
path: "/policies/resolve"
tags: ["policy_resolve"]
---

# Resolve Policies For Context

`POST /policies/resolve`

Resolve which policies and guardrails apply for a given context.

Use this endpoint to debug "what guardrails would apply to a request
with this team/key/model/tags combination?"

Example Request:
```bash
curl -X POST "http://localhost:4000/policies/resolve" \
    -H "Authorization: Bearer <your_api_key>" \
    -H "Content-Type: application/json" \
    -d '{
        "tags": ["healthcare"],
        "model": "gpt-4"
    }'
```

## Query parameters

- `force_sync` boolean — Force a DB sync before resolving. Default uses in-memory cache.

## Request body

- PolicyResolveRequest — Request body for resolving effective policies/guardrails for a context.
  - `key_alias` string, nullable — Key alias to resolve for.
  - `model` string, nullable — Model name to resolve for.
  - `tags` string[], nullable — Tags to resolve for.
  - `team_alias` string, nullable — Team alias to resolve for.

## Response `200`

Successful Response

- PolicyResolveResponse — Response for resolving effective policies/guardrails for a context.
  - `effective_guardrails` string[] — Final list of guardrails that would be applied.
  - `matched_policies` PolicyMatchDetail[] — Details about each matched policy and why it matched.
    - `guardrails_added` string[] — Guardrails this policy contributes.
    - `matched_via` string, required — How the policy was matched (e.g., 'tag:healthcare', 'team:health-team', 'scope:*').
    - `policy_name` string, required — Name of the matched policy.

## Other responses

- `422` — Validation Error

## Changes

> 14 revisions in range; 12 could not be searched.

- **2026-08-29** `404bba17aabe` — 3 info
  - api operation id `resolve_policies_for_context_policies_resolve_post` removed and replaced with `resolve_policies_for_context_policies_resolve_post_2`
  - api tag `policy_resolve` added
  - api tag `policy_engine` removed

[Change history](https://skmtc.dev/flock/apis/litellm-api/changes/policies/resolve/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/404bba17aabe/schema)
