Get Conversations

Page describing the API for getting list of conversations

For getting the list of conversations, each one with their information

Get conversations

POST https://api.jelou.ai/v1/metrics/conversations/attended/external

Returns all of the conversations with its information

Query Parameters

NameTypeDescription

limit

int

total of conversations to be queried (default: 10)

Request Body

NameTypeDescription

startAt*

String

Start date of the range to be queried

endAt*

String

end date of the range to be queried

getJson*

Boolean

Type of the response (must be true)

{
	"message": [
		"Retrieving conversations Succeded"
	],
	"status": "success",
	"results": [
		{
			"_id": "111111aaaaaa",
			"operator": {
				"names": "Jelou app",
			},
			"user": {
				"id": "111111111111"
			},
			"bot": {
				"name": "Jelou Dev WhatsApp"
			},
			"company": {
				"id": 123
			},
			"assignationMethod": {
				"teamName": "Frontend"
			},
			"state": "expired",
			"endedReason": "expired",
			"startAt": "2023-06-08 15:52:41",
			"endAt": "2023-06-08 23:07:56",
			"origin": "ticket",
			"timeRepliedOperator": 795880,
			"conversationDuration": 26115953
		}
	],
	"pagination": {
		"limit": 1,
		"total": 61,
		"offset": 0,
		"totalPages": 61
	},
	"links": [
		{
			"number": 1,
			"url": "/v1/metrics/conversations/attended/external?limit=1&page=1"
		},
		{
			"number": 2,
			"url": "/v1/metrics/conversations/attended/external?limit=1&page=2"
		},
		{
			"number": 3,
			"url": "/v1/metrics/conversations/attended/external?limit=1&page=3"
		},
		{
			"number": 4,
			"url": "/v1/metrics/conversations/attended/external?limit=1&page=4"
		},
		{
			"number": 5,
			"url": "/v1/metrics/conversations/attended/external?limit=1&page=5"
		}
	]
}

Example:

curl --request POST \
  --url 'https://api.jelou.ai/v1/metrics/conversations/attended/external?limit=10' \
  --header 'Authorization: <clientId>:<clientSecret>' \
  --header 'content-type: application/json;charset=UTF-8' \
  --data '{
	"startAt": "2020-01-01T00:00:00-05:00",
	"endAt": "2020-01-01T23:59:59-05:00",
	"getJson": true
}'

Last updated