Files

51 lines
1.3 KiB
YAML

get:
tags:
- Inboxes
operationId: listAllInboxes
summary: List all inboxes
description: List all inboxes available in the current account
security:
- 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
content:
application/json:
schema:
type: object
properties:
payload:
type: array
description: 'Array of inboxes'
items:
$ref: '#/components/schemas/inbox'
'404':
description: Inbox 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'