curl --request POST \
--url https://api.alex.com/v1/api/inviteCandidate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"firstName": "Jane",
"lastName": "Doe",
"email": "[email protected]",
"mobile": "+14155551234",
"jobExternalId": "REQ-12345",
"interviewerId": "acme-REQ-12345",
"candidateExternalId": "CAND-98765"
}
'import requests
url = "https://api.alex.com/v1/api/inviteCandidate"
payload = {
"firstName": "Jane",
"lastName": "Doe",
"email": "[email protected]",
"mobile": "+14155551234",
"jobExternalId": "REQ-12345",
"interviewerId": "acme-REQ-12345",
"candidateExternalId": "CAND-98765"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'Jane',
lastName: 'Doe',
email: '[email protected]',
mobile: '+14155551234',
jobExternalId: 'REQ-12345',
interviewerId: 'acme-REQ-12345',
candidateExternalId: 'CAND-98765'
})
};
fetch('https://api.alex.com/v1/api/inviteCandidate', 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/v1/api/inviteCandidate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'Jane',
'lastName' => 'Doe',
'email' => '[email protected]',
'mobile' => '+14155551234',
'jobExternalId' => 'REQ-12345',
'interviewerId' => 'acme-REQ-12345',
'candidateExternalId' => 'CAND-98765'
]),
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/v1/api/inviteCandidate"
payload := strings.NewReader("{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"[email protected]\",\n \"mobile\": \"+14155551234\",\n \"jobExternalId\": \"REQ-12345\",\n \"interviewerId\": \"acme-REQ-12345\",\n \"candidateExternalId\": \"CAND-98765\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.alex.com/v1/api/inviteCandidate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"[email protected]\",\n \"mobile\": \"+14155551234\",\n \"jobExternalId\": \"REQ-12345\",\n \"interviewerId\": \"acme-REQ-12345\",\n \"candidateExternalId\": \"CAND-98765\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alex.com/v1/api/inviteCandidate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"[email protected]\",\n \"mobile\": \"+14155551234\",\n \"jobExternalId\": \"REQ-12345\",\n \"interviewerId\": \"acme-REQ-12345\",\n \"candidateExternalId\": \"CAND-98765\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Candidate invited",
"payload": "app_abc123"
}{
"success": false,
"message": "Missing required fields",
"code": "CANDIDATE_NOT_FOUND"
}{
"success": false,
"message": "Missing required fields",
"code": "CANDIDATE_NOT_FOUND"
}{
"success": false,
"message": "Missing required fields",
"code": "CANDIDATE_NOT_FOUND"
}{
"success": false,
"message": "Missing required fields",
"code": "CANDIDATE_NOT_FOUND"
}Invite Candidate
Invites a candidate to the specified job. The candidate is created if they don’t already exist for your company (matched on candidateExternalId if provided, otherwise on email/mobile), attached to the job, and the job’s Workflows V8 invitation flow is triggered. The target job must have a Workflows V8 configuration; calls against legacy V1 jobs return 400. Provide either jobExternalId (the ATS-side identifier you supplied when creating the job) or interviewerId (the Alex-side identifier returned from /createJob and /interviewers) — exactly one. At least one of email or mobile is required as the candidate contact.
curl --request POST \
--url https://api.alex.com/v1/api/inviteCandidate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"firstName": "Jane",
"lastName": "Doe",
"email": "[email protected]",
"mobile": "+14155551234",
"jobExternalId": "REQ-12345",
"interviewerId": "acme-REQ-12345",
"candidateExternalId": "CAND-98765"
}
'import requests
url = "https://api.alex.com/v1/api/inviteCandidate"
payload = {
"firstName": "Jane",
"lastName": "Doe",
"email": "[email protected]",
"mobile": "+14155551234",
"jobExternalId": "REQ-12345",
"interviewerId": "acme-REQ-12345",
"candidateExternalId": "CAND-98765"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'Jane',
lastName: 'Doe',
email: '[email protected]',
mobile: '+14155551234',
jobExternalId: 'REQ-12345',
interviewerId: 'acme-REQ-12345',
candidateExternalId: 'CAND-98765'
})
};
fetch('https://api.alex.com/v1/api/inviteCandidate', 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/v1/api/inviteCandidate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'Jane',
'lastName' => 'Doe',
'email' => '[email protected]',
'mobile' => '+14155551234',
'jobExternalId' => 'REQ-12345',
'interviewerId' => 'acme-REQ-12345',
'candidateExternalId' => 'CAND-98765'
]),
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/v1/api/inviteCandidate"
payload := strings.NewReader("{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"[email protected]\",\n \"mobile\": \"+14155551234\",\n \"jobExternalId\": \"REQ-12345\",\n \"interviewerId\": \"acme-REQ-12345\",\n \"candidateExternalId\": \"CAND-98765\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.alex.com/v1/api/inviteCandidate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"[email protected]\",\n \"mobile\": \"+14155551234\",\n \"jobExternalId\": \"REQ-12345\",\n \"interviewerId\": \"acme-REQ-12345\",\n \"candidateExternalId\": \"CAND-98765\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alex.com/v1/api/inviteCandidate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"[email protected]\",\n \"mobile\": \"+14155551234\",\n \"jobExternalId\": \"REQ-12345\",\n \"interviewerId\": \"acme-REQ-12345\",\n \"candidateExternalId\": \"CAND-98765\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Candidate invited",
"payload": "app_abc123"
}{
"success": false,
"message": "Missing required fields",
"code": "CANDIDATE_NOT_FOUND"
}{
"success": false,
"message": "Missing required fields",
"code": "CANDIDATE_NOT_FOUND"
}{
"success": false,
"message": "Missing required fields",
"code": "CANDIDATE_NOT_FOUND"
}{
"success": false,
"message": "Missing required fields",
"code": "CANDIDATE_NOT_FOUND"
}Authorizations
Body
Exactly one of jobExternalId or interviewerId must be provided. At least one of email or mobile is required.
Candidate's first name
"Jane"
Candidate's last name
"Doe"
Candidate's email address. At least one of email or mobile is required.
Candidate's mobile phone number in E.164 format. At least one of email or mobile is required.
"+14155551234"
ATS-side job identifier you supplied when creating the job (matches the externalJobId from /createJob). Provide either this or interviewerId, not both.
"REQ-12345"
Alex-side job identifier returned from /createJob (payload) or /interviewers. Provide either this or jobExternalId, not both.
"acme-REQ-12345"
Optional ATS-side candidate identifier. When provided, repeated calls for the same external id will return the existing candidate instead of creating a duplicate.
"CAND-98765"