Stop Campaign
curl --request POST \
--url https://app.luly.ai/api/v1/campaigns/{campaign_id}/stop \
--header 'authorization: <authorization>'import requests
url = "https://app.luly.ai/api/v1/campaigns/{campaign_id}/stop"
headers = {"authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {authorization: '<authorization>'}};
fetch('https://app.luly.ai/api/v1/campaigns/{campaign_id}/stop', 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://app.luly.ai/api/v1/campaigns/{campaign_id}/stop",
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: <authorization>"
],
]);
$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://app.luly.ai/api/v1/campaigns/{campaign_id}/stop"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.luly.ai/api/v1/campaigns/{campaign_id}/stop")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.luly.ai/api/v1/campaigns/{campaign_id}/stop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Successfully stopped campaign",
"num_calls": 0,
"campaign_id": "0a810190-c000-aaaa-bbbb-16a4630cc190"
}
Campaigns
Stop Campaign
Stops a campaign and all associated calls.
POST
/
v1
/
campaigns
/
{campaign_id}
/
stop
Stop Campaign
curl --request POST \
--url https://app.luly.ai/api/v1/campaigns/{campaign_id}/stop \
--header 'authorization: <authorization>'import requests
url = "https://app.luly.ai/api/v1/campaigns/{campaign_id}/stop"
headers = {"authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {authorization: '<authorization>'}};
fetch('https://app.luly.ai/api/v1/campaigns/{campaign_id}/stop', 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://app.luly.ai/api/v1/campaigns/{campaign_id}/stop",
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: <authorization>"
],
]);
$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://app.luly.ai/api/v1/campaigns/{campaign_id}/stop"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.luly.ai/api/v1/campaigns/{campaign_id}/stop")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.luly.ai/api/v1/campaigns/{campaign_id}/stop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Successfully stopped campaign",
"num_calls": 0,
"campaign_id": "0a810190-c000-aaaa-bbbb-16a4630cc190"
}
Headers
Your API key for authentication.
Path Parameters
The unique identifier for the campaign to be stopped.
Response
Status of the request.
Confirms the request was successful, or provides an error message if the request failed.
Number of calls stopped in the campaign.
Confirms the ID of the campaign being stopped.
{
"status": "success",
"message": "Successfully stopped campaign",
"num_calls": 0,
"campaign_id": "0a810190-c000-aaaa-bbbb-16a4630cc190"
}
⌘I