Inboxes¶
List and retrieve inbox configuration.
InboxesResource ¶
Bases: BaseResource
Synchronous inboxes resource.
Initialize inboxes resource with nested agents resource.
list ¶
List all inboxes in the account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
int
|
The account ID |
required |
Returns:
| Type | Description |
|---|---|
list[Inbox]
|
List of Inbox objects |
Raises:
| Type | Description |
|---|---|
ChatwootAuthError
|
If authentication fails |
ChatwootPermissionError
|
If user doesn't have access |
Examples:
get ¶
Get inbox details.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
int
|
The account ID |
required |
inbox_id
|
int
|
The inbox ID |
required |
Returns:
| Type | Description |
|---|---|
Inbox
|
Inbox object |
Raises:
| Type | Description |
|---|---|
ChatwootNotFoundError
|
If inbox not found |
ChatwootAuthError
|
If authentication fails |
Examples:
create ¶
Create a new inbox.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
int
|
The account ID |
required |
name
|
str
|
Inbox name |
required |
channel_type
|
str
|
Type of channel (e.g., 'api', 'web_widget') |
required |
**kwargs
|
Any
|
Additional inbox attributes |
{}
|
Returns:
| Type | Description |
|---|---|
Inbox
|
Created Inbox object |
Raises:
| Type | Description |
|---|---|
ChatwootValidationError
|
If validation fails |
ChatwootAuthError
|
If authentication fails |
Examples:
update ¶
Update inbox.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
int
|
The account ID |
required |
inbox_id
|
int
|
The inbox ID |
required |
**kwargs
|
Any
|
Inbox attributes to update |
{}
|
Returns:
| Type | Description |
|---|---|
Inbox
|
Updated Inbox object |
Raises:
| Type | Description |
|---|---|
ChatwootNotFoundError
|
If inbox not found |
ChatwootValidationError
|
If validation fails |
Examples:
get_agent_bot ¶
Get the agent bot assigned to an inbox.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
int
|
The account ID |
required |
inbox_id
|
int
|
The inbox ID |
required |
Returns:
| Type | Description |
|---|---|
dict | None
|
Agent bot dict, or None if no bot is assigned |
Examples:
set_agent_bot ¶
Assign or remove an agent bot from an inbox.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
int
|
The account ID |
required |
inbox_id
|
int
|
The inbox ID |
required |
agent_bot_id
|
int | None
|
Bot ID to assign, or None to remove the bot |
required |
Examples:
AsyncInboxesResource ¶
Bases: AsyncBaseResource
Asynchronous inboxes resource.
Initialize async inboxes resource with nested agents resource.
list
async
¶
get
async
¶
Get inbox details (async).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
int
|
The account ID |
required |
inbox_id
|
int
|
The inbox ID |
required |
Returns:
| Type | Description |
|---|---|
Inbox
|
Inbox object |
create
async
¶
Create a new inbox (async).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
int
|
The account ID |
required |
name
|
str
|
Inbox name |
required |
channel_type
|
str
|
Type of channel |
required |
**kwargs
|
Any
|
Additional inbox attributes |
{}
|
Returns:
| Type | Description |
|---|---|
Inbox
|
Created Inbox object |
update
async
¶
Update inbox (async).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
int
|
The account ID |
required |
inbox_id
|
int
|
The inbox ID |
required |
**kwargs
|
Any
|
Inbox attributes to update |
{}
|
Returns:
| Type | Description |
|---|---|
Inbox
|
Updated Inbox object |
get_agent_bot
async
¶
Get the agent bot assigned to an inbox (async).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
int
|
The account ID |
required |
inbox_id
|
int
|
The inbox ID |
required |
Returns:
| Type | Description |
|---|---|
dict | None
|
Agent bot dict, or None if no bot is assigned |
set_agent_bot
async
¶
Assign or remove an agent bot from an inbox (async).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_id
|
int
|
The account ID |
required |
inbox_id
|
int
|
The inbox ID |
required |
agent_bot_id
|
int | None
|
Bot ID to assign, or None to remove the bot |
required |