curl --request GET \
--url https://origami.chat/api/v2/campaigns/{campaignId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://origami.chat/api/v2/campaigns/{campaignId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://origami.chat/api/v2/campaigns/{campaignId}', 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}",
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: 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}"
req, _ := http.NewRequest("GET", 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.get("https://origami.chat/api/v2/campaigns/{campaignId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://origami.chat/api/v2/campaigns/{campaignId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "campaign",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"status": "draft",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channels": {
"email": true,
"linkedin": true
},
"settings": {
"blockActiveDuplicates": true,
"blockPriorContacts": true,
"autoLeadRefillEnabled": true,
"autoTopUpEnabled": true
},
"brief": "<unknown>",
"outOfLeads": true,
"haltedCount": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Fetch a campaign
curl --request GET \
--url https://origami.chat/api/v2/campaigns/{campaignId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://origami.chat/api/v2/campaigns/{campaignId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://origami.chat/api/v2/campaigns/{campaignId}', 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}",
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: 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}"
req, _ := http.NewRequest("GET", 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.get("https://origami.chat/api/v2/campaigns/{campaignId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://origami.chat/api/v2/campaigns/{campaignId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "campaign",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"status": "draft",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channels": {
"email": true,
"linkedin": true
},
"settings": {
"blockActiveDuplicates": true,
"blockPriorContacts": true,
"autoLeadRefillEnabled": true,
"autoTopUpEnabled": true
},
"brief": "<unknown>",
"outOfLeads": true,
"haltedCount": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The campaign id (a first-class campaigns row).
Response
The Campaign object.
A first-class campaigns row: org-global, homed in a workspace.
Its queue is the set of sequences stamped with its id (one sequence
per person). It owns no table: tableId is derived (informational)
from the dominant table of its enrolled sequences.
"campaign"The campaign's lifecycle state.
draft, active, paused Legacy home workspace; null for campaigns created from workspace-less chats.
Derived leads table (dominant enrolled-sequence table); null for a shell campaign.
Which channels the campaign sends on.
Show child attributes
Show child attributes
Auto-cancel toggles (read-only on this object) + Auto Lead Refill (writable via PATCH /campaigns/{campaignId}).
Show child attributes
Show child attributes
Agent-authored brief (audience prose + estimated size); null before drafting.
How many of an active campaign's people a disconnected sender stopped rather than their finishing. Reported for every active campaign, so it can be above zero while the campaign is still sending to everyone else; combine it with outOfLeads to read the campaign's end state. outOfLeads alone cannot tell a campaign that completed from one that was cut short, since both have nothing pending: outOfLeads with haltedCount above zero means the campaign ended early, and reconnecting the sender resumes those people while adding leads will not reach them. Zero for draft and paused campaigns.
x >= 0