Skip to navigation

Replace the agent token audience policy

Replace every entry of the policy at once. Each change increases policyRevision, takes effect on the next token request, and is audited with you as the actor. Resource URIs are stored in canonical form.

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired
Agent ID

Request

This endpoint expects an object.
entrieslist of objectsRequired
expectedPolicyRevisionintegerOptional>=0
Refuse with 409 unless the current revision equals this.

Response

The new policy
agentIdstring
entrieslist of objects
policyRevisioninteger

Increases on every change; 0 when no policy was ever set.

updatedAtstring or null
updatedByUserIdstring or null
warningslist of objectsOptional

Resources that are session sandbox preview URLs, which stop working when the sandbox container stops. Present only when non-empty; never blocks the write.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error