54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
post:
|
|
tags:
|
|
- Inboxes
|
|
operationId: inboxCreation
|
|
summary: Create an inbox
|
|
description: You can create more than one website inbox in each account
|
|
security:
|
|
- 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:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/inbox_create_payload'
|
|
responses:
|
|
'200':
|
|
description: Success
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$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'
|