Publish and versions
curl --request POST \
--url https://api.example.com/api/v1/cadences/{id}/publish \
--header 'Content-Type: application/json' \
--data '
{
"lock_version": 123,
"note": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/cadences/{id}/publish"
payload = {
"lock_version": 123,
"note": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({lock_version: 123, note: '<string>'})
};
fetch('https://api.example.com/api/v1/cadences/{id}/publish', 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.example.com/api/v1/cadences/{id}/publish",
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([
'lock_version' => 123,
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/v1/cadences/{id}/publish"
payload := strings.NewReader("{\n \"lock_version\": 123,\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/v1/cadences/{id}/publish")
.header("Content-Type", "application/json")
.body("{\n \"lock_version\": 123,\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/cadences/{id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"lock_version\": 123,\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{ "success": true, "message": "Version 2 published.", "data": { "number": 2 } }
For debt collection
Publish and versions
Publishes the draft, pauses and resumes the cadence, lists and restores versions and computes the impact
POST
/
api
/
v1
/
cadences
/
{id}
/
publish
Publish and versions
curl --request POST \
--url https://api.example.com/api/v1/cadences/{id}/publish \
--header 'Content-Type: application/json' \
--data '
{
"lock_version": 123,
"note": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/cadences/{id}/publish"
payload = {
"lock_version": 123,
"note": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({lock_version: 123, note: '<string>'})
};
fetch('https://api.example.com/api/v1/cadences/{id}/publish', 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.example.com/api/v1/cadences/{id}/publish",
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([
'lock_version' => 123,
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/v1/cadences/{id}/publish"
payload := strings.NewReader("{\n \"lock_version\": 123,\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/v1/cadences/{id}/publish")
.header("Content-Type", "application/json")
.body("{\n \"lock_version\": 123,\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/cadences/{id}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"lock_version\": 123,\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{ "success": true, "message": "Version 2 published.", "data": { "number": 2 } }
Publish and versions
Publishes the draft as a new version, pauses and resumes the cadence, lists the published versions, restores an old version and counts how many debts the cadence takes. Available only to debt-collection workspaces (see Collection cadences).| What it does | Call |
|---|---|
| Publishes the draft | POST /api/v1/cadences/{id}/publish |
| Pauses the cadence | POST /api/v1/cadences/{id}/pause |
| Resumes the cadence | POST /api/v1/cadences/{id}/resume |
| Lists the published versions | GET /api/v1/cadences/{id}/versions |
| Copies a version into the draft | POST /api/v1/cadences/{id}/versions/{version_id}/restore |
| Computes the impact | POST /api/v1/cadences/{id}/impact |
Publish
The
lock_version of the draft you reviewed. If it changed since, the response is 409 and nothing is published.{ "success": true, "message": "Version 2 published.", "data": { "number": 2 } }
422 and the reasons in errors when, for example: there is no band; bands overlap; a band has no contact; a contact is outside its band; the channel is not available; the channel configuration is invalid (unpublished agent, archived campaign, WhatsApp template not approved, non-public webhook URL); a band’s first contact is not always.
{ "success": false, "message": "The cadence cannot be published yet.", "errors": { "steps.0.actions.0": ["The call needs a voice campaign of this workspace."] } }
Pause and resume
Pausing stops creating contacts at once; what is already in a campaign follows the campaign. Only resume sets the cadence back toactive. A published cadence cannot be deleted: pause it.
Versions
Each version has the draft’s format, pluspublished_by_name (who published on the screen; null when published through the API with the environment token) and is_current.
Restoring copies the chosen version into the draft (data.lock_version); nothing changes until you publish. A version of another cadence answers 404.
Impact
Counts, without creating contacts, how many debts of your portfolio enter the cadence: total, per band, outside the bands, already in a higher-priority cadence, and a histogram by delinquency. Uses the draft, or the version in force when there is no draft.The impact goes through the whole portfolio: up to 10 calls per minute. Above that the response is
429.{
"success": true,
"message": "",
"data": { "total": 1610, "per_step": [1200, 410], "outside_steps": 230, "higher_priority": 0, "histogram": [ { "from": -5, "to": -3, "count": 12 }, … ], "computed_at": "2026-11-24T18:05:00+00:00" }
}
Error responses
| Status | When |
|---|---|
404 | a cadence or version from another workspace |
409 | the draft changed after you read it |
422 | publication refused (errors), nothing to publish, or pause/resume in the wrong status |
429 | impact above 10 per minute |
Was this page helpful?