List messages of a broadcast
curl --request GET \
--url https://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/messages \
--header 'api-key: <api-key>'import requests
url = "https://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/messages"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/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://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/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 => [
"api-key: <api-key>"
],
]);
$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://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/messages")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contactPhoneNumber": "<string>",
"status": "<string>",
"batchNumber": 0,
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "<string>",
"type": "<string>",
"from": "<string>",
"to": "<string>",
"sendDate": "2023-11-07T05:31:56Z",
"deliverDate": "2023-11-07T05:31:56Z",
"readDate": "2023-11-07T05:31:56Z",
"createDate": "2023-11-07T05:31:56Z"
}
],
"cursors": {
"next": "<string>"
}
}Broadcasts
List messages of a broadcast
Returns a paginated list of messages for a specific broadcast. Use the status query parameter to filter by message status.
GET
/
broadcasts
/
{broadcastId}
/
messages
List messages of a broadcast
curl --request GET \
--url https://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/messages \
--header 'api-key: <api-key>'import requests
url = "https://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/messages"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/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://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/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 => [
"api-key: <api-key>"
],
]);
$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://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/messages")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://messenger-public-api.cogfy.com/broadcasts/{broadcastId}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contactPhoneNumber": "<string>",
"status": "<string>",
"batchNumber": 0,
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "<string>",
"type": "<string>",
"from": "<string>",
"to": "<string>",
"sendDate": "2023-11-07T05:31:56Z",
"deliverDate": "2023-11-07T05:31:56Z",
"readDate": "2023-11-07T05:31:56Z",
"createDate": "2023-11-07T05:31:56Z"
}
],
"cursors": {
"next": "<string>"
}
}Authorizations
Path Parameters
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Query Parameters
Opaque cursor returned by a previous call, used to fetch the next page
Filter by broadcast message status.
Possible values:
pending— Message queued, not yet sent to WhatsApp.sent— Message sent to WhatsApp, awaiting delivery confirmation.delivered— WhatsApp confirmed the message was delivered to the recipient.read— WhatsApp confirmed the recipient read the message.failed— The send attempt or WhatsApp delivery failed.skipped— The recipient was skipped (e.g., marketing opt-out).