Interview
Interview Invite
POST
/
interview
/
invite
curl --request POST \
--url https://api.tidyhire.app/api/public/v1/interview/invite \
--header 'x-tidyhire-api-key: <token>' \
--header 'Content-Type: application/json' \
--data '{
"ats_job_id": "ats-job-12345",
"job_title": "Senior Software Engineer",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": ["JavaScript", "Node.js", "MongoDB"],
"skills_good_to_have": ["TypeScript", "Redis", "Docker"],
"candidates": [
{
"id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
]
}'
import requests
url = "https://api.tidyhire.app/api/public/v1/interview/invite"
headers = {
"x-tidyhire-api-key": "<token>",
"Content-Type": "application/json"
}
payload = {
"ats_job_id": "ats-job-12345",
"job_title": "Senior Software Engineer",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": ["JavaScript", "Node.js", "MongoDB"],
"skills_good_to_have": ["TypeScript", "Redis", "Docker"],
"candidates": [
{
"id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
]
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
fetch('https://api.tidyhire.app/api/public/v1/interview/invite', {
method: 'POST',
headers: {
'x-tidyhire-api-key': '<token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
ats_job_id: 'ats-job-12345',
job_title: 'Senior Software Engineer',
job_description:
'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB'],
skills_good_to_have: ['TypeScript', 'Redis', 'Docker'],
candidates: [
{
id: 'ats-candidate-001',
name: 'John Doe',
email: 'john.doe@example.com',
phone: '+1234567890',
},
],
}),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error('Error:', error));
<?php
$url = 'https://api.tidyhire.app/api/public/v1/interview/invite';
$data = [
'ats_job_id' => 'ats-job-12345',
'job_title' => 'Senior Software Engineer',
'job_description' => 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
'min_experience' => 3,
'max_experience' => 5,
'seniority_level' => 'Senior',
'work_type' => 'Remote',
'employment_type' => 'Full Time',
'location' => 'New York, NY',
'skills_required' => ['JavaScript', 'Node.js', 'MongoDB'],
'skills_good_to_have' => ['TypeScript', 'Redis', 'Docker'],
'candidates' => [
[
'id' => 'ats-candidate-001',
'name' => 'John Doe',
'email' => 'john.doe@example.com',
'phone' => '+1234567890'
]
]
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'x-tidyhire-api-key: <token>',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
url := "https://api.tidyhire.app/api/public/v1/interview/invite"
payload := map[string]interface{}{
"ats_job_id": "ats-job-12345",
"job_title": "Senior Software Engineer",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": []string{"JavaScript", "Node.js", "MongoDB"},
"skills_good_to_have": []string{"TypeScript", "Redis", "Docker"},
"candidates": []map[string]interface{}{
{
"id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
},
},
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("x-tidyhire-api-key", "<token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class InterviewInvite {
public static void main(String[] args) {
try {
URL url = new URL("https://api.tidyhire.app/api/public/v1/interview/invite");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("x-tidyhire-api-key", "<token>");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"ats_job_id\": \"ats-job-12345\",\n" +
" \"job_title\": \"Senior Software Engineer\",\n" +
" \"job_description\": \"We are looking for a Senior Software Engineer to join our team and build scalable backend services.\",\n" +
" \"min_experience\": 3,\n" +
" \"max_experience\": 5,\n" +
" \"seniority_level\": \"Senior\",\n" +
" \"work_type\": \"Remote\",\n" +
" \"employment_type\": \"Full Time\",\n" +
" \"location\": \"New York, NY\",\n" +
" \"skills_required\": [\"JavaScript\", \"Node.js\", \"MongoDB\"],\n" +
" \"skills_good_to_have\": [\"TypeScript\", \"Redis\", \"Docker\"],\n" +
" \"candidates\": [{\n" +
" \"id\": \"ats-candidate-001\",\n" +
" \"name\": \"John Doe\",\n" +
" \"email\": \"john.doe@example.com\",\n" +
" \"phone\": \"+1234567890\"\n" +
" }]\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.tidyhire.app/api/public/v1/interview/invite')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['x-tidyhire-api-key'] = '<token>'
request['Content-Type'] = 'application/json'
request.body = {
ats_job_id: 'ats-job-12345',
job_title: 'Senior Software Engineer',
job_description: 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB'],
skills_good_to_have: ['TypeScript', 'Redis', 'Docker'],
candidates: [
{
id: 'ats-candidate-001',
name: 'John Doe',
email: 'john.doe@example.com',
phone: '+1234567890'
}
]
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"project_id": "64a1b2c3d4e5f6a7b8c9d0e1",
"job_url": "https://jobs.tidyhire.app/company/acme/job/64a1b2c3d4e5f6a7b8c9d0e2",
"project_url": "https://platform.tidyhire.app/app/projects/64a1b2c3d4e5f6a7b8c9d0e1",
"interviews": [
{
"id": "64a1b2c3d4e5f6a7b8c9d0e3",
"candidate_id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"status": "success",
"message": "Interview invitation is being processed"
}
]
}
}
Use the same
ats_job_id across multiple requests to add more candidates to the same project.If the ATS job ID already exists, the job details provided in the request are updated on the existing job.curl --request POST \
--url https://api.tidyhire.app/api/public/v1/interview/invite \
--header 'x-tidyhire-api-key: <token>' \
--header 'Content-Type: application/json' \
--data '{
"ats_job_id": "ats-job-12345",
"job_title": "Senior Software Engineer",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": ["JavaScript", "Node.js", "MongoDB"],
"skills_good_to_have": ["TypeScript", "Redis", "Docker"],
"candidates": [
{
"id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
]
}'
import requests
url = "https://api.tidyhire.app/api/public/v1/interview/invite"
headers = {
"x-tidyhire-api-key": "<token>",
"Content-Type": "application/json"
}
payload = {
"ats_job_id": "ats-job-12345",
"job_title": "Senior Software Engineer",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": ["JavaScript", "Node.js", "MongoDB"],
"skills_good_to_have": ["TypeScript", "Redis", "Docker"],
"candidates": [
{
"id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
]
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
fetch('https://api.tidyhire.app/api/public/v1/interview/invite', {
method: 'POST',
headers: {
'x-tidyhire-api-key': '<token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
ats_job_id: 'ats-job-12345',
job_title: 'Senior Software Engineer',
job_description:
'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB'],
skills_good_to_have: ['TypeScript', 'Redis', 'Docker'],
candidates: [
{
id: 'ats-candidate-001',
name: 'John Doe',
email: 'john.doe@example.com',
phone: '+1234567890',
},
],
}),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error('Error:', error));
<?php
$url = 'https://api.tidyhire.app/api/public/v1/interview/invite';
$data = [
'ats_job_id' => 'ats-job-12345',
'job_title' => 'Senior Software Engineer',
'job_description' => 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
'min_experience' => 3,
'max_experience' => 5,
'seniority_level' => 'Senior',
'work_type' => 'Remote',
'employment_type' => 'Full Time',
'location' => 'New York, NY',
'skills_required' => ['JavaScript', 'Node.js', 'MongoDB'],
'skills_good_to_have' => ['TypeScript', 'Redis', 'Docker'],
'candidates' => [
[
'id' => 'ats-candidate-001',
'name' => 'John Doe',
'email' => 'john.doe@example.com',
'phone' => '+1234567890'
]
]
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'x-tidyhire-api-key: <token>',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
url := "https://api.tidyhire.app/api/public/v1/interview/invite"
payload := map[string]interface{}{
"ats_job_id": "ats-job-12345",
"job_title": "Senior Software Engineer",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": []string{"JavaScript", "Node.js", "MongoDB"},
"skills_good_to_have": []string{"TypeScript", "Redis", "Docker"},
"candidates": []map[string]interface{}{
{
"id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
},
},
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("x-tidyhire-api-key", "<token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class InterviewInvite {
public static void main(String[] args) {
try {
URL url = new URL("https://api.tidyhire.app/api/public/v1/interview/invite");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("x-tidyhire-api-key", "<token>");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"ats_job_id\": \"ats-job-12345\",\n" +
" \"job_title\": \"Senior Software Engineer\",\n" +
" \"job_description\": \"We are looking for a Senior Software Engineer to join our team and build scalable backend services.\",\n" +
" \"min_experience\": 3,\n" +
" \"max_experience\": 5,\n" +
" \"seniority_level\": \"Senior\",\n" +
" \"work_type\": \"Remote\",\n" +
" \"employment_type\": \"Full Time\",\n" +
" \"location\": \"New York, NY\",\n" +
" \"skills_required\": [\"JavaScript\", \"Node.js\", \"MongoDB\"],\n" +
" \"skills_good_to_have\": [\"TypeScript\", \"Redis\", \"Docker\"],\n" +
" \"candidates\": [{\n" +
" \"id\": \"ats-candidate-001\",\n" +
" \"name\": \"John Doe\",\n" +
" \"email\": \"john.doe@example.com\",\n" +
" \"phone\": \"+1234567890\"\n" +
" }]\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.tidyhire.app/api/public/v1/interview/invite')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['x-tidyhire-api-key'] = '<token>'
request['Content-Type'] = 'application/json'
request.body = {
ats_job_id: 'ats-job-12345',
job_title: 'Senior Software Engineer',
job_description: 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB'],
skills_good_to_have: ['TypeScript', 'Redis', 'Docker'],
candidates: [
{
id: 'ats-candidate-001',
name: 'John Doe',
email: 'john.doe@example.com',
phone: '+1234567890'
}
]
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"project_id": "64a1b2c3d4e5f6a7b8c9d0e1",
"job_url": "https://jobs.tidyhire.app/company/acme/job/64a1b2c3d4e5f6a7b8c9d0e2",
"project_url": "https://platform.tidyhire.app/app/projects/64a1b2c3d4e5f6a7b8c9d0e1",
"interviews": [
{
"id": "64a1b2c3d4e5f6a7b8c9d0e3",
"candidate_id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"status": "success",
"message": "Interview invitation is being processed"
}
]
}
}
Authorizations
Body
Interview invitation dataJob ID from your ATS that identifies the job these candidates belong to.Example:
"ats-job-12345"Job title for the role. Also used as the project name. Hyperlinks not allowed.Example:
"Senior Software Engineer"Candidates to invite. Max 200 per request.
Show child attributes
Show child attributes
Candidate ID from your system (e.g. ATS ID). Reuses an existing candidate if it matches.Example:
"ats-candidate-001"Candidate’s full name (letters, dots, spaces only). Minimum 3 characters. Auto-converted to Title Case.Example:
"John Doe"Key-value pairs stored on the candidate record. Values can be a string, number, or boolean. Max 50 keys. Read more about custom fields.
Job role and responsibilities. Hyperlinks not allowed.Example:
"We are looking for a Senior Software Engineer to join our team and build scalable backend services."Interview configuration.
Show child attributes
Show child attributes
Start of the candidate’s availability window (ISO 8601). Provide together with
interview_settings.available_until; ignored if only one of the two is set. Included in the invite email and attached as a calendar event.Example: "2026-11-05T09:00:00.000Z"Response
Interview invitations are being processedShow child attributes
Show child attributes
Per-candidate results.
Show child attributes
Show child attributes
Common Errors
- 200 (success: false)
- 400 Bad Request
- 401 Unauthorized
- 422 Validation Error
Reason: Every candidate failed processing — the request succeeded but no invitations were queued.
{
"success": false,
"data": {
"project_id": "64a1b2c3d4e5f6a7b8c9d0e1",
"job_url": "https://jobs.tidyhire.app/company/acme/job/64a1b2c3",
"project_url": "https://platform.tidyhire.app/app/projects/64a1b2c3",
"interviews": [
{
"candidate_id": "ats-cand-999",
"name": "Some Other Person",
"email": "john.doe@example.com",
"status": "failed",
"message": "A candidate with this email already exists with a different ID"
}
]
}
}
Reason: The request body is not valid JSON.
{
"success": false,
"message": "Invalid JSON in request body"
}
Reason: Missing or invalid
x-tidyhire-api-key header.{
"success": false,
"message": "Unauthorized, Please reach out at support@tidyhire.app"
}
Reason: Missing or invalid fields — each entry in
errors points to a specific field.{
"success": false,
"message": "Validation error: Max experience must be greater than min experience",
"errors": [
{ "path": "max_experience", "message": "Max experience must be greater than min experience" }
]
}
{
"success": false,
"message": "Validation error: Candidate's phone must be in E.164 format (e.g. +917873476062)",
"errors": [
{ "path": "candidates[0].phone", "message": "Candidate's phone must be in E.164 format (e.g. +917873476062)" }
]
}
Was this page helpful?
⌘I
curl --request POST \
--url https://api.tidyhire.app/api/public/v1/interview/invite \
--header 'x-tidyhire-api-key: <token>' \
--header 'Content-Type: application/json' \
--data '{
"ats_job_id": "ats-job-12345",
"job_title": "Senior Software Engineer",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": ["JavaScript", "Node.js", "MongoDB"],
"skills_good_to_have": ["TypeScript", "Redis", "Docker"],
"candidates": [
{
"id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
]
}'
import requests
url = "https://api.tidyhire.app/api/public/v1/interview/invite"
headers = {
"x-tidyhire-api-key": "<token>",
"Content-Type": "application/json"
}
payload = {
"ats_job_id": "ats-job-12345",
"job_title": "Senior Software Engineer",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": ["JavaScript", "Node.js", "MongoDB"],
"skills_good_to_have": ["TypeScript", "Redis", "Docker"],
"candidates": [
{
"id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890"
}
]
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
fetch('https://api.tidyhire.app/api/public/v1/interview/invite', {
method: 'POST',
headers: {
'x-tidyhire-api-key': '<token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
ats_job_id: 'ats-job-12345',
job_title: 'Senior Software Engineer',
job_description:
'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB'],
skills_good_to_have: ['TypeScript', 'Redis', 'Docker'],
candidates: [
{
id: 'ats-candidate-001',
name: 'John Doe',
email: 'john.doe@example.com',
phone: '+1234567890',
},
],
}),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error('Error:', error));
<?php
$url = 'https://api.tidyhire.app/api/public/v1/interview/invite';
$data = [
'ats_job_id' => 'ats-job-12345',
'job_title' => 'Senior Software Engineer',
'job_description' => 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
'min_experience' => 3,
'max_experience' => 5,
'seniority_level' => 'Senior',
'work_type' => 'Remote',
'employment_type' => 'Full Time',
'location' => 'New York, NY',
'skills_required' => ['JavaScript', 'Node.js', 'MongoDB'],
'skills_good_to_have' => ['TypeScript', 'Redis', 'Docker'],
'candidates' => [
[
'id' => 'ats-candidate-001',
'name' => 'John Doe',
'email' => 'john.doe@example.com',
'phone' => '+1234567890'
]
]
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'x-tidyhire-api-key: <token>',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
url := "https://api.tidyhire.app/api/public/v1/interview/invite"
payload := map[string]interface{}{
"ats_job_id": "ats-job-12345",
"job_title": "Senior Software Engineer",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": []string{"JavaScript", "Node.js", "MongoDB"},
"skills_good_to_have": []string{"TypeScript", "Redis", "Docker"},
"candidates": []map[string]interface{}{
{
"id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
},
},
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("x-tidyhire-api-key", "<token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class InterviewInvite {
public static void main(String[] args) {
try {
URL url = new URL("https://api.tidyhire.app/api/public/v1/interview/invite");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("x-tidyhire-api-key", "<token>");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"ats_job_id\": \"ats-job-12345\",\n" +
" \"job_title\": \"Senior Software Engineer\",\n" +
" \"job_description\": \"We are looking for a Senior Software Engineer to join our team and build scalable backend services.\",\n" +
" \"min_experience\": 3,\n" +
" \"max_experience\": 5,\n" +
" \"seniority_level\": \"Senior\",\n" +
" \"work_type\": \"Remote\",\n" +
" \"employment_type\": \"Full Time\",\n" +
" \"location\": \"New York, NY\",\n" +
" \"skills_required\": [\"JavaScript\", \"Node.js\", \"MongoDB\"],\n" +
" \"skills_good_to_have\": [\"TypeScript\", \"Redis\", \"Docker\"],\n" +
" \"candidates\": [{\n" +
" \"id\": \"ats-candidate-001\",\n" +
" \"name\": \"John Doe\",\n" +
" \"email\": \"john.doe@example.com\",\n" +
" \"phone\": \"+1234567890\"\n" +
" }]\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.tidyhire.app/api/public/v1/interview/invite')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['x-tidyhire-api-key'] = '<token>'
request['Content-Type'] = 'application/json'
request.body = {
ats_job_id: 'ats-job-12345',
job_title: 'Senior Software Engineer',
job_description: 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB'],
skills_good_to_have: ['TypeScript', 'Redis', 'Docker'],
candidates: [
{
id: 'ats-candidate-001',
name: 'John Doe',
email: 'john.doe@example.com',
phone: '+1234567890'
}
]
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"project_id": "64a1b2c3d4e5f6a7b8c9d0e1",
"job_url": "https://jobs.tidyhire.app/company/acme/job/64a1b2c3d4e5f6a7b8c9d0e2",
"project_url": "https://platform.tidyhire.app/app/projects/64a1b2c3d4e5f6a7b8c9d0e1",
"interviews": [
{
"id": "64a1b2c3d4e5f6a7b8c9d0e3",
"candidate_id": "ats-candidate-001",
"name": "John Doe",
"email": "john.doe@example.com",
"status": "success",
"message": "Interview invitation is being processed"
}
]
}
}