Update a policy's name or spec

1 min readEdit this page
PUT
/v1/namespaces/{nsid}/policies/{id}

In-place update of a policy's name and / or spec. Kind changes are not supported — recreate the policy if the kind needs to differ.

Requires the policy:write scope.

Authorization

x-api-key<token>

Anthropic-style API key header.

In: header

Path Parameters

nsid*string

Id of the target namespace. Must be owned by the caller (or equal a namespace-baked credential's own namespace), else 404.

Request Body

application/json

Request body. See the endpoint description for shape.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/namespaces/string/policies/{id}" \  -H "Content-Type: application/json" \  -d '{}'
{}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}

How is this guide?