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

# Resolve Policies For Context

`POST /policies/resolve`

## Request

- Base URL: `https://api.vibebrowser.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.vibebrowser.app/policies/resolve`
- Auth: one of:
  - API key in header `x-litellm-api-key`
  - API key in header `x-litellm-api-key`
  - API key in header `x-litellm-api-key`
  - API key in header `x-litellm-api-key`
  - API key in header `x-litellm-api-key`
  - API key in header `x-litellm-api-key`

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.
  - `team_alias` string, nullable: Team alias to resolve for.
  - `key_alias` string, nullable: Key alias to resolve for.
  - `model` string, nullable: Model name to resolve for.
  - `tags` string[], nullable: Tags 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.
    - `policy_name` string, required: Name of the matched policy.
    - `matched_via` string, required: How the policy was matched (e.g., 'tag:healthcare', 'team:health-team', 'scope:*').
    - `guardrails_added` string[]: Guardrails this policy contributes.

## Other responses

- `422`: Validation Error

---

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