curl --request POST \
--url https://origami.chat/api/v2/campaigns/{campaignId}/send \
--header 'Authorization: Bearer <token>'import requests
url = "https://origami.chat/api/v2/campaigns/{campaignId}/send"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://origami.chat/api/v2/campaigns/{campaignId}/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://origami.chat/api/v2/campaigns/{campaignId}/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://origami.chat/api/v2/campaigns/{campaignId}/send"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://origami.chat/api/v2/campaigns/{campaignId}/send")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://origami.chat/api/v2/campaigns/{campaignId}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "campaign",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"launched": 123,
"launch": {
"scheduled": 123,
"firstScheduledAt": "2023-11-07T05:31:56Z",
"missingRecipientCount": 123,
"duplicateActiveCancelledCount": 123,
"duplicatePriorCancelledCount": 123,
"blocked": {
"reason": "<string>",
"message": "<string>",
"missingChannels": [
"<string>"
]
}
},
"pause": {
"stoppedSequences": 123,
"haltedSteps": 123,
"inFlightSending": 123,
"alreadyPaused": true
},
"resume": {
"resumedSequences": 123,
"noAccountSequences": 123,
"missingChannels": [
"<string>"
]
}
}Alias of POST /campaigns/{campaignId}/launch
Alias of POST /campaigns/{campaignId}/launch; activates the
campaign and runs the launch pipeline. (Before the campaigns
refactor this was a batch “mark sequences ready” op; it is now the
campaign-activate launch.) Same body, params, and result shape.
curl --request POST \
--url https://origami.chat/api/v2/campaigns/{campaignId}/send \
--header 'Authorization: Bearer <token>'import requests
url = "https://origami.chat/api/v2/campaigns/{campaignId}/send"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://origami.chat/api/v2/campaigns/{campaignId}/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://origami.chat/api/v2/campaigns/{campaignId}/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://origami.chat/api/v2/campaigns/{campaignId}/send"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://origami.chat/api/v2/campaigns/{campaignId}/send")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://origami.chat/api/v2/campaigns/{campaignId}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "campaign",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"launched": 123,
"launch": {
"scheduled": 123,
"firstScheduledAt": "2023-11-07T05:31:56Z",
"missingRecipientCount": 123,
"duplicateActiveCancelledCount": 123,
"duplicatePriorCancelledCount": 123,
"blocked": {
"reason": "<string>",
"message": "<string>",
"missingChannels": [
"<string>"
]
}
},
"pause": {
"stoppedSequences": 123,
"haltedSteps": 123,
"inFlightSending": 123,
"alreadyPaused": true
},
"resume": {
"resumedSequences": 123,
"noAccountSequences": 123,
"missingChannels": [
"<string>"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Transport-level replay protection: any v2 POST may send it
(1-255 printable ASCII characters; UUIDs recommended). The first
response for a key is recorded and replayed verbatim for retries
with the same key + method/path/body for 24 hours; replayed
responses carry the Idempotency-Replay: true response header.
Reusing a key with a different request, or retrying while the
original is still in flight, returns 409 IDEMPOTENCY_ERROR.
5xx responses are never recorded (the retry re-executes).
1 - 255^[\x21-\x7e]{1,255}$Path Parameters
The campaign id (a first-class campaigns row).
Query Parameters
Response
The transition result, or the dryRun report.
- Option 1
- Option 2
Result of a deterministic lifecycle transition
(launch / send / pause / resume). Carries the transition
facts in exactly one of launch / pause / resume depending on
which transition ran.
"campaign"draft, active, paused Drafts scheduled by this transition (0 unless launching/resuming).
Present on a launch/resume that scheduled work.
Show child attributes
Show child attributes
Present on a pause.
Show child attributes
Show child attributes
Present on a resume.
Show child attributes
Show child attributes