---
title: "Force-invalidate field access policy cache for a project"
method: POST
path: "/api/data-access/cache/invalidate"
tags: ["DataAccess"]
---

# Force-invalidate field access policy cache for a project

`POST /api/data-access/cache/invalidate`

## Request

- Base URL: `https://api.agentstack.tech` (the document declares no server; this is the origin it was published from)
- URL: `https://api.agentstack.tech/api/data-access/cache/invalidate`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Force-invalidate all field_access_policy cache entries for the project.

Uses tag-based invalidation: removes ALL L1 neural cache entries tagged
`project:{project_id}` — including RBAC entries for this project.

Useful after direct DB edits or when debugging stale-cache issues.
Requires admin permission.

Note: Under normal conditions this is called automatically by
`PUT /policy/{resource}`. Manual invalidation is for debugging only.

## Query parameters

- `project_id` integer, required: Project ID

## Headers

- `Idempotency-Key` string

## Response `200`

Number of invalidated cache entries

- unknown

## Other responses

- `400`: Bad Request
- `401`: Not authenticated
- `403`: Insufficient project access (read / admin / owner)
- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/agentstack/apis/agentstack-core-api.md) · [All operations](https://skmtc.dev/agentstack/apis/agentstack-core-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentstack/apis/agentstack-core-api/revisions/79f4a4dd8813?raw)
