feat: add sdk examples for team, inboxes and agents

This commit is contained in:
Shivam Mishra
2026-02-19 12:54:36 +05:30
parent 5e1109b13e
commit c74bb805f9
20 changed files with 539 additions and 0 deletions
@@ -5,6 +5,25 @@ summary: Add a New Agent
description: Add a new Agent to Account
security:
- userApiKey: []
x-codeSamples:
- lang: python
label: "Add a new agent"
source: |
from chatwoot import ChatwootClient
client = ChatwootClient(
base_url="https://app.chatwoot.com",
api_token="your-api-token"
)
agent = client.agents.add(
account_id=1,
name="John Doe",
email="john@example.com",
role="agent"
)
print(agent.id, agent.name)
requestBody:
required: true
content:
@@ -5,6 +5,18 @@ summary: Remove an Agent from Account
description: Remove an Agent from Account
security:
- userApiKey: []
x-codeSamples:
- lang: python
label: "Remove an agent"
source: |
from chatwoot import ChatwootClient
client = ChatwootClient(
base_url="https://app.chatwoot.com",
api_token="your-api-token"
)
client.agents.remove(account_id=1, agent_id=10)
parameters:
- in: path
name: id
@@ -5,6 +5,21 @@ 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
@@ -5,6 +5,25 @@ 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