Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Latest commit

 

History

History
148 lines (103 loc) · 4.63 KB

File metadata and controls

148 lines (103 loc) · 4.63 KB

Cfchat::ConversationsAPIApi

All URIs are relative to https://chat.myclickfunnels.com

Method HTTP request Description
create_a_conversation POST /public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations Create a conversation
list_all_contact_conversations GET /public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations List all conversations

create_a_conversation

create_a_conversation(inbox_identifier, contact_identifier)

Create a conversation

Create a conversation

Examples

require 'time'
require 'cfchat'

api_instance = Cfchat::ConversationsAPIApi.new
inbox_identifier = 'inbox_identifier_example' # String | The identifier obtained from API inbox channel
contact_identifier = 'contact_identifier_example' # String | The source id of contact obtained on contact create

begin
  # Create a conversation
  result = api_instance.create_a_conversation(inbox_identifier, contact_identifier)
  p result
rescue Cfchat::ApiError => e
  puts "Error when calling ConversationsAPIApi->create_a_conversation: #{e}"
end

Using the create_a_conversation_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> create_a_conversation_with_http_info(inbox_identifier, contact_identifier)

begin
  # Create a conversation
  data, status_code, headers = api_instance.create_a_conversation_with_http_info(inbox_identifier, contact_identifier)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <PublicConversation>
rescue Cfchat::ApiError => e
  puts "Error when calling ConversationsAPIApi->create_a_conversation_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
inbox_identifier String The identifier obtained from API inbox channel
contact_identifier String The source id of contact obtained on contact create

Return type

PublicConversation

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json; charset=utf-8

list_all_contact_conversations

<Array> list_all_contact_conversations(inbox_identifier, contact_identifier)

List all conversations

List all conversations for the contact

Examples

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::ConversationsAPIApi.new
inbox_identifier = 'inbox_identifier_example' # String | The identifier obtained from API inbox channel
contact_identifier = 'contact_identifier_example' # String | The source id of contact obtained on contact create

begin
  # List all conversations
  result = api_instance.list_all_contact_conversations(inbox_identifier, contact_identifier)
  p result
rescue Cfchat::ApiError => e
  puts "Error when calling ConversationsAPIApi->list_all_contact_conversations: #{e}"
end

Using the list_all_contact_conversations_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> list_all_contact_conversations_with_http_info(inbox_identifier, contact_identifier)

begin
  # List all conversations
  data, status_code, headers = api_instance.list_all_contact_conversations_with_http_info(inbox_identifier, contact_identifier)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<PublicConversation>>
rescue Cfchat::ApiError => e
  puts "Error when calling ConversationsAPIApi->list_all_contact_conversations_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
inbox_identifier String The identifier obtained from API inbox channel
contact_identifier String The source id of contact obtained on contact create

Return type

Array<PublicConversation>

Authorization

userApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json; charset=utf-8