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
@@ -8,6 +8,24 @@ post:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
x-codeSamples:
- lang: python
label: "Create an API inbox"
source: |
from chatwoot import ChatwootClient
client = ChatwootClient(
base_url="https://app.chatwoot.com",
api_token="your-api-token"
)
inbox = client.inboxes.create(
account_id=1,
name="Support Inbox",
channel_type="api"
)
print(inbox.id, inbox.name)
requestBody:
required: true
content:
@@ -8,6 +8,21 @@ get:
- userApiKey: []
parameters:
- $ref: '#/components/parameters/account_id'
x-codeSamples:
- lang: python
label: "List all inboxes"
source: |
from chatwoot import ChatwootClient
client = ChatwootClient(
base_url="https://app.chatwoot.com",
api_token="your-api-token"
)
inboxes = client.inboxes.list(account_id=1)
for inbox in inboxes:
print(inbox.id, inbox.name)
responses:
'200':
description: Success
@@ -14,6 +14,20 @@ get:
type: number
description: ID of the inbox
required: true
x-codeSamples:
- lang: python
label: "Get an inbox"
source: |
from chatwoot import ChatwootClient
client = ChatwootClient(
base_url="https://app.chatwoot.com",
api_token="your-api-token"
)
inbox = client.inboxes.get(account_id=1, inbox_id=5)
print(inbox.name, inbox.channel_type)
responses:
'200':
description: Success
@@ -14,6 +14,25 @@ patch:
type: number
description: ID of the inbox
required: true
x-codeSamples:
- lang: python
label: "Update an inbox"
source: |
from chatwoot import ChatwootClient
client = ChatwootClient(
base_url="https://app.chatwoot.com",
api_token="your-api-token"
)
inbox = client.inboxes.update(
account_id=1,
inbox_id=5,
name="Updated Inbox Name",
enable_auto_assignment=True
)
print(inbox.id, inbox.name)
requestBody:
required: true
content: