Pause Campaign
curl --request POST \
--url https://api.example.com/v1/campaigns/{id}/pauseimport requests
url = "https://api.example.com/v1/campaigns/{id}/pause"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/campaigns/{id}/pause', 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/v1/campaigns/{id}/pause",
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.example.com/v1/campaigns/{id}/pause"
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.example.com/v1/campaigns/{id}/pause")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/campaigns/{id}/pause")
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_body{
"data": {
"campaign": {
"id": "<string>",
"status": "<string>",
"paused_at": "<string>"
}
}
}Campaigns
Pause Campaign
Pause an active campaign; in-flight sends complete but no new sends are scheduled
POST
/
v1
/
campaigns
/
{id}
/
pause
Pause Campaign
curl --request POST \
--url https://api.example.com/v1/campaigns/{id}/pauseimport requests
url = "https://api.example.com/v1/campaigns/{id}/pause"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/campaigns/{id}/pause', 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/v1/campaigns/{id}/pause",
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.example.com/v1/campaigns/{id}/pause"
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.example.com/v1/campaigns/{id}/pause")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/campaigns/{id}/pause")
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_body{
"data": {
"campaign": {
"id": "<string>",
"status": "<string>",
"paused_at": "<string>"
}
}
}Request
Path Parameters
string
required
The campaign’s unique ID (UUID)
Headers
Authorization: Bearer wbk_your_api_key_here
Requires an API key with the
campaigns:write permission. The campaign must currently be in active status. Fires the campaign.paused webhook event.Response
object
curl -X POST https://data.leadlex.com/functions/v1/api-gateway/v1/campaigns/cmp_abc123/pause \
-H "Authorization: Bearer wbk_your_api_key_here"
import requests
API_KEY = "wbk_your_api_key_here"
BASE_URL = "https://data.leadlex.com/functions/v1/api-gateway"
CAMPAIGN_ID = "cmp_abc123"
response = requests.post(
f"{BASE_URL}/v1/campaigns/{CAMPAIGN_ID}/pause",
headers={"Authorization": f"Bearer {API_KEY}"},
)
const CAMPAIGN_ID = 'cmp_abc123';
await fetch(
`https://data.leadlex.com/functions/v1/api-gateway/v1/campaigns/${CAMPAIGN_ID}/pause`,
{
method: 'POST',
headers: { 'Authorization': 'Bearer wbk_your_api_key_here' },
}
);
Example Response
{
"data": {
"campaign": {
"id": "cmp_abc123",
"status": "paused",
"paused_at": "2026-04-17T14:30:00Z"
}
}
}
To resume a paused campaign, call
POST /v1/campaigns/{id}/start.Errors
| Status | Code | Description |
|---|---|---|
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing campaigns:write permission |
| 404 | campaign_not_found | No campaign with this ID |
| 409 | campaign_not_active | Campaign is not in active status |
| 429 | rate_limited | Rate limit exceeded |