Skip to content

Conversation Management

This endpoint will return a conversation, this includes the participants and the messages

GET https://sandbox.reggora.io/vendor/conversation/<conversation_id>

ParameterDescription
conversation_idThe ID of the conversation.
import requests
headers = {
'Authorization': 'Bearer {}'.format(REGGORA_AUTH_TOKEN),
'integration': '{}'.format(REGGORA_INTEGRATION_KEY)
}
response = requests.get('https://sandbox.reggora.io/vendor/conversation/<conversation_id>', headers=headers)
{
"data": {
"id": "5c4f16764672bb00105ea5f9",
"messages": [
{
"id": "5c4f16764672bb00105ea5f9",
"message": "Reggora is the best!",
"sender": {
"id": "5c4f16764672bb00105ea5f9",
"name": "Johnny Cash"
},
"sent_time": "2019-04-11 21:00:00"
},
"..."
]
},
"status": 200
}

The "..." placeholder indicates additional entries elided for brevity.

The top-level id is the conversation ID. The nested sender.id is the user ID of the message sender.

This endpoint adds a message to the conversation. The body takes one parameter, the message.

POST https://sandbox.reggora.io/vendor/conversation/<conversation_id>

ParameterDescription
conversation_idThe ID of the conversation.
ParameterDescriptionRequired
messageThe message you want to sendTrue

The data field in the response is the conversation ID.

import requests
headers = {
'Authorization': 'Bearer {}'.format(REGGORA_AUTH_TOKEN),
'integration': '{}'.format(REGGORA_INTEGRATION_KEY)
}
body = {
"message": "Don't you just love reggora?"
}
response = requests.post('https://sandbox.reggora.io/vendor/conversation/<conversation_id>', headers=headers, data=body)
{
"data": "5c4f16764672bb00105ea5f9",
"status": 200
}