Create Session
curl --request POST \
--url https://api.techinterviewer.ai/create_session \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"interview_config_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"worker_id": "<string>",
"shift_id": "<string>"
}
'import requests
url = "https://api.techinterviewer.ai/create_session"
payload = {
"interview_config_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"worker_id": "<string>",
"shift_id": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
interview_config_id: '<string>',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone_number: '<string>',
worker_id: '<string>',
shift_id: '<string>'
})
};
fetch('https://api.techinterviewer.ai/create_session', 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.techinterviewer.ai/create_session",
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([
'interview_config_id' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'phone_number' => '<string>',
'worker_id' => '<string>',
'shift_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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.techinterviewer.ai/create_session"
payload := strings.NewReader("{\n \"interview_config_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"worker_id\": \"<string>\",\n \"shift_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.techinterviewer.ai/create_session")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"interview_config_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"worker_id\": \"<string>\",\n \"shift_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.techinterviewer.ai/create_session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"interview_config_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"worker_id\": \"<string>\",\n \"shift_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"unique_session_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Create Session
Create a new interview session.
This endpoint allows authenticated users to create a new interview session. It requires an interview_config_id in the request body. It returns a response containing the unique session ID.
phone_number is optional, but if provided, provide it in E.164 format (e.g. +12025550194)
You can construct a Session URL with the unique_session_id like so:
- Web: https://beta.techinterviewer.ai/?session={unique_session_id}
- Phone: https://beta.techinterviewer.ai/phone?session={unique_session_id} (only use if phone number is provided in the request body)
Raises 400 Bad Request if the interview_config_id is not provided. Raises 404 Not Found if the interview config does not exist.
POST
/
create_session
Create Session
curl --request POST \
--url https://api.techinterviewer.ai/create_session \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"interview_config_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"worker_id": "<string>",
"shift_id": "<string>"
}
'import requests
url = "https://api.techinterviewer.ai/create_session"
payload = {
"interview_config_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone_number": "<string>",
"worker_id": "<string>",
"shift_id": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
interview_config_id: '<string>',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone_number: '<string>',
worker_id: '<string>',
shift_id: '<string>'
})
};
fetch('https://api.techinterviewer.ai/create_session', 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.techinterviewer.ai/create_session",
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([
'interview_config_id' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'phone_number' => '<string>',
'worker_id' => '<string>',
'shift_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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.techinterviewer.ai/create_session"
payload := strings.NewReader("{\n \"interview_config_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"worker_id\": \"<string>\",\n \"shift_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.techinterviewer.ai/create_session")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"interview_config_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"worker_id\": \"<string>\",\n \"shift_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.techinterviewer.ai/create_session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"interview_config_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"worker_id\": \"<string>\",\n \"shift_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"unique_session_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Response
Successful Response
⌘I