39 lines
899 B
YAML
39 lines
899 B
YAML
tags:
|
|
- Agents
|
|
operationId: get-account-agents
|
|
summary: List Agents in Account
|
|
description: Get Details of Agents in an Account
|
|
security:
|
|
- userApiKey: []
|
|
x-codeSamples:
|
|
- lang: python
|
|
label: "List all agents"
|
|
source: |
|
|
from chatwoot import ChatwootClient
|
|
|
|
client = ChatwootClient(
|
|
base_url="https://app.chatwoot.com",
|
|
api_token="your-api-token"
|
|
)
|
|
|
|
agents = client.agents.list(account_id=1)
|
|
|
|
for agent in agents:
|
|
print(agent.name, agent.role)
|
|
responses:
|
|
200:
|
|
description: Success
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
description: 'Array of all active agents'
|
|
items:
|
|
$ref: '#/components/schemas/agent'
|
|
403:
|
|
description: Access denied
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/bad_request_error'
|