---
title: "Update a custom policy"
method: PUT
path: "/v1/roles/policies/{policyId}"
tags: ["Roles"]
---

# Update a custom policy

`PUT /v1/roles/policies/{policyId}`

## Request

- Base URL: `https://api.tetrascience.com`
- URL: `https://api.tetrascience.com/v1/roles/policies/{policyId}`
- Auth: API key in header `ts-auth-token` and API key in header `x-org-slug`

## Parameters

- `#/paths/~1v1~1roles~1policies~1{policyId}/get/parameters/0` (unresolved $ref)

## Request body

- object: Only the supplied fields are changed. `scope` is immutable.
  - `name` string
  - `description` string
  - `permissions` object[]
    - `resource` 'search' | 'sqlQueries' | 'sqlCredentials' | 'projects' | 'pipelines' | 'artifacts' | 'idsArtifacts' | 'dataRetention' | 'dataSources' | 'healthMonitoring' | 'jobsMonitoring' | 'attributeManagement' | 'myAccount' | 'administration' | 'auditTrail' | 'dataApp' | 'dataAppProvider' | 'inference' | 'aiArtifacts' | 'artifactVersionManager' | 'tenantManagement' | 'connectorLogs' | 'observability' | 'mockApi' | 'roleDirectory' | 'certificates' | 'dataPackages' | 'platformEvents' | 'integrationHealth' | 'dataAppWorkspace' | 'artifactReadme' | 'artifactFiles' | 'fileMetadata' | 'lakehouseConfig' | 'workflowRuns' | 'fileLinkIntegrations' | 'bulkActions' | 'sqlAccess' | 'microFileUpload' | 'microFileDelete' | 'microBulkActionsLabel' | 'microPipelinePages' | 'microAgentInstall' | 'microSharedSettings', required
    - `action` 'view' | 'create' | 'edit' | 'full', required

## Response `200`

Responding with the updated policy

- Schema (unresolved $ref)

## Other responses

- `400`: Invalid payload, or the policy is built-in and cannot be modified
- `401`: Invalid token
- `403`: Caller is not authorized, or is granting permissions they do not hold
- `404`: Policy not found
- `409`: A policy with that name already exists in the organization

---

[API](https://skmtc.dev/tetrascience/apis/administration.md) - [All operations](https://skmtc.dev/tetrascience/apis/administration/llms.txt) - [OpenAPI document](https://skmtc.dev/tetrascience/apis/administration/revisions/c1c829febcc5?raw)
