All URIs are relative to https://app.chatwoot.com/
| Method | HTTP request | Description |
|---|---|---|
| conversation_filter | POST /api/v1/accounts/{account_id}/conversations/filter | Conversations Filter |
| conversation_list | GET /api/v1/accounts/{account_id}/conversations | Conversations List |
| conversation_list_meta | GET /api/v1/accounts/{account_id}/conversations/meta | Get Conversation Counts |
| get_details_of_a_conversation | GET /api/v1/accounts/{account_id}/conversations/{conversation_id} | Conversation Details |
| new_conversation | POST /api/v1/accounts/{account_id}/conversations | Create New Conversation |
| toggle_priority_of_a_conversation | POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_priority | Toggle Priority |
| toggle_status_of_a_conversation | POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_status | Toggle Status |
ConversationFilterList conversation_filter(body, account_id, page=page)
Conversations Filter
Filter conversations with custom filter options and pagination
from __future__ import print_function
import time
import chatwoot_client
from chatwoot_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: agentBotApiKey
configuration = chatwoot_client.Configuration()
configuration.api_key['api_access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_access_token'] = 'Bearer'
# Configure API key authorization: userApiKey
configuration = chatwoot_client.Configuration()
configuration.api_key['api_access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_access_token'] = 'Bearer'
# create an instance of the API class
api_instance = chatwoot_client.ConversationsApi(chatwoot_client.ApiClient(configuration))
body = chatwoot_client.ConversationsFilterBody() # ConversationsFilterBody |
account_id = 56 # int | The numeric ID of the account
page = 56 # int | (optional)
try:
# Conversations Filter
api_response = api_instance.conversation_filter(body, account_id, page=page)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConversationsApi->conversation_filter: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | ConversationsFilterBody | ||
| account_id | int | The numeric ID of the account | |
| page | int | [optional] |
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ConversationList conversation_list(account_id, assignee_type=assignee_type, status=status, q=q, inbox_id=inbox_id, team_id=team_id, labels=labels, page=page, sort_by=sort_by)
Conversations List
List all the conversations with pagination
from __future__ import print_function
import time
import chatwoot_client
from chatwoot_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: userApiKey
configuration = chatwoot_client.Configuration()
configuration.api_key['api_access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_access_token'] = 'Bearer'
# create an instance of the API class
api_instance = chatwoot_client.ConversationsApi(chatwoot_client.ApiClient(configuration))
account_id = 56 # int | The numeric ID of the account
assignee_type = 'all' # str | Filter conversations by assignee type. (optional) (default to all)
status = 'open' # str | Filter by conversation status. (optional) (default to open)
q = 'q_example' # str | Filters conversations with messages containing the search term (optional)
inbox_id = 56 # int | (optional)
team_id = 56 # int | (optional)
labels = ['labels_example'] # list[str] | (optional)
page = 1 # int | paginate through conversations (optional) (default to 1)
sort_by = 'sort_by_example' # str | The attribute by which list should be sorted (optional)
try:
# Conversations List
api_response = api_instance.conversation_list(account_id, assignee_type=assignee_type, status=status, q=q, inbox_id=inbox_id, team_id=team_id, labels=labels, page=page, sort_by=sort_by)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConversationsApi->conversation_list: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | int | The numeric ID of the account | |
| assignee_type | str | Filter conversations by assignee type. | [optional] [default to all] |
| status | str | Filter by conversation status. | [optional] [default to open] |
| q | str | Filters conversations with messages containing the search term | [optional] |
| inbox_id | int | [optional] | |
| team_id | int | [optional] | |
| labels | list[str] | [optional] | |
| page | int | paginate through conversations | [optional] [default to 1] |
| sort_by | str | The attribute by which list should be sorted | [optional] |
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2003 conversation_list_meta(account_id, status=status, q=q, inbox_id=inbox_id, team_id=team_id, labels=labels)
Get Conversation Counts
Get open, unassigned and all Conversation counts
from __future__ import print_function
import time
import chatwoot_client
from chatwoot_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: userApiKey
configuration = chatwoot_client.Configuration()
configuration.api_key['api_access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_access_token'] = 'Bearer'
# create an instance of the API class
api_instance = chatwoot_client.ConversationsApi(chatwoot_client.ApiClient(configuration))
account_id = 56 # int | The numeric ID of the account
status = 'open' # str | Filter by conversation status. (optional) (default to open)
q = 'q_example' # str | Filters conversations with messages containing the search term (optional)
inbox_id = 56 # int | (optional)
team_id = 56 # int | (optional)
labels = ['labels_example'] # list[str] | (optional)
try:
# Get Conversation Counts
api_response = api_instance.conversation_list_meta(account_id, status=status, q=q, inbox_id=inbox_id, team_id=team_id, labels=labels)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConversationsApi->conversation_list_meta: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | int | The numeric ID of the account | |
| status | str | Filter by conversation status. | [optional] [default to open] |
| q | str | Filters conversations with messages containing the search term | [optional] |
| inbox_id | int | [optional] | |
| team_id | int | [optional] | |
| labels | list[str] | [optional] |
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ConversationShow get_details_of_a_conversation(account_id, conversation_id)
Conversation Details
Get all details regarding a conversation with all messages in the conversation
from __future__ import print_function
import time
import chatwoot_client
from chatwoot_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: userApiKey
configuration = chatwoot_client.Configuration()
configuration.api_key['api_access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_access_token'] = 'Bearer'
# create an instance of the API class
api_instance = chatwoot_client.ConversationsApi(chatwoot_client.ApiClient(configuration))
account_id = 56 # int | The numeric ID of the account
conversation_id = 56 # int | The numeric ID of the conversation
try:
# Conversation Details
api_response = api_instance.get_details_of_a_conversation(account_id, conversation_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConversationsApi->get_details_of_a_conversation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | int | The numeric ID of the account | |
| conversation_id | int | The numeric ID of the conversation |
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2004 new_conversation(body, account_id)
Create New Conversation
Creating a conversation in chatwoot requires a source id. Learn more about source_id: https://github.com/chatwoot/chatwoot/wiki/Building-on-Top-of-Chatwoot:-Importing-Existing-Contacts-and-Creating-Conversations
from __future__ import print_function
import time
import chatwoot_client
from chatwoot_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: agentBotApiKey
configuration = chatwoot_client.Configuration()
configuration.api_key['api_access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_access_token'] = 'Bearer'
# Configure API key authorization: userApiKey
configuration = chatwoot_client.Configuration()
configuration.api_key['api_access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_access_token'] = 'Bearer'
# create an instance of the API class
api_instance = chatwoot_client.ConversationsApi(chatwoot_client.ApiClient(configuration))
body = chatwoot_client.AccountIdConversationsBody() # AccountIdConversationsBody |
account_id = 56 # int | The numeric ID of the account
try:
# Create New Conversation
api_response = api_instance.new_conversation(body, account_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConversationsApi->new_conversation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | AccountIdConversationsBody | ||
| account_id | int | The numeric ID of the account |
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
toggle_priority_of_a_conversation(body, account_id, conversation_id)
Toggle Priority
Toggles the priority of conversation
from __future__ import print_function
import time
import chatwoot_client
from chatwoot_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: agentBotApiKey
configuration = chatwoot_client.Configuration()
configuration.api_key['api_access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_access_token'] = 'Bearer'
# Configure API key authorization: userApiKey
configuration = chatwoot_client.Configuration()
configuration.api_key['api_access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_access_token'] = 'Bearer'
# create an instance of the API class
api_instance = chatwoot_client.ConversationsApi(chatwoot_client.ApiClient(configuration))
body = chatwoot_client.ConversationIdTogglePriorityBody() # ConversationIdTogglePriorityBody |
account_id = 56 # int | The numeric ID of the account
conversation_id = 56 # int | The numeric ID of the conversation
try:
# Toggle Priority
api_instance.toggle_priority_of_a_conversation(body, account_id, conversation_id)
except ApiException as e:
print("Exception when calling ConversationsApi->toggle_priority_of_a_conversation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | ConversationIdTogglePriorityBody | ||
| account_id | int | The numeric ID of the account | |
| conversation_id | int | The numeric ID of the conversation |
void (empty response body)
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ConversationStatusToggle toggle_status_of_a_conversation(body, account_id, conversation_id)
Toggle Status
Toggles the status of the conversation between open and resolved
from __future__ import print_function
import time
import chatwoot_client
from chatwoot_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: agentBotApiKey
configuration = chatwoot_client.Configuration()
configuration.api_key['api_access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_access_token'] = 'Bearer'
# Configure API key authorization: userApiKey
configuration = chatwoot_client.Configuration()
configuration.api_key['api_access_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_access_token'] = 'Bearer'
# create an instance of the API class
api_instance = chatwoot_client.ConversationsApi(chatwoot_client.ApiClient(configuration))
body = chatwoot_client.ConversationIdToggleStatusBody() # ConversationIdToggleStatusBody |
account_id = 56 # int | The numeric ID of the account
conversation_id = 56 # int | The numeric ID of the conversation
try:
# Toggle Status
api_response = api_instance.toggle_status_of_a_conversation(body, account_id, conversation_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConversationsApi->toggle_status_of_a_conversation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | ConversationIdToggleStatusBody | ||
| account_id | int | The numeric ID of the account | |
| conversation_id | int | The numeric ID of the conversation |
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]