curl --request POST \
--url https://api.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send', 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.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"data": {
"campaign_id": "<string>",
"total_audience": 123,
"preview_count": 123,
"profile_count": 123,
"fallback_count": 123,
"distribution_utc": [
{
"hour": 123,
"count": 123
}
],
"schedule": [
{
"contactId": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z"
}
],
"next_best_channel": {
"candidate_channels": [
"<string>"
],
"profile_count": 123,
"fallback_count": 123,
"recommendations": [
{
"contact_id": "<string>",
"channel": "<string>",
"source": "profile"
}
]
}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Preview smart-send per-contact schedule
Computes a preview of the smart-send schedule for the campaign’s resolved audience: for each contact, the optimal send time derived from that contact’s own engagement profile, plus an hour-of-day distribution histogram so operators can confirm the timing before launching. When the campaign declares more than one channel, the response also includes a next_best_channel block ranking the channel most likely to engage each previewed contact. Read-only and advisory — it never enqueues a job or changes what the execution worker dispatches. The preview is bounded to a window of contacts for a fast response; no request body is required.
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send', 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.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/campaigns/{id}/preview-smart-send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"data": {
"campaign_id": "<string>",
"total_audience": 123,
"preview_count": 123,
"profile_count": 123,
"fallback_count": 123,
"distribution_utc": [
{
"hour": 123,
"count": 123
}
],
"schedule": [
{
"contactId": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z"
}
],
"next_best_channel": {
"candidate_channels": [
"<string>"
],
"profile_count": 123,
"fallback_count": 123,
"recommendations": [
{
"contact_id": "<string>",
"channel": "<string>",
"source": "profile"
}
]
}
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Dashboard JWT token from Clerk
Path Parameters
Body
No body fields are read; the audience is resolved from the campaign. Send an empty object.