PATCH
/
api
/
v1
/
agents
/
{id}
{
  "error": "Invalid input data"
}
Update specific fields of an agent by its ID.
Requires Bearer token authentication

Path Parameters

id
string
required
ID of agent to update

Request Body

name
string
Updated agent name
labels
object
Updated agent labels

Example

curl -X PATCH "https://api.garnet.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer $GARNET_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "updated-agent-name",
    "labels": {
      "environment": "staging",
      "version": "2.0"
    }
  }'

Response

Returns 200 OK on successful update.

Error Examples

{
  "error": "Invalid input data"
}
{
  "error": "permission denied"
}