> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a catalog policy

> Replace one rule in a catalog.

`PUT /api/v1/policies/{catalogName}`

Replace one rule in a catalog. Read the rule first and include the fields you want to keep. The `policy` query parameter selects the rule and its existing name is preserved.

## Access

Use this endpoint in a workspace that supports catalog governance through OAuth. Ask your admin to confirm availability for your workspace and use a client acting as itself. For scope-based access, request `query_engine.policies:update`. If your admin confirms that workspace permissions are active for management API calls, omit the management scope and ask for permission for this operation. [Get a workspace access token](https://docs.e6data.com/api-reference/workspace-oauth-2-0/post-oauth2-token.md).

## Request

Replace `{catalogName}` with your existing catalog name.

The `policy` query parameter is required. Set it to the exact name of the rule.

Each rule uses `name`, `type`, and a `resources` array. Each resource can name a `catalog`, `schema`, `table`, or `column`. Use `users` or `groups` to identify who the rule applies to. For an access rule, set `allow` explicitly. A masking rule uses `maskType` and a row filter uses `rowFilter`. See [data access policies](https://docs.e6data.com/query/governance/data-access-policies.md).

Set `WORKSPACE_URL` to your HTTPS workspace origin and `ACCESS_TOKEN` to its OAuth token.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl --proto '=https' --silent --show-error --fail-with-body --request PUT \
  --header @- \
  --header 'Content-Type: application/json' \
  --data '{"name":"read-orders","type":"GRANT_ACCESS","resources":[{"catalog":"training","schema":"sales","table":"orders"}],"groups":["training-analysts"],"allow":true}' \
  "$WORKSPACE_URL/api/v1/policies/training?policy=read-orders" <<< "Authorization: Bearer $ACCESS_TOKEN"
```

## Response

HTTP `200`. Example with sample values:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "message": "Policy update initiated",
  "name": "read-orders"
}
```

Read the saved set or list the catalog policies to check the result before testing with a user in the affected group.

If the workspace returns `409 CATALOG_FEATURE_UNAVAILABLE`, ask your admin whether this catalog supports governance changes.

Platform-managed rules are protected. Use a catalog and rule that your team owns.

For `401`, check the token and workspace URL. For `403`, check the client's scope or effective workspace permissions. [Troubleshoot an API request](https://docs.e6data.com/api-reference/list-clusters-with-oauth.md#troubleshoot-a-request).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.