Delete a Campaign
curl --request DELETE \
--url https://api.getmalakai.com/campaigns/outbound/{id} \
--header 'Authorization: <authorization>' \
--header 'x-access-token: <x-access-token>'import requests
url = "https://api.getmalakai.com/campaigns/outbound/{id}"
headers = {
"Authorization": "<authorization>",
"x-access-token": "<x-access-token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<authorization>', 'x-access-token': '<x-access-token>'}
};
fetch('https://api.getmalakai.com/campaigns/outbound/{id}', 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.getmalakai.com/campaigns/outbound/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-access-token: <x-access-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://api.getmalakai.com/campaigns/outbound/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("x-access-token", "<x-access-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.getmalakai.com/campaigns/outbound/{id}")
.header("Authorization", "<authorization>")
.header("x-access-token", "<x-access-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmalakai.com/campaigns/outbound/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
request["x-access-token"] = '<x-access-token>'
response = http.request(request)
puts response.read_body{
"responseCode": "2000",
"message": "Campaign deleted successfully."
}
Outbound
Delete a Campaign
Permanently delete a specific campaign by its ID.
DELETE
campaigns
/
outbound
/
{id}
Delete a Campaign
curl --request DELETE \
--url https://api.getmalakai.com/campaigns/outbound/{id} \
--header 'Authorization: <authorization>' \
--header 'x-access-token: <x-access-token>'import requests
url = "https://api.getmalakai.com/campaigns/outbound/{id}"
headers = {
"Authorization": "<authorization>",
"x-access-token": "<x-access-token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<authorization>', 'x-access-token': '<x-access-token>'}
};
fetch('https://api.getmalakai.com/campaigns/outbound/{id}', 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.getmalakai.com/campaigns/outbound/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-access-token: <x-access-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://api.getmalakai.com/campaigns/outbound/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("x-access-token", "<x-access-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.getmalakai.com/campaigns/outbound/{id}")
.header("Authorization", "<authorization>")
.header("x-access-token", "<x-access-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmalakai.com/campaigns/outbound/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
request["x-access-token"] = '<x-access-token>'
response = http.request(request)
puts response.read_body{
"responseCode": "2000",
"message": "Campaign deleted successfully."
}
Headers
string
required
Your API key for authentication. Prefix with
Bearer .string
required
Your access token for authentication.
Path Parameters
string
required
The unique identifier of the contact you want to delete.
Query Parameters
string
The state of the campaign e.g stopped
Response
A successful deletion will return a success status and message.string
Confirms the request was successful.
string
A message indicating the result of the deletion.
{
"responseCode": "2000",
"message": "Campaign deleted successfully."
}
⌘I