Cancel Export
curl --request DELETE \
--url https://api.revenuebase.ai/v2/contact/exports/{export_id} \
--header 'X-Key: <api-key>'import requests
url = "https://api.revenuebase.ai/v2/contact/exports/{export_id}"
headers = {"X-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Key': '<api-key>'}};
fetch('https://api.revenuebase.ai/v2/contact/exports/{export_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.revenuebase.ai/v2/contact/exports/{export_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 => [
"X-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"
"net/http"
"io"
)
func main() {
url := "https://api.revenuebase.ai/v2/contact/exports/{export_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Key", "<api-key>")
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.revenuebase.ai/v2/contact/exports/{export_id}")
.header("X-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/contact/exports/{export_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Contact Endpoints
Cancel Export
Ask an unfinished contact export to stop.
DELETE
/
exports
/
{export_id}
Cancel Export
curl --request DELETE \
--url https://api.revenuebase.ai/v2/contact/exports/{export_id} \
--header 'X-Key: <api-key>'import requests
url = "https://api.revenuebase.ai/v2/contact/exports/{export_id}"
headers = {"X-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Key': '<api-key>'}};
fetch('https://api.revenuebase.ai/v2/contact/exports/{export_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.revenuebase.ai/v2/contact/exports/{export_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 => [
"X-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"
"net/http"
"io"
)
func main() {
url := "https://api.revenuebase.ai/v2/contact/exports/{export_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Key", "<api-key>")
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.revenuebase.ai/v2/contact/exports/{export_id}")
.header("X-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revenuebase.ai/v2/contact/exports/{export_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Credits and plans
PAYG is Pay-as-you-go. AYCE is All-you-can-eat.| Usage | PAYG | AYCE |
|---|---|---|
| Cancellation request | Free 0 credits | Free 0 credits |
When to use this endpoint
Stop a contact export that is queued or writing rows. Cancellation adds no charge. An unfinished failed or cancelled export releases its held credits when it ends.Example
SetREVENUEBASE_EXPORT_ID to the exportId returned by Start Export. Use a job created by this API key’s account.
Set REVENUEBASE_API_KEY to your API key.
curl --request DELETE "https://api.revenuebase.ai/v2/contact/exports/$REVENUEBASE_EXPORT_ID" \
--header "X-Key: $REVENUEBASE_API_KEY"
Read the status
| Status | What to do |
|---|---|
QUEUED | Waiting to run; keep polling. |
PROCESSING | Writing the file; keep polling. |
FINALIZING | Finishing the retrieval; keep polling. |
CANCELLING | A stop was requested; keep polling. |
COMPLETED | Download the file. |
ERROR | Read error and code; stop polling. |
CANCELLED | The export stopped; stop polling. |
Confirm the cancellation
A queued or running export moves to CANCELLING, then ends. The request does not guarantee an immediate stop. Re-read Export Status until a terminal state. Cancellation is idempotent. A finished export returns its existing terminal status. Cancelling a completed export does not refund its charge.Errors and retries
An unknown export or one you do not own returns 404. Confirm the ID from the start response. Poll every 5 to 10 seconds and slow down for longer jobs. Contact and company routes share the default 10 requests per second per user. Wait for the reset time or Retry-After when rate limited; coordinate requests across your workers and API keys. Keep polling through FINALIZING. Stop on COMPLETED, ERROR, or CANCELLED. Read error and code before correcting a failed request. Repeating the original start POST creates another job and can charge again.Next steps
Check export status until it ends.Was this page helpful?
