Skip to main content
POST
/
api
/
v1
/
account
/
search-lookalikes-bulk
/
{job_id}
/
cancel
Cancel job
curl -sS -X POST "https://api.openfunnel.dev/api/v1/account/search-lookalikes-bulk/JOB_ID/cancel" \
  -H "X-API-Key: YOUR_API_KEY"
import requests

url = "https://api.openfunnel.dev/api/v1/account/search-lookalikes-bulk/{job_id}/cancel"

headers = {"X-API-Key": "<x-api-key>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {'X-API-Key': '<x-api-key>'}};

fetch('https://api.openfunnel.dev/api/v1/account/search-lookalikes-bulk/{job_id}/cancel', 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.openfunnel.dev/api/v1/account/search-lookalikes-bulk/{job_id}/cancel",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "X-API-Key: <x-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.openfunnel.dev/api/v1/account/search-lookalikes-bulk/{job_id}/cancel"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("X-API-Key", "<x-api-key>")

	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.openfunnel.dev/api/v1/account/search-lookalikes-bulk/{job_id}/cancel")
  .header("X-API-Key", "<x-api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.openfunnel.dev/api/v1/account/search-lookalikes-bulk/{job_id}/cancel")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'

response = http.request(request)
puts response.read_body
{
  "job_id": "d8a1bddb-44f1-4c7f-87a7-f37496354ff6",
  "status": "cancelling",
  "message": "Cancellation requested. Poll GET /api/v1/account/search-lookalikes-bulk/d8a1bddb-44f1-4c7f-87a7-f37496354ff6 for the final status and the companies processed before cancellation."
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Headers

X-API-Key
string
required

Path Parameters

job_id
string
required

The job_id returned by the bulk submit endpoint.

Response

Cancellation accepted; the job is now cancelling.

Acknowledgement returned by the bulk-lookalike cancel endpoint. Cancellation is asynchronous - poll the GET endpoint for the final cancelled state and the companies processed before the cancel.

job_id
string
required
message
string
required

Next step: where to fetch the companies processed before the cancel.

status
string
default:cancelling

Always cancelling - the cancel request was accepted.