Controlar campanha de envio em massa
curl --request POST \
--url https://api.wppfy.com/sender/edit \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"folder_id": "folder_123",
"action": "stop"
}
'import requests
url = "https://api.wppfy.com/sender/edit"
payload = {
"folder_id": "folder_123",
"action": "stop"
}
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: 'folder_123', action: 'stop'})
};
fetch('https://api.wppfy.com/sender/edit', 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/edit",
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' => 'folder_123',
'action' => 'stop'
]),
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/edit"
payload := strings.NewReader("{\n \"folder_id\": \"folder_123\",\n \"action\": \"stop\"\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/edit")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"folder_id\": \"folder_123\",\n \"action\": \"stop\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/sender/edit")
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\": \"folder_123\",\n \"action\": \"stop\"\n}"
response = http.request(request)
puts response.read_body{
"status": "paused"
}{
"error": "folder_id is required"
}Mensagem em massa
Controlar campanha de envio em massa
Permite controlar campanhas de envio de mensagens em massa através de diferentes ações:
Ações Disponíveis:
🛑 stop - Pausar campanha
- Pausa uma campanha ativa ou agendada
- Altera o status para “paused”
- Use quando quiser interromper temporariamente o envio
- Mensagens já enviadas não são afetadas
▶️ continue - Continuar campanha
- Retoma uma campanha pausada
- Altera o status para “scheduled”
- Use para continuar o envio após pausar uma campanha
- Não funciona em campanhas já concluídas (“done”)
🗑️ delete - Deletar campanha
- Remove completamente a campanha
- Deleta apenas mensagens NÃO ENVIADAS (status “scheduled”)
- Mensagens já enviadas são preservadas no histórico
- Operação é executada de forma assíncrona
Status de Campanhas:
- scheduled: Agendada para envio
- sending: Enviando mensagens
- paused: Pausada pelo usuário
- done: Concluída (não pode ser alterada)
- deleting: Sendo deletada (operação em andamento)
POST
/
sender
/
edit
Controlar campanha de envio em massa
curl --request POST \
--url https://api.wppfy.com/sender/edit \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"folder_id": "folder_123",
"action": "stop"
}
'import requests
url = "https://api.wppfy.com/sender/edit"
payload = {
"folder_id": "folder_123",
"action": "stop"
}
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: 'folder_123', action: 'stop'})
};
fetch('https://api.wppfy.com/sender/edit', 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/edit",
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' => 'folder_123',
'action' => 'stop'
]),
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/edit"
payload := strings.NewReader("{\n \"folder_id\": \"folder_123\",\n \"action\": \"stop\"\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/edit")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"folder_id\": \"folder_123\",\n \"action\": \"stop\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/sender/edit")
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\": \"folder_123\",\n \"action\": \"stop\"\n}"
response = http.request(request)
puts response.read_body{
"status": "paused"
}{
"error": "folder_id is required"
}Autorizações
Corpo
application/json
Identificador único da campanha de envio
Exemplo:
"folder_123"
Ação a ser executada na campanha:
- stop: Pausa a campanha (muda para status "paused")
- continue: Retoma campanha pausada (muda para status "scheduled")
- delete: Remove campanha e mensagens não enviadas (assíncrono)
Opções disponíveis:
stop, continue, delete Exemplo:
"stop"
Resposta
Ação realizada com sucesso
- Resposta para ação 'stop'
- Resposta para ação 'continue'
- Resposta para ação 'delete'
Status da campanha após pausar
Opções disponíveis:
paused Exemplo:
"paused"
