---
title: "Rename an agent or change its policy. Session only."
method: PATCH
path: "/v1/agents/{id}"
tags: ["account"]
---

# Rename an agent or change its policy. Session only.

`PATCH /v1/agents/{id}`

## Request

- Base URL: `https://api.briq.cloud`
- URL: `https://api.briq.cloud/v1/agents/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string
  - `policy` KeyPolicy
    - `maxConcurrentBriqs` integer
    - `dailySpendCapCents` integer
    - `allowedSizes` string[]
    - `allowedRegistries` string[]
    - `maxSleep` string: The longest sleep this credential may give a briq, "never" included ("never": no bound of its own; the environment and the plan still apply)
    - `expiresAt` string, date-time, nullable

## Response `200`

ok

- object
  - `id` string, required
  - `kind` 'key' | 'oauth', required
  - `name` string, required
  - `prefix` string, nullable, required
  - `policy` object, required
    - `maxConcurrentBriqs` integer
    - `dailySpendCapCents` integer
    - `allowedSizes` string[]
    - `allowedRegistries` string[]
    - `maxSleep` string: The longest sleep this credential may give a briq, "never" included ("never": no bound of its own; the environment and the plan still apply)
    - `expiresAt` string, date-time, nullable
  - `client` object, nullable, required
    - `id` string, required
    - `name` string, nullable, required
    - `uri` string, nullable, required
    - `icon` string, nullable, required
  - `agent` object, nullable, required
    - `name` string, required
    - `title` string, required
    - `version` string, nullable, required
    - `userAgent` string, nullable, required
  - `createdBy` object, nullable, required
    - `name` string, nullable, required
    - `email` string, nullable, required
  - `createdAt` string, required
  - `connectedAt` string, nullable, required
  - `lastUsedAt` string, nullable, required
  - `revokedAt` string, nullable, required

## Other responses

- `400`: validation
- `401`: unauthorized
- `403`: forbidden
- `404`: not found

---

[API](https://skmtc.dev/briq/apis/briq-api.md) · [All operations](https://skmtc.dev/briq/apis/briq-api/llms.txt) · [OpenAPI document](https://skmtc.dev/briq/apis/briq-api/revisions/609b424459cb?raw)
