Update an agent
PATCH
/v1/agents/{id}
const url = 'https://example.com/v1/agents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"external_id":"example","identity_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","kind":"example","labels":{},"metadata":{},"name":"example","status":"active","workspace_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/v1/agents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "external_id": "example", "identity_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "kind": "example", "labels": {}, "metadata": {}, "name": "example", "status": "active", "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Updates the mutable fields of one agent from the posted document.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Resource identifier (UUIDv7).
Header Parameters
Section titled “Header Parameters ” X-Olivares-Tenant
string format: uuid
Target tenant id; required when the principal can act in more than one tenant.
Request Body required
Section titled “Request Body required ” Media type application/json
object
external_id
string
identity_id
string format: uuid
kind
required
string
labels
object
key
additional properties
any
metadata
object
key
additional properties
any
name
required
string
status
string
workspace_id
string format: uuid
Responses
Section titled “ Responses ”OK
Media type application/json
object
created_at
required
string format: date-time
external_id
string
id
required
string format: uuid
identity_id
string format: uuid
kind
required
string
labels
object
key
additional properties
any
metadata
object
key
additional properties
any
name
required
string
status
required
string
tenant_id
required
string format: uuid
updated_at
required
string format: date-time
version
required
integer format: int64
workspace_id
string format: uuid
Example
{ "status": "active"}Bad request
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Unauthenticated
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Forbidden
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Not found
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Conflict / setup required
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}Rate limited
Media type application/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}