Listar mensagens de uma campanha
curl --request POST \
--url https://api.wppfy.com/sender/listmessages \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"folder_id": "<string>",
"page": 1,
"pageSize": 1000
}
'import requests
url = "https://api.wppfy.com/sender/listmessages"
payload = {
"folder_id": "<string>",
"page": 1,
"pageSize": 1000
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({folder_id: '<string>', page: 1, pageSize: 1000})
};
fetch('https://api.wppfy.com/sender/listmessages', 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.wppfy.com/sender/listmessages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'folder_id' => '<string>',
'page' => 1,
'pageSize' => 1000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wppfy.com/sender/listmessages"
payload := strings.NewReader("{\n \"folder_id\": \"<string>\",\n \"page\": 1,\n \"pageSize\": 1000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wppfy.com/sender/listmessages")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"folder_id\": \"<string>\",\n \"page\": 1,\n \"pageSize\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/sender/listmessages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"folder_id\": \"<string>\",\n \"page\": 1,\n \"pageSize\": 1000\n}"
response = http.request(request)
puts response.read_body{
"messages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"messageid": "<string>",
"chatid": "<string>",
"fromMe": false,
"isGroup": false,
"messageTimestamp": 0,
"edited": "",
"quoted": "",
"reaction": "",
"sender": "",
"senderName": "",
"source": "",
"status": "",
"text": "",
"vote": "",
"buttonOrListid": "",
"convertOptions": "",
"fileURL": "",
"content": "<string>",
"owner": "",
"track_source": "",
"track_id": "",
"created": "(strftime('%Y-%m-%d %H:%M:%f', 'now'))",
"updated": "(strftime('%Y-%m-%d %H:%M:%f', 'now'))",
"ai_metadata": {
"agent_id": "<string>",
"request": {
"messages": "<array>",
"tools": "<array>",
"options": {
"model": "<string>",
"temperature": 123,
"maxTokens": 123,
"topP": 123,
"frequencyPenalty": 123,
"presencePenalty": 123
}
},
"response": {
"choices": "<array>",
"toolResults": "<array>",
"error": "<string>"
}
}
}
],
"pagination": {
"total": 123,
"page": 123,
"pageSize": 123,
"lastPage": 123
}
}{
"error": "folder_id is required"
}{
"error": "Failed to fetch messages"
}Mensagem em massa
Listar mensagens de uma campanha
Retorna a lista de mensagens de uma campanha específica, com opções de filtro por status e paginação
POST
/
sender
/
listmessages
Listar mensagens de uma campanha
curl --request POST \
--url https://api.wppfy.com/sender/listmessages \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"folder_id": "<string>",
"page": 1,
"pageSize": 1000
}
'import requests
url = "https://api.wppfy.com/sender/listmessages"
payload = {
"folder_id": "<string>",
"page": 1,
"pageSize": 1000
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({folder_id: '<string>', page: 1, pageSize: 1000})
};
fetch('https://api.wppfy.com/sender/listmessages', 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.wppfy.com/sender/listmessages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'folder_id' => '<string>',
'page' => 1,
'pageSize' => 1000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wppfy.com/sender/listmessages"
payload := strings.NewReader("{\n \"folder_id\": \"<string>\",\n \"page\": 1,\n \"pageSize\": 1000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wppfy.com/sender/listmessages")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"folder_id\": \"<string>\",\n \"page\": 1,\n \"pageSize\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/sender/listmessages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"folder_id\": \"<string>\",\n \"page\": 1,\n \"pageSize\": 1000\n}"
response = http.request(request)
puts response.read_body{
"messages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"messageid": "<string>",
"chatid": "<string>",
"fromMe": false,
"isGroup": false,
"messageTimestamp": 0,
"edited": "",
"quoted": "",
"reaction": "",
"sender": "",
"senderName": "",
"source": "",
"status": "",
"text": "",
"vote": "",
"buttonOrListid": "",
"convertOptions": "",
"fileURL": "",
"content": "<string>",
"owner": "",
"track_source": "",
"track_id": "",
"created": "(strftime('%Y-%m-%d %H:%M:%f', 'now'))",
"updated": "(strftime('%Y-%m-%d %H:%M:%f', 'now'))",
"ai_metadata": {
"agent_id": "<string>",
"request": {
"messages": "<array>",
"tools": "<array>",
"options": {
"model": "<string>",
"temperature": 123,
"maxTokens": 123,
"topP": 123,
"frequencyPenalty": 123,
"presencePenalty": 123
}
},
"response": {
"choices": "<array>",
"toolResults": "<array>",
"error": "<string>"
}
}
}
],
"pagination": {
"total": 123,
"page": 123,
"pageSize": 123,
"lastPage": 123
}
}{
"error": "folder_id is required"
}{
"error": "Failed to fetch messages"
}Autorizações
Corpo
application/json
ID da campanha a ser consultada
Status das mensagens para filtrar
Opções disponíveis:
Scheduled, Sent, Failed Número da página para paginação
Intervalo obrigatório:
x >= 1Quantidade de itens por página
Intervalo obrigatório:
1 <= x <= 1000⌘I
