API Reference
List messages
List messages previously sent by this project.
GET
/
v1
/
messages
List messages
curl --request GET \
--url https://api.zavu.dev/v1/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zavu.dev/v1/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zavu.dev/v1/messages', 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.zavu.dev/v1/messages",
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.zavu.dev/v1/messages"
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.zavu.dev/v1/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zavu.dev/v1/messages")
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{
"items": [
{
"id": "jd7x2k3m4n5p6q7r8s9t0",
"to": "+56912345678",
"createdAt": "2023-11-07T05:31:56Z",
"from": "+13125551212",
"senderId": "sender_12345",
"text": "<string>",
"content": {
"mediaUrl": "https://example.com/image.jpg",
"mediaId": "<string>",
"mimeType": "image/jpeg",
"filename": "invoice.pdf",
"latitude": 123,
"longitude": 123,
"locationName": "<string>",
"locationAddress": "<string>",
"contacts": [
{
"name": "<string>",
"phones": [
"<string>"
]
}
],
"buttons": [
{
"id": "<string>",
"title": "<string>"
}
],
"listButton": "<string>",
"sections": [
{
"title": "<string>",
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
]
}
],
"ctaDisplayText": "See Dates",
"ctaUrl": "https://example.com/schedule",
"ctaHeaderText": "<string>",
"ctaHeaderMediaUrl": "<string>",
"footerText": "Dates subject to change.",
"emoji": "<string>",
"reactToMessageId": "<string>",
"replyToMessageId": "<string>",
"replyToProviderMessageId": "<string>",
"replyToFrom": "<string>",
"replyToText": "<string>",
"replyToMessageType": "<string>",
"templateId": "<string>",
"templateVariables": {
"1": "John",
"2": "ORD-12345"
},
"templateButtonVariables": {
"0": "abc-report-token"
},
"templateHeaderVariables": {
"1": "Jorge y Laura"
},
"referral": {
"sourceId": "120210000000000000",
"sourceUrl": "<string>",
"headline": "<string>",
"body": "<string>",
"imageUrl": "<string>",
"videoUrl": "<string>",
"thumbnailUrl": "<string>",
"ctwaClid": "ARIzZm9vYmFyY3R3YWNsaWQ"
}
},
"conversationId": "js723987cyghwqxxaxcf590qd18axd95",
"providerMessageId": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"cost": 123,
"costProvider": 123,
"costTotal": 123,
"metadata": {},
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}{
"code": "invalid_request",
"message": "Phone number is invalid",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter by status. Not all stored statuses are filterable.
Available options:
queued, sending, sent, delivered, failed, received Filter by delivery channel.
Available options:
sms, sms_oneway, whatsapp, email, telegram, instagram, messenger, voice Required range:
x <= 100⌘I
List messages
curl --request GET \
--url https://api.zavu.dev/v1/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zavu.dev/v1/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zavu.dev/v1/messages', 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.zavu.dev/v1/messages",
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.zavu.dev/v1/messages"
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.zavu.dev/v1/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zavu.dev/v1/messages")
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{
"items": [
{
"id": "jd7x2k3m4n5p6q7r8s9t0",
"to": "+56912345678",
"createdAt": "2023-11-07T05:31:56Z",
"from": "+13125551212",
"senderId": "sender_12345",
"text": "<string>",
"content": {
"mediaUrl": "https://example.com/image.jpg",
"mediaId": "<string>",
"mimeType": "image/jpeg",
"filename": "invoice.pdf",
"latitude": 123,
"longitude": 123,
"locationName": "<string>",
"locationAddress": "<string>",
"contacts": [
{
"name": "<string>",
"phones": [
"<string>"
]
}
],
"buttons": [
{
"id": "<string>",
"title": "<string>"
}
],
"listButton": "<string>",
"sections": [
{
"title": "<string>",
"rows": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
]
}
],
"ctaDisplayText": "See Dates",
"ctaUrl": "https://example.com/schedule",
"ctaHeaderText": "<string>",
"ctaHeaderMediaUrl": "<string>",
"footerText": "Dates subject to change.",
"emoji": "<string>",
"reactToMessageId": "<string>",
"replyToMessageId": "<string>",
"replyToProviderMessageId": "<string>",
"replyToFrom": "<string>",
"replyToText": "<string>",
"replyToMessageType": "<string>",
"templateId": "<string>",
"templateVariables": {
"1": "John",
"2": "ORD-12345"
},
"templateButtonVariables": {
"0": "abc-report-token"
},
"templateHeaderVariables": {
"1": "Jorge y Laura"
},
"referral": {
"sourceId": "120210000000000000",
"sourceUrl": "<string>",
"headline": "<string>",
"body": "<string>",
"imageUrl": "<string>",
"videoUrl": "<string>",
"thumbnailUrl": "<string>",
"ctwaClid": "ARIzZm9vYmFyY3R3YWNsaWQ"
}
},
"conversationId": "js723987cyghwqxxaxcf590qd18axd95",
"providerMessageId": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"cost": 123,
"costProvider": 123,
"costTotal": 123,
"metadata": {},
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}{
"code": "invalid_request",
"message": "Phone number is invalid",
"details": {}
}