Launch batch campaign
curl --request POST \
--url https://api.nixflex.com/v1/calls/batch/{campaign_id}/launchimport requests
url = "https://api.nixflex.com/v1/calls/batch/{campaign_id}/launch"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.nixflex.com/v1/calls/batch/{campaign_id}/launch', 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.nixflex.com/v1/calls/batch/{campaign_id}/launch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://api.nixflex.com/v1/calls/batch/{campaign_id}/launch"
req, _ := http.NewRequest("POST", url, nil)
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.nixflex.com/v1/calls/batch/{campaign_id}/launch")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixflex.com/v1/calls/batch/{campaign_id}/launch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyCalls
Launch batch campaign
POST /v1/calls/batch/:id/launch
POST
/
v1
/
calls
/
batch
/
{campaign_id}
/
launch
Launch batch campaign
curl --request POST \
--url https://api.nixflex.com/v1/calls/batch/{campaign_id}/launchimport requests
url = "https://api.nixflex.com/v1/calls/batch/{campaign_id}/launch"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.nixflex.com/v1/calls/batch/{campaign_id}/launch', 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.nixflex.com/v1/calls/batch/{campaign_id}/launch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://api.nixflex.com/v1/calls/batch/{campaign_id}/launch"
req, _ := http.NewRequest("POST", url, nil)
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.nixflex.com/v1/calls/batch/{campaign_id}/launch")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nixflex.com/v1/calls/batch/{campaign_id}/launch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyLaunches a scheduled or paused campaign immediately. Use this when you created a campaign with
No request body required.
The campaign moves from
schedule_type: schedule and want to override and start now.
Request
curl -X POST https://api.nixflex.com/v1/calls/batch/camp_a1b2c3d4/launch \
-H "Authorization: Bearer KEY_ID:KEY_SECRET"
Response
200 OK:
{
"campaign_id": "camp_a1b2c3d4",
"status": "running",
"recipients_count": 100,
"queued_count": 100
}
scheduled → running. Calls start dialling immediately.
Behaviour
- Already running: no-op, returns current status
- Already completed: 400 with
campaign_already_completed - Scheduled in the future: launches immediately, ignores the scheduled time
Errors
| Code | Cause |
|---|---|
campaign_not_found | ID doesn’t exist or isn’t yours |
campaign_already_completed | Campaign finished already |
campaign_no_recipients | Empty recipient list |
⌘I