Conversation Management
Get Conversation
Section titled “Get Conversation”This endpoint will return a conversation, this includes the participants and the messages
HTTP Request
Section titled “HTTP Request”GET https://sandbox.reggora.io/vendor/conversation/<conversation_id>
URL Parameters
Section titled “URL Parameters”| Parameter | Description |
|---|---|
| conversation_id | The ID of the conversation. |
Example Request
Section titled “Example Request”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)Example Response
Section titled “Example Response”{ "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.
Vendor Send Message
Section titled “Vendor Send Message”This endpoint adds a message to the conversation. The body takes one parameter, the message.
HTTP Request
Section titled “HTTP Request”POST https://sandbox.reggora.io/vendor/conversation/<conversation_id>
URL Parameters
Section titled “URL Parameters”| Parameter | Description |
|---|---|
| conversation_id | The ID of the conversation. |
Request Body Parameters
Section titled “Request Body Parameters”| Parameter | Description | Required |
|---|---|---|
| message | The message you want to send | True |
The data field in the response is the conversation ID.
Example Request
Section titled “Example Request”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)Example Response
Section titled “Example Response”{ "data": "5c4f16764672bb00105ea5f9", "status": 200}