Conversations
The bread and butter of MAAX AI business is generating perfect messages. This section explains in detail how to use the endpoints needed to make that happen.
Last updated
The bread and butter of MAAX AI business is generating perfect messages. This section explains in detail how to use the endpoints needed to make that happen.
Last updated
There are two endpoints required to create and retrieve a message:
For creating conversations and getting conversation history you can use two other endpoints (used mostly for advanced sales applications):
We highly recommend that you review the visually enhanced explanations of how our API works. As a minimum, please review the following diagram:
POST
https://app.max.ai/api/initiate_answer_generation/
This endpoint tasks MAAX AI with generating a response to a message your company received.
message_content*
String
Contents of the message from your customer.
platform*
String
Where will you be sending the response to? website, email, sms
ai_id
Integer
service_type
String
For Customer Support use customer_support_automation.
For Sales use sales_automation.
prospect_id
Integer
The id of prospect who is asking the question (If it is not provided, the new one will be created based on the prospect_info)
prospect_info
JSON
At least one of the contact methods should be provided, along with the first and last names. You can always override these details, so if you do not have a last name, supply a blank string.
conversation_id
Int
output_format
String
Leave blank if you wish to receive a plain text response. Use html if you wish to receive a response formatted as html (recommended for sending email responses).
Content-Type*
String
application/json
2hd-api-key*
String
GET
https://app.maax.ai/api/retrieve_answer/
service_type*
String
incoming_message_id*
Integer
2hd-api-key
String
POST
https://app.maax.ai/api/create-conversation/
This function is responsible for creating a conversation for a given prospect. A prospect is identified by their prospect_id, and additional information about the prospect can be provided in the prospect_info
field. Most often used in sales conversations, and very rarely for customer support conversations.
prospect_id
Integer
The id of the prospect for which the conversation is created. If it is not provided, a new prospect will be created based on the prospect_info
.
prospect_info
JSON
{ "email": "EMAIL", "phone": "PHONE_NUMBER", "first_name": "FIRST_NAME", "last_name": "LAST_NAME", "instagram": "INSTAGRAM_HANDLE", "facebook": "FACEBOOK_HANDLE" ... }
At least one contact information field (phone, email, Instagram, or Facebook) should be given, along with first name and last name.
2hd-api-key*
String
GET
https:/app.maax.ai/create-conversation/
The conversation is identified by its conversation_id
. If a service_type
is provided, the function fetches the history specific to that service type.
conversation_id
Integer
Conversation for which history is desired.
service_type
String
Used for security purposes. Must match the Conversation object identified by 'conversation_id'
above.
For Customer Support use customer_support_automation.
For Sales use sales_automation.
2hd-api-key
String
Leave blank for customer_support_automation service type. For sales_automation service type get the ID from the
{"email":"
", "phone":"1234567778" "first_name": "student", "last_name":"test"}
The conversation id between this user and the prospect. If it is not given, the latest conversation between these two will be used, otherwise, a new one will be created. Please review the endpoint if you want to create a conversation and specify an id. Recommended for sales applications.
Your MAAX AI API key, which you can locate at
Must be the same as in the for the given incoming_message_id. Used for security purposes.
An integer returned by a successfully executed
Your MAAX AI API key, which you can locate at
Your MAAX AI API key, which you can locate at
Your MAAX AI API key, which you can locate at
Answer Generation With MAAX AI