cURL
curl -X POST "https://api.alex.com/v2/templates" \
-H "X-API-Key: $ALEX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Software engineer screen",
"estimated_duration_seconds": 1500,
"questions": [
{
"content": "Tell me about a system you designed."
}
],
"criteria": [
{
"name": "System design",
"evaluation_instructions": "Look for clear trade-offs.",
"priority": "High"
}
]
}'import requests
url = "https://api.alex.com/v2/templates"
payload = {
"name": "Software engineer screen",
"estimated_duration_seconds": 1500,
"questions": [{ "content": "Tell me about a system you designed." }],
"criteria": [
{
"name": "System design",
"evaluation_instructions": "Look for clear trade-offs.",
"priority": "High"
}
]
}
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({
name: 'Software engineer screen',
estimated_duration_seconds: 1500,
questions: [{content: 'Tell me about a system you designed.'}],
criteria: [
{
name: 'System design',
evaluation_instructions: 'Look for clear trade-offs.',
priority: 'High'
}
]
})
};
fetch('https://api.alex.com/v2/templates', 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/templates",
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([
'name' => 'Software engineer screen',
'estimated_duration_seconds' => 1500,
'questions' => [
[
'content' => 'Tell me about a system you designed.'
]
],
'criteria' => [
[
'name' => 'System design',
'evaluation_instructions' => 'Look for clear trade-offs.',
'priority' => 'High'
]
]
]),
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/templates"
payload := strings.NewReader("{\n \"name\": \"Software engineer screen\",\n \"estimated_duration_seconds\": 1500,\n \"questions\": [\n {\n \"content\": \"Tell me about a system you designed.\"\n }\n ],\n \"criteria\": [\n {\n \"name\": \"System design\",\n \"evaluation_instructions\": \"Look for clear trade-offs.\",\n \"priority\": \"High\"\n }\n ]\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/v2/templates")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Software engineer screen\",\n \"estimated_duration_seconds\": 1500,\n \"questions\": [\n {\n \"content\": \"Tell me about a system you designed.\"\n }\n ],\n \"criteria\": [\n {\n \"name\": \"System design\",\n \"evaluation_instructions\": \"Look for clear trade-offs.\",\n \"priority\": \"High\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alex.com/v2/templates")
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 \"name\": \"Software engineer screen\",\n \"estimated_duration_seconds\": 1500,\n \"questions\": [\n {\n \"content\": \"Tell me about a system you designed.\"\n }\n ],\n \"criteria\": [\n {\n \"name\": \"System design\",\n \"evaluation_instructions\": \"Look for clear trade-offs.\",\n \"priority\": \"High\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "template",
"id": "clx8f2k1p0000abcd1234efgh",
"name": "Software engineer screen",
"estimated_duration_seconds": 1500,
"created_at": "2026-11-28T09:30:00.000Z",
"updated_at": "2026-11-30T14:05:12.000Z"
}Templates
Create a template
Creates an interview guide template.
POST
/
templates
cURL
curl -X POST "https://api.alex.com/v2/templates" \
-H "X-API-Key: $ALEX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Software engineer screen",
"estimated_duration_seconds": 1500,
"questions": [
{
"content": "Tell me about a system you designed."
}
],
"criteria": [
{
"name": "System design",
"evaluation_instructions": "Look for clear trade-offs.",
"priority": "High"
}
]
}'import requests
url = "https://api.alex.com/v2/templates"
payload = {
"name": "Software engineer screen",
"estimated_duration_seconds": 1500,
"questions": [{ "content": "Tell me about a system you designed." }],
"criteria": [
{
"name": "System design",
"evaluation_instructions": "Look for clear trade-offs.",
"priority": "High"
}
]
}
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({
name: 'Software engineer screen',
estimated_duration_seconds: 1500,
questions: [{content: 'Tell me about a system you designed.'}],
criteria: [
{
name: 'System design',
evaluation_instructions: 'Look for clear trade-offs.',
priority: 'High'
}
]
})
};
fetch('https://api.alex.com/v2/templates', 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/templates",
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([
'name' => 'Software engineer screen',
'estimated_duration_seconds' => 1500,
'questions' => [
[
'content' => 'Tell me about a system you designed.'
]
],
'criteria' => [
[
'name' => 'System design',
'evaluation_instructions' => 'Look for clear trade-offs.',
'priority' => 'High'
]
]
]),
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/templates"
payload := strings.NewReader("{\n \"name\": \"Software engineer screen\",\n \"estimated_duration_seconds\": 1500,\n \"questions\": [\n {\n \"content\": \"Tell me about a system you designed.\"\n }\n ],\n \"criteria\": [\n {\n \"name\": \"System design\",\n \"evaluation_instructions\": \"Look for clear trade-offs.\",\n \"priority\": \"High\"\n }\n ]\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/v2/templates")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Software engineer screen\",\n \"estimated_duration_seconds\": 1500,\n \"questions\": [\n {\n \"content\": \"Tell me about a system you designed.\"\n }\n ],\n \"criteria\": [\n {\n \"name\": \"System design\",\n \"evaluation_instructions\": \"Look for clear trade-offs.\",\n \"priority\": \"High\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alex.com/v2/templates")
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 \"name\": \"Software engineer screen\",\n \"estimated_duration_seconds\": 1500,\n \"questions\": [\n {\n \"content\": \"Tell me about a system you designed.\"\n }\n ],\n \"criteria\": [\n {\n \"name\": \"System design\",\n \"evaluation_instructions\": \"Look for clear trade-offs.\",\n \"priority\": \"High\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"object": "template",
"id": "clx8f2k1p0000abcd1234efgh",
"name": "Software engineer screen",
"estimated_duration_seconds": 1500,
"created_at": "2026-11-28T09:30:00.000Z",
"updated_at": "2026-11-30T14:05:12.000Z"
}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 created template.