cURL
curl -X PATCH "https://api.alex.com/v2/talent-match-candidates/48213" \
-H "X-API-Key: $ALEX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"do_not_contact": true
}'import requests
url = "https://api.alex.com/v2/talent-match-candidates/{external_candidate_id}"
payload = { "do_not_contact": True }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({do_not_contact: true})
};
fetch('https://api.alex.com/v2/talent-match-candidates/{external_candidate_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/talent-match-candidates/{external_candidate_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'do_not_contact' => true
]),
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.alex.com/v2/talent-match-candidates/{external_candidate_id}"
payload := strings.NewReader("{\n \"do_not_contact\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.alex.com/v2/talent-match-candidates/{external_candidate_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"do_not_contact\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alex.com/v2/talent-match-candidates/{external_candidate_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"do_not_contact\": true\n}"
response = http.request(request)
puts response.read_body{
"object": "talent_match_candidate",
"external_candidate_id": "48213",
"do_not_contact": true
}
Talent Match
Update a Talent Match candidate
Sets whether Talent Match may contact a candidate, by their ATS id. The status code always tells you what happened, and there is no option to answer 200 regardless: an opt-out that didn’t land must be retried, not reported as done. If you call this from a webhook sender that turns itself off after non-2xx responses, put a step in between that retries 503 and 500, and drops 404, which means Talent Match has no candidate with that ATS id.
PATCH
/
talent-match-candidates
/
{external_candidate_id}
cURL
curl -X PATCH "https://api.alex.com/v2/talent-match-candidates/48213" \
-H "X-API-Key: $ALEX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"do_not_contact": true
}'import requests
url = "https://api.alex.com/v2/talent-match-candidates/{external_candidate_id}"
payload = { "do_not_contact": True }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({do_not_contact: true})
};
fetch('https://api.alex.com/v2/talent-match-candidates/{external_candidate_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/talent-match-candidates/{external_candidate_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'do_not_contact' => true
]),
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.alex.com/v2/talent-match-candidates/{external_candidate_id}"
payload := strings.NewReader("{\n \"do_not_contact\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.alex.com/v2/talent-match-candidates/{external_candidate_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"do_not_contact\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alex.com/v2/talent-match-candidates/{external_candidate_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"do_not_contact\": true\n}"
response = http.request(request)
puts response.read_body{
"object": "talent_match_candidate",
"external_candidate_id": "48213",
"do_not_contact": true
}
Status codes
The status code always says what happened. There is no option to answer200 whatever the outcome: an opt-out that didn’t land has to be retried, not reported as done.
| Status | Meaning | What to do |
|---|---|---|
200 | Updated. | Nothing. |
404 | Talent Match has no candidate with this ATS id. | Nothing to update; don’t retry. |
503 | Talent Match isn’t taking changes right now. | Retry after Retry-After. |
500 | Something went wrong on our end. | Retry with backoff. |
2xx responses, put a step in between that retries 5xx responses and drops 404.Authorizations
apiKeyAuthbearerAuth
Headers
A unique value, 1 to 255 characters, that makes the request safe to retry. See Idempotency.
Required string length:
1 - 255Body
application/json
Response
The updated candidate.
Talent Match's copy of an ATS candidate, keyed by the ATS id. It exists whether or not Alex has a candidate record for them.