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.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
string | header
required
API key of the form
<token>, passed as the x-tidyhire-api-key header.Body
Interview invitation datastring
required
Job ID from your ATS that identifies the job these candidates belong to.Example:
"ats-job-12345"string
required
Job title for the role. Also used as the project name. Hyperlinks not allowed.Example:
"Senior Software Engineer"object[]
required
Candidates to invite. Max 200 per request.
Show child attributes
Show child attributes
string
required
Candidate ID from your system (e.g. ATS ID). Reuses an existing candidate if it matches.Example:
"ats-candidate-001"string
required
Candidate’s full name (letters, dots, spaces only). Minimum 3 characters. Auto-converted to Title Case.Example:
"John Doe"string
required
Candidate’s email — the interview link is sent here.Example:
"john.doe@example.com"string
Candidate’s phone number in E.164 format.Example:
"+1234567890"object
Key-value pairs stored on the candidate record. Values can be a string, number, or boolean. Max 50 keys. Read more about custom fields.
string
required
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."number
required
Minimum years of experience required.Example:
3number
required
Maximum years of experience required. Must be greater than
min_experience.Example: 5string
required
One of:
Entry, Mid, Senior, Lead, Principal, Staff.Example: "Senior"string
required
One of:
Remote, On Site, Hybrid.Example: "Remote"string
required
One of:
Full Time, Part Time, Contract, Freelance.Example: "Full Time"string
required
Job location.Example:
"New York, NY"string[]
required
Required skills. Minimum 3.Example:
["JavaScript", "Node.js", "MongoDB"]string[]
required
Preferred skills. Minimum 3.Example:
["TypeScript", "Redis", "Docker"]object[]
Your own interview questions. If not provided, we will generate the questions for you.
object
Response
Interview invitations are being processedboolean
Indicates if the request was successful. Example:
trueobject
Show child attributes
Show child attributes
string
Project ID (new or existing).
string
Public URL for the job listing.
string
Dashboard URL for the project.
object[]
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"
}
]
}
}