All URIs are relative to https://chat.myclickfunnels.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_status_of_a_conversation | POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_status | Toggle Status |
conversation_filter(account_id, payload, opts)
Conversations Filter
Filter conversations with custom filter options and pagination
require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
# Configure API key authorization: userApiKey
config.api_key['userApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['userApiKey'] = 'Bearer'
# Configure API key authorization: agentBotApiKey
config.api_key['agentBotApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['agentBotApiKey'] = 'Bearer'
end
api_instance = Cfchat::ConversationsApi.new
account_id = 56 # Integer | The numeric ID of the account
payload = [Cfchat::ContactFilterRequestInner.new] # Array<ContactFilterRequestInner> |
opts = {
page: 56 # Integer |
}
begin
# Conversations Filter
result = api_instance.conversation_filter(account_id, payload, opts)
p result
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->conversation_filter: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> conversation_filter_with_http_info(account_id, payload, opts)
begin
# Conversations Filter
data, status_code, headers = api_instance.conversation_filter_with_http_info(account_id, payload, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ConversationList>
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->conversation_filter_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | Integer | The numeric ID of the account | |
| payload | Array<ContactFilterRequestInner> | ||
| page | Integer | [optional] |
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
conversation_list(account_id, opts)
Conversations List
List all the conversations with pagination
require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
# Configure API key authorization: userApiKey
config.api_key['userApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['userApiKey'] = 'Bearer'
end
api_instance = Cfchat::ConversationsApi.new
account_id = 56 # Integer | The numeric ID of the account
opts = {
assignee_type: 'me', # String | Filter conversations by assignee type.
status: 'open', # String | Filter by conversation status.
q: 'q_example', # String | Filters conversations with messages containing the search term
inbox_id: 56, # Integer |
team_id: 56, # Integer |
labels: ['inner_example'], # Array<String> |
page: 56 # Integer | paginate through conversations
}
begin
# Conversations List
result = api_instance.conversation_list(account_id, opts)
p result
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->conversation_list: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> conversation_list_with_http_info(account_id, opts)
begin
# Conversations List
data, status_code, headers = api_instance.conversation_list_with_http_info(account_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ConversationList>
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->conversation_list_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | Integer | The numeric ID of the account | |
| assignee_type | String | Filter conversations by assignee type. | [optional][default to 'all'] |
| status | String | Filter by conversation status. | [optional][default to 'open'] |
| q | String | Filters conversations with messages containing the search term | [optional] |
| inbox_id | Integer | [optional] | |
| team_id | Integer | [optional] | |
| labels | Array<String> | [optional] | |
| page | Integer | paginate through conversations | [optional][default to 1] |
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
conversation_list_meta(account_id, opts)
Get Conversation Counts
Get open, unassigned and all Conversation counts
require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
# Configure API key authorization: userApiKey
config.api_key['userApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['userApiKey'] = 'Bearer'
end
api_instance = Cfchat::ConversationsApi.new
account_id = 56 # Integer | The numeric ID of the account
opts = {
status: 'open', # String | Filter by conversation status.
q: 'q_example', # String | Filters conversations with messages containing the search term
inbox_id: 56, # Integer |
team_id: 56, # Integer |
labels: ['inner_example'] # Array<String> |
}
begin
# Get Conversation Counts
result = api_instance.conversation_list_meta(account_id, opts)
p result
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->conversation_list_meta: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> conversation_list_meta_with_http_info(account_id, opts)
begin
# Get Conversation Counts
data, status_code, headers = api_instance.conversation_list_meta_with_http_info(account_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <ConversationListMeta200Response>
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->conversation_list_meta_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | Integer | The numeric ID of the account | |
| status | String | Filter by conversation status. | [optional][default to 'open'] |
| q | String | Filters conversations with messages containing the search term | [optional] |
| inbox_id | Integer | [optional] | |
| team_id | Integer | [optional] | |
| labels | Array<String> | [optional] |
ConversationListMeta200Response
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
get_details_of_a_conversation(account_id, conversation_id)
Conversation Details
Get all details regarding a conversation with all messages in the conversation
require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
# Configure API key authorization: userApiKey
config.api_key['userApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['userApiKey'] = 'Bearer'
end
api_instance = Cfchat::ConversationsApi.new
account_id = 56 # Integer | The numeric ID of the account
conversation_id = 56 # Integer | The numeric ID of the conversation
begin
# Conversation Details
result = api_instance.get_details_of_a_conversation(account_id, conversation_id)
p result
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->get_details_of_a_conversation: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_details_of_a_conversation_with_http_info(account_id, conversation_id)
begin
# Conversation Details
data, status_code, headers = api_instance.get_details_of_a_conversation_with_http_info(account_id, conversation_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <ConversationShow>
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->get_details_of_a_conversation_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | Integer | The numeric ID of the account | |
| conversation_id | Integer | The numeric ID of the conversation |
- Content-Type: Not defined
- Accept: application/json; charset=utf-8
new_conversation(account_id, data)
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
require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
# Configure API key authorization: userApiKey
config.api_key['userApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['userApiKey'] = 'Bearer'
# Configure API key authorization: agentBotApiKey
config.api_key['agentBotApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['agentBotApiKey'] = 'Bearer'
end
api_instance = Cfchat::ConversationsApi.new
account_id = 56 # Integer | The numeric ID of the account
data = Cfchat::NewConversationRequest.new # NewConversationRequest |
begin
# Create New Conversation
result = api_instance.new_conversation(account_id, data)
p result
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->new_conversation: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> new_conversation_with_http_info(account_id, data)
begin
# Create New Conversation
data, status_code, headers = api_instance.new_conversation_with_http_info(account_id, data)
p status_code # => 2xx
p headers # => { ... }
p data # => <NewConversation200Response>
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->new_conversation_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | Integer | The numeric ID of the account | |
| data | NewConversationRequest |
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
toggle_status_of_a_conversation(account_id, conversation_id, data)
Toggle Status
Toggles the status of the conversation between open and resolved
require 'time'
require 'cfchat'
# setup authorization
Cfchat.configure do |config|
# Configure API key authorization: userApiKey
config.api_key['userApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['userApiKey'] = 'Bearer'
# Configure API key authorization: agentBotApiKey
config.api_key['agentBotApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['agentBotApiKey'] = 'Bearer'
end
api_instance = Cfchat::ConversationsApi.new
account_id = 56 # Integer | The numeric ID of the account
conversation_id = 56 # Integer | The numeric ID of the conversation
data = Cfchat::ToggleStatusOfAConversationRequest.new({status: 'open'}) # ToggleStatusOfAConversationRequest |
begin
# Toggle Status
result = api_instance.toggle_status_of_a_conversation(account_id, conversation_id, data)
p result
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->toggle_status_of_a_conversation: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> toggle_status_of_a_conversation_with_http_info(account_id, conversation_id, data)
begin
# Toggle Status
data, status_code, headers = api_instance.toggle_status_of_a_conversation_with_http_info(account_id, conversation_id, data)
p status_code # => 2xx
p headers # => { ... }
p data # => <ConversationStatusToggle>
rescue Cfchat::ApiError => e
puts "Error when calling ConversationsApi->toggle_status_of_a_conversation_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | Integer | The numeric ID of the account | |
| conversation_id | Integer | The numeric ID of the conversation | |
| data | ToggleStatusOfAConversationRequest |
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8