Get a campaign's status
curl --request GET \
--url https://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id} \
--header 'Authorization: <authorization>'import requests
url = "https://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}', 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://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}",
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: <authorization>"
],
]);
$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://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"launch_request_id": "59d7ef01-4518-444f-816e-1c45c1748974",
"status": "DONE",
"poll_id": 1251072,
"deployments": [
{
"conversation_id": "671a1a2e2e2e2e2e2e2e2e2e",
"treble_id": "abc123",
"cellphone": "3051234567",
"business_scope_id": null,
"username": null,
"status": "SENT"
}
]
}{
"detail": "There is no launch request with this id for this company"
}API
Get a campaign's status
Check how a campaign submitted to POST /v2/send-campaign is progressing: whether it’s still pending, has been claimed for processing, or is done, along with the status of each individual deployment it expanded into.
GET
/
v2
/
send-campaign
/
{launch_request_id}
Get a campaign's status
curl --request GET \
--url https://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id} \
--header 'Authorization: <authorization>'import requests
url = "https://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}', 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://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}",
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: <authorization>"
],
]);
$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://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://campaign-orchestration.treble.ai/v2/send-campaign/{launch_request_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"launch_request_id": "59d7ef01-4518-444f-816e-1c45c1748974",
"status": "DONE",
"poll_id": 1251072,
"deployments": [
{
"conversation_id": "671a1a2e2e2e2e2e2e2e2e2e",
"treble_id": "abc123",
"cellphone": "3051234567",
"business_scope_id": null,
"username": null,
"status": "SENT"
}
]
}{
"detail": "There is no launch request with this id for this company"
}Remember that to use this endpoint, you must have obtained your API key in the Developers section of the Treble platform.
launch_request_id returned by Send a campaign to check whether it’s still PENDING, has been CLAIMED for processing, or is DONE — along with the status of each individual deployment it expanded into.
Deployment status values
Each item indeployments has its own status, which is null until the Conversation Runtime has picked it up. From there, it moves through one of these values:
| Status | Meaning |
|---|---|
RECEIVED | The Conversation Runtime received the deployment and is about to send it. |
RECEIVED_BY_WORKER | A worker picked it up and is processing it. |
RETRY | A transient failure happened and the deployment is being retried. |
SUCCESS | The message was sent successfully (delivery not yet confirmed by WhatsApp). |
DELIVERED | WhatsApp confirmed the message was delivered to the user’s device. |
PUSH_NOTIFICATION (also seen misspelled as PUSH_NOTIFATION) | Sent as a push notification instead of a WhatsApp message. |
REVOKED | The deployment was cancelled before it was sent. |
VALIDATION_ERROR | The deployment’s data didn’t pass validation before sending. |
INVALID_PHONE | The phone number is invalid or doesn’t have WhatsApp. |
INVALID_POLL | The conversation flow was deleted or deactivated. |
MISSING_PARAMETER | A required HSM template variable was missing. |
PARAMETER_MISMATCH | The number of variables sent doesn’t match the HSM template. |
CHARACTER_LIMIT_HEADER | The HSM template’s header exceeds WhatsApp’s character limit. |
CHARACTER_LIMIT_BODY | The HSM template’s body exceeds WhatsApp’s character limit. |
FAILURE | The deployment failed after 3 retry attempts. |
FAILURE_BY_HUMAN_HANDOVER | The user is currently talking to a human agent, so the automated message wasn’t sent. |
FAILURE_BY_RATE_LIMIT | Sending would have exceeded WhatsApp’s messaging rate limit. |
COMPANY_RATE_LIMIT | Exceeded the session limit configured by the company. |
FAILURE_BY_TIER_CAPACITY | No WhatsApp line had enough capacity to make the deployment. |
FAILURE_BY_BLOCKED_CONTACT | The contact has been blocked by the company. |
FAILURE_BY_OPTOUT_CONTACT | The contact opted out of receiving messages from the company. |
FAILURE_BY_DISABLED_HSM | Meta disabled the HSM template that was sent. |
FAILURE_BY_SPAM_RATE_LIMIT | WhatsApp restricted the line for spam; it can’t send more messages right now. |
FAILURE_BY_EXPERIMENT_NUMBER | WhatsApp is using that number for internal experiments, so the deployment couldn’t go through. |
FAILURE_BY_META_CHOSE_NOT_DELIVER | Meta’s own delivery heuristics decided not to deliver the message. |
FAILURE_BY_TEST_CHANNEL | The line is a test channel and can’t send real deployments. |
FAILURE_BY_MEDIA_UPLOAD_ERROR | The media attached to the message failed to upload to WhatsApp. |
FAILURE_BY_DEPLOYMENT_LIMIT_REACHED | The company reached its deployment limit. |
FAILURE_BY_UNABLE_TO_CONTACT | WhatsApp couldn’t reach the user’s device at that moment — usually temporary. See the full explanation. |
FAILURE_BY_PAYMENT_ISSUE | Meta rejected the template send over a payment issue on the WhatsApp Business Account. See the full explanation. |
Headers
Authorization API Key
Path Parameters
The launch_request_id returned when the campaign was submitted
Was this page helpful?