Bulk delete accounts, contacts, or opportunities
Deletes up to 500 existing objects. Accounts can be selected by company_id or domain; account domains accept plain domains or URLs and are normalized before lookup, for example https://www.qualcomm.com becomes qualcomm.com. Contacts can be selected by people_id or email; opportunities by opportunity_id or exact name. Opportunity name matching is exact after trimming and case folding, and all active opportunities matching a supplied name are deleted.
DELETE
/
v1
/
{object_type}
/
bulk
Bulk delete accounts, contacts, or opportunities
curl --request DELETE \
--url https://api.octolane.com/v1/{object_type}/bulk \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"domain": "https://www.acme.com"
},
{
"company_id": "018f13b3-8239-7ef8-a8f1-93ad10b76110"
}
]
'import requests
url = "https://api.octolane.com/v1/{object_type}/bulk"
payload = [{ "domain": "https://www.acme.com" }, { "company_id": "018f13b3-8239-7ef8-a8f1-93ad10b76110" }]
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{domain: 'https://www.acme.com'},
{company_id: '018f13b3-8239-7ef8-a8f1-93ad10b76110'}
])
};
fetch('https://api.octolane.com/v1/{object_type}/bulk', 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.octolane.com/v1/{object_type}/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
[
'domain' => 'https://www.acme.com'
],
[
'company_id' => '018f13b3-8239-7ef8-a8f1-93ad10b76110'
]
]),
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.octolane.com/v1/{object_type}/bulk"
payload := strings.NewReader("[\n {\n \"domain\": \"https://www.acme.com\"\n },\n {\n \"company_id\": \"018f13b3-8239-7ef8-a8f1-93ad10b76110\"\n }\n]")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.octolane.com/v1/{object_type}/bulk")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"domain\": \"https://www.acme.com\"\n },\n {\n \"company_id\": \"018f13b3-8239-7ef8-a8f1-93ad10b76110\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.octolane.com/v1/{object_type}/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"domain\": \"https://www.acme.com\"\n },\n {\n \"company_id\": \"018f13b3-8239-7ef8-a8f1-93ad10b76110\"\n }\n]"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": "<unknown>"
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}Authorizations
Personal API key. Requests act as the workspace member who created the key, with that member's current access, and stop working when the key is disabled or its creator leaves the workspace.
Path Parameters
Object collection to delete.
Available options:
accounts, contacts, opportunities Body
application/json
Array of delete selectors. Maximum 500 items.
Required array length:
1 - 500 elementsExamples:
[
{ "domain": "https://www.acme.com" },
{
"company_id": "018f13b3-8239-7ef8-a8f1-93ad10b76110"
}
]
[
{ "email": "buyer@acme.com" },
{
"people_id": "018f13b3-8239-7ef8-a8f1-93ad10b76111"
}
]
[
{ "name": "Acme renewal" },
{
"opportunity_id": "018f13b3-8239-7ef8-a8f1-93ad10b76112"
}
]
Was this page helpful?
⌘I
Bulk delete accounts, contacts, or opportunities
curl --request DELETE \
--url https://api.octolane.com/v1/{object_type}/bulk \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"domain": "https://www.acme.com"
},
{
"company_id": "018f13b3-8239-7ef8-a8f1-93ad10b76110"
}
]
'import requests
url = "https://api.octolane.com/v1/{object_type}/bulk"
payload = [{ "domain": "https://www.acme.com" }, { "company_id": "018f13b3-8239-7ef8-a8f1-93ad10b76110" }]
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{domain: 'https://www.acme.com'},
{company_id: '018f13b3-8239-7ef8-a8f1-93ad10b76110'}
])
};
fetch('https://api.octolane.com/v1/{object_type}/bulk', 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.octolane.com/v1/{object_type}/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
[
'domain' => 'https://www.acme.com'
],
[
'company_id' => '018f13b3-8239-7ef8-a8f1-93ad10b76110'
]
]),
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.octolane.com/v1/{object_type}/bulk"
payload := strings.NewReader("[\n {\n \"domain\": \"https://www.acme.com\"\n },\n {\n \"company_id\": \"018f13b3-8239-7ef8-a8f1-93ad10b76110\"\n }\n]")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.octolane.com/v1/{object_type}/bulk")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"domain\": \"https://www.acme.com\"\n },\n {\n \"company_id\": \"018f13b3-8239-7ef8-a8f1-93ad10b76110\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.octolane.com/v1/{object_type}/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"domain\": \"https://www.acme.com\"\n },\n {\n \"company_id\": \"018f13b3-8239-7ef8-a8f1-93ad10b76110\"\n }\n]"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": "<unknown>"
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}{
"success": false,
"message": "Validation failed",
"statusCode": 400
}