curl -X DELETE "https://api.alex.com/v2/jobs/8b1f0c52-3e4a-4d8e-9a77-2f6c1d0b9e31" \
-H "X-API-Key: $ALEX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"
# Permanently delete the job with its interviews and transcripts. This cannot be undone.
curl -X DELETE "https://api.alex.com/v2/jobs/8b1f0c52-3e4a-4d8e-9a77-2f6c1d0b9e31?permanent=true" \
-H "X-API-Key: $ALEX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"import requests
url = "https://api.alex.com/v2/jobs/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.alex.com/v2/jobs/{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.alex.com/v2/jobs/{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-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"
"net/http"
"io"
)
func main() {
url := "https://api.alex.com/v2/jobs/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-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.alex.com/v2/jobs/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alex.com/v2/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyDelete a job
Soft-deletes a job, as the dashboard does: it stops being served by the API and emits job.deleted, and its interviews and history are kept. A job still being generated is cancelled instead: generation stops before creating it, or deletes it if it already has. A job whose generation failed is cancelled too, so it stops being reported. An id with nothing to delete, including a job already deleted, returns 404: to retry a delete safely, send an Idempotency-Key.
With permanent=true the job is permanently deleted, and this cannot be undone: the job is removed with its applications, its interviews and their transcripts, as the earlier POST /ams/deleteJob did. Candidates stay, with their applications to other jobs. It emits job.deleted unless the job was already deleted, and nothing for the applications and interviews it removes: v2 has no event for those, so treat a job.deleted you receive after a permanent delete as meaning they are gone too. Fetching one returns 404. It also removes a job you deleted earlier without permanent, so you can purge its data. A job still being generated is cancelled as without permanent, and whatever generation has already written of it is permanently deleted. A job it finishes writing after the cancel is soft-deleted, holding no applications or interviews.
curl -X DELETE "https://api.alex.com/v2/jobs/8b1f0c52-3e4a-4d8e-9a77-2f6c1d0b9e31" \
-H "X-API-Key: $ALEX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"
# Permanently delete the job with its interviews and transcripts. This cannot be undone.
curl -X DELETE "https://api.alex.com/v2/jobs/8b1f0c52-3e4a-4d8e-9a77-2f6c1d0b9e31?permanent=true" \
-H "X-API-Key: $ALEX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"import requests
url = "https://api.alex.com/v2/jobs/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.alex.com/v2/jobs/{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.alex.com/v2/jobs/{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-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"
"net/http"
"io"
)
func main() {
url := "https://api.alex.com/v2/jobs/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-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.alex.com/v2/jobs/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alex.com/v2/jobs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyAuthorizations
Headers
A unique value, 1 to 255 characters, that makes the request safe to retry. See Idempotency.
1 - 255Query Parameters
Response
Deleted.