curl --request GET \
--url https://api.v3.mozarth.com/public/v1/calls \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.v3.mozarth.com/public/v1/calls"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.v3.mozarth.com/public/v1/calls', 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.v3.mozarth.com/public/v1/calls",
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.v3.mozarth.com/public/v1/calls"
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.v3.mozarth.com/public/v1/calls")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.v3.mozarth.com/public/v1/calls")
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": [
{
"campaignId": "<string>",
"connectedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"debtorId": "<string>",
"direction": "<string>",
"effectiveDurationSec": 123,
"fromNumber": "<string>",
"id": "<string>",
"metricsEndTime": "2023-11-07T05:31:56Z",
"metricsStartTime": "2023-11-07T05:31:56Z",
"portfolioId": "<string>",
"status": "<string>",
"toNumber": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"hasMore": true,
"limit": 123,
"nextCursor": "<string>"
}
}Listar llamadas
Solo devuelve llamadas vinculadas a un deudor de la cartera; las llamadas sin deudor asociado no se listan.
curl --request GET \
--url https://api.v3.mozarth.com/public/v1/calls \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.v3.mozarth.com/public/v1/calls"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.v3.mozarth.com/public/v1/calls', 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.v3.mozarth.com/public/v1/calls",
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.v3.mozarth.com/public/v1/calls"
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.v3.mozarth.com/public/v1/calls")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.v3.mozarth.com/public/v1/calls")
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": [
{
"campaignId": "<string>",
"connectedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"debtorId": "<string>",
"direction": "<string>",
"effectiveDurationSec": 123,
"fromNumber": "<string>",
"id": "<string>",
"metricsEndTime": "2023-11-07T05:31:56Z",
"metricsStartTime": "2023-11-07T05:31:56Z",
"portfolioId": "<string>",
"status": "<string>",
"toNumber": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"hasMore": true,
"limit": 123,
"nextCursor": "<string>"
}
}Autorizaciones
Clave de API de tu organización en el header Authorization: Bearer <clave>. Las claves empiezan con moz_ y las emite un superadmin desde el Admin.
Parámetros de consulta
Tamaño de página, de 1 a 100 (default 50). 0 o negativo vuelve al default; mayor a 100 se recorta a 100; un valor no numérico responde 400 validation_error.
50
Id del deudor. Solo se listan llamadas vinculadas a un deudor.
Fecha ISO 8601 (fecha o fecha y hora) desde la que se incluyen llamadas. Un valor no parseable responde 400.
Fecha ISO 8601 hasta la que se incluyen llamadas. Si viene sin hora, se toma hasta el final de ese día (UTC). Un valor no parseable responde 400.
Uno o varios valores separados por coma. Valores permitidos: queued, ringing, in-progress, analyzing, completed, forwarded, busy, no-answer, failed, voicemail, rescheduled.
Uno o varios valores separados por coma. Valores permitidos: inbound, outbound.