Files

60 lines
1.3 KiB
YAML

tags:
- Agents
operationId: update-agent-in-account
summary: Update Agent in Account
description: Update an Agent in Account
security:
- userApiKey: []
x-codeSamples:
- lang: python
label: "Update an agent"
source: |
from chatwoot import ChatwootClient
client = ChatwootClient(
base_url="https://app.chatwoot.com",
api_token="your-api-token"
)
agent = client.agents.update(
account_id=1,
agent_id=10,
name="Jane Doe",
role="administrator"
)
print(agent.id, agent.role)
parameters:
- in: path
name: id
schema:
type: integer
required: true
description: The ID of the agent to be updated.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/agent_update_payload'
responses:
200:
description: Success
content:
application/json:
schema:
description: 'The updated agent'
$ref: '#/components/schemas/agent'
404:
description: Agent not found
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'
403:
description: Access denied
content:
application/json:
schema:
$ref: '#/components/schemas/bad_request_error'