cURL
curl --request POST \
--url https://api.nekt.ai/api/v1/destinations/bulk-delete/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"destinations": []
}
'import requests
url = "https://api.nekt.ai/api/v1/destinations/bulk-delete/"
payload = { "destinations": [] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({destinations: []})
};
fetch('https://api.nekt.ai/api/v1/destinations/bulk-delete/', 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.nekt.ai/api/v1/destinations/bulk-delete/",
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([
'destinations' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.nekt.ai/api/v1/destinations/bulk-delete/"
payload := strings.NewReader("{\n \"destinations\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.nekt.ai/api/v1/destinations/bulk-delete/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"destinations\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nekt.ai/api/v1/destinations/bulk-delete/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destinations\": []\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}Destinations
Bulk Delete Destinations
Delete several destinations at once with a single request.
POST
/
api
/
v1
/
destinations
/
bulk-delete
/
cURL
curl --request POST \
--url https://api.nekt.ai/api/v1/destinations/bulk-delete/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"destinations": []
}
'import requests
url = "https://api.nekt.ai/api/v1/destinations/bulk-delete/"
payload = { "destinations": [] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({destinations: []})
};
fetch('https://api.nekt.ai/api/v1/destinations/bulk-delete/', 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.nekt.ai/api/v1/destinations/bulk-delete/",
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([
'destinations' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.nekt.ai/api/v1/destinations/bulk-delete/"
payload := strings.NewReader("{\n \"destinations\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.nekt.ai/api/v1/destinations/bulk-delete/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"destinations\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nekt.ai/api/v1/destinations/bulk-delete/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destinations\": []\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}Deletes several destinations in one call. The request body takes a list of pipeline slugs, not destination IDs.
This endpoint uses
POST rather than DELETE because OpenAPI does not document a request body on DELETE. It deletes — it does not create anything.Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
destinations | array of strings | Yes | Slugs of the destinations to delete. |
Response
Returns200 OK with a summary of what the action did, rather than the deleted objects.
{
"message": "Successfully deleted 2 destinations"
}
The operation is all-or-nothing: nothing is deleted unless every listed destination passes the same checks a single Delete Destination call would apply. There is no undelete endpoint, so deletion cannot be reversed through the Platform API.
Example
curl --request POST \
--url https://api.nekt.ai/api/v1/destinations/bulk-delete/ \
--header "x-api-key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"destinations": ["google-sheets-weekly-report", "hubspot-contacts-sync"]
}'
Python example: delete every destination carrying a given tag
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.nekt.ai"
headers = {
"x-api-key": API_KEY,
"Content-Type": "application/json",
}
destinations = requests.get(
f"{BASE_URL}/api/v1/destinations/",
headers=headers,
params={"expand[]": "tags"},
).json()
legacy_slugs = [
d["slug"]
for d in destinations["results"]
if any(tag["name"] == "legacy" for tag in d.get("tags", []))
]
response = requests.post(
f"{BASE_URL}/api/v1/destinations/bulk-delete/",
headers=headers,
json={"destinations": legacy_slugs},
)
print(response.json()["message"])
Authentication
This endpoint requires an API key in thex-api-key header. MCP tokens cannot delete resources and are rejected with 403 Forbidden.
Related
- Delete Destination — remove a single destination.
- List Destinations — collect the slugs to send.
Authorizations
API Key authentication. Format: 'x-api-key: api_key'
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Slugs of the destinations to act on.
Response
200 - application/json
The summary a bulk action returns instead of the affected objects.
Human-readable summary of what the bulk action did.
Was this page helpful?