Get conversations report
Conversation report, with one row per protocol. For large volumes, use the system’s export, which runs in the background.
curl --request GET \
--url https://api.connectadesk.com/api/v1/reports/conversations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.connectadesk.com/api/v1/reports/conversations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.connectadesk.com/api/v1/reports/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.connectadesk.com/api/v1/reports/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.connectadesk.com/api/v1/reports/conversations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.connectadesk.com/api/v1/reports/conversations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/reports/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"protocol": 448120,
"channelid": 11,
"channelname": "Instagram Loja",
"channeltype": "instagram",
"channelaccount": "@lojaexemplo",
"ticketid": 90211,
"ticketnps": true,
"updateat": "2023-11-07T05:31:56Z",
"userid": 3,
"username": "Marina Alves",
"userprofileurl": "<string>",
"contactid": 842,
"contactcreatedat": "2023-11-07T05:31:56Z",
"contactname": "Maria Silva",
"contactnumber": "5511987654321",
"contactemail": "maria.silva@exemplo.com.br",
"contactcode": "CLI-00842",
"contactorigin": "site",
"contactcpfcnpj": "12345678909",
"queueid": 2,
"queuename": "Suporte",
"createdat": "2023-11-07T05:31:56Z",
"finishedat": "2023-11-07T05:31:56Z",
"nps": true,
"wrapupid": 123,
"wrapupchatbot": true,
"wrapuptypeid": 12,
"wrapuptypename": "Dúvida resolvida",
"wrapupnotes": "<string>",
"status": "closed",
"chattype": "Receptivo",
"tags": [
{
"id": 3,
"name": "Cliente VIP",
"color": "#6941C6"
}
]
}
],
"meta": {
"page": 1,
"perPage": 20,
"hasMore": true
}
}Authorizations
API token in the sk_live_… format.
Query Parameters
Page number, starting at 1. An invalid value is treated as 1.
x >= 1Number of items per page. The maximum depends on the environment (default 100).
1 <= x <= 100Start of the period, in the company time zone: YYYY-MM-DD or YYYY-MM-DD HH:mm:ss. With only the date, it starts at 00:00:00.
End of the period, in the same format. With only the date, it runs until 23:59:59 of that day.
updated considers the creation, closing and update dates. created considers only the creation date.
updated, created Alternative to the period: the last N days.
Agent ids (the id from GET /users), separated by commas. An agent that is not from your company returns 404 (ERR_API_USER_NOT_FOUND).
Queue ids, separated by commas. An id that is not from your company returns 422 (ERR_API_INVALID_REFERENCE).
Channel ids, separated by commas. An id that is not from your company returns 422 (ERR_API_INVALID_REFERENCE).
Tag ids, separated by commas. An id that is not from your company returns 422 (ERR_API_INVALID_REFERENCE).
Wrap-up ids, separated by commas. An id that is not from your company returns 422 (ERR_API_INVALID_REFERENCE).
Search by contact.
Ticket protocol number.
Conversation type: inbound, outbound, campaign or scheduled. How the conversation started:
| value | meaning |
|---|---|
incoming | Inbound (the contact spoke first). |
outcoming | Outbound (an agent started it from the panel). |
campaign | Campaign send. |
outcoming_api | Started by this API. |
outcoming_automation | Started by a Flow automation. |
outcoming_schedule | Scheduled send. |
incoming, outcoming, campaign, outcoming_api, outcoming_automation, outcoming_schedule curl --request GET \
--url https://api.connectadesk.com/api/v1/reports/conversations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.connectadesk.com/api/v1/reports/conversations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.connectadesk.com/api/v1/reports/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.connectadesk.com/api/v1/reports/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.connectadesk.com/api/v1/reports/conversations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.connectadesk.com/api/v1/reports/conversations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/reports/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"protocol": 448120,
"channelid": 11,
"channelname": "Instagram Loja",
"channeltype": "instagram",
"channelaccount": "@lojaexemplo",
"ticketid": 90211,
"ticketnps": true,
"updateat": "2023-11-07T05:31:56Z",
"userid": 3,
"username": "Marina Alves",
"userprofileurl": "<string>",
"contactid": 842,
"contactcreatedat": "2023-11-07T05:31:56Z",
"contactname": "Maria Silva",
"contactnumber": "5511987654321",
"contactemail": "maria.silva@exemplo.com.br",
"contactcode": "CLI-00842",
"contactorigin": "site",
"contactcpfcnpj": "12345678909",
"queueid": 2,
"queuename": "Suporte",
"createdat": "2023-11-07T05:31:56Z",
"finishedat": "2023-11-07T05:31:56Z",
"nps": true,
"wrapupid": 123,
"wrapupchatbot": true,
"wrapuptypeid": 12,
"wrapuptypename": "Dúvida resolvida",
"wrapupnotes": "<string>",
"status": "closed",
"chattype": "Receptivo",
"tags": [
{
"id": 3,
"name": "Cliente VIP",
"color": "#6941C6"
}
]
}
],
"meta": {
"page": 1,
"perPage": 20,
"hasMore": true
}
}
