Exportar conversas
curl --request GET \
--url https://data-api.morada.ai/v1/export/conversations \
--header 'Authorization: Bearer <token>'import requests
url = "https://data-api.morada.ai/v1/export/conversations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://data-api.morada.ai/v1/export/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://data-api.morada.ai/v1/export/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://data-api.morada.ai/v1/export/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://data-api.morada.ai/v1/export/conversations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.morada.ai/v1/export/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": [
{
"id": "<string>",
"workspace_id": "<string>",
"cursor_at": "2023-11-07T05:31:56Z",
"person_id": "<string>",
"agent_id": 123,
"deal_id": "<string>",
"target": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"last_message_at": "2023-11-07T05:31:56Z",
"props": {}
}
],
"next_cursor": "<string>",
"count": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Data
Exportar conversas
Exporta as conversas do seu workspace, página a página, com contato, agente, deal e marcos de tempo.
GET
/
v1
/
export
/
conversations
Exportar conversas
curl --request GET \
--url https://data-api.morada.ai/v1/export/conversations \
--header 'Authorization: Bearer <token>'import requests
url = "https://data-api.morada.ai/v1/export/conversations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://data-api.morada.ai/v1/export/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://data-api.morada.ai/v1/export/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://data-api.morada.ai/v1/export/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://data-api.morada.ai/v1/export/conversations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data-api.morada.ai/v1/export/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": [
{
"id": "<string>",
"workspace_id": "<string>",
"cursor_at": "2023-11-07T05:31:56Z",
"person_id": "<string>",
"agent_id": 123,
"deal_id": "<string>",
"target": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"last_message_at": "2023-11-07T05:31:56Z",
"props": {}
}
],
"next_cursor": "<string>",
"count": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Exporta as conversas do seu workspace, paginadas por cursor.
- Carga completa (pontual): chame sem
updated_sincepara trazer todas as conversas. - Incremental: informe
updated_since(ISO 8601) para trazer apenas o que mudou desde então.
next_cursor da resposta como cursor na chamada seguinte, até ele voltar null. Grave as linhas com upsert por id — a mesma linha pode reaparecer entre pulls (semântica CDC).
O significado de cada campo retornado está detalhado na seção Response abaixo.Authorizations
Workspace API key no formato mk_..., gerada na plataforma em Integrações → Configurar API.
Query Parameters
Timestamp ISO 8601. Marca-d'água incremental: retorna apenas o que mudou desde então. Omita para uma exportação completa.
Cursor opaco de paginação, conforme retornado em next_cursor na página anterior.
Máximo de linhas por página (1 a 1000, padrão 100). Valores fora do intervalo são ajustados, não rejeitados.
Required range:
1 <= x <= 1000Was this page helpful?