Skip to main content
POST
/
job-interview-create-for-candidate-with-token
Create an interview for a candidate and return an access token URL
curl --request POST \
  --url https://cool.jobmojito.com/functions/v1/job-interview-create-for-candidate-with-token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "candidate_name": "John",
  "candidate_email": "peterson6@hello.com",
  "candidate_country_code": "HR",
  "candidate_resume": "Curriculum Vitae ...",
  "position_def_set_id": "00000000-0000-0000-0000-000000000000",
  "position_external_id": "JOB-123",
  "interview_template_id": "5d8ea38b-eec4-4866-aa6c-b2ea5bc6e45b",
  "merchant_id": "28106cba-1c27-4e53-b149-32113e5e8e31",
  "position_name": "Entry level coffee boy",
  "position_location": "remote",
  "position_country_code": "SK",
  "mojito_language_code": "en",
  "position_description": "<string>",
  "position_description_long": "<string>",
  "candidate_external_id": "<string>",
  "candidate_linkedin_url": "<string>",
  "interview_attempts": 3,
  "custom_scoring": {},
  "use_enhanced_expectations": true,
  "include_rapport_question": true,
  "include_closing_prompt": true,
  "instructional_video": true,
  "instructional_video_custom_text": "<string>",
  "welcome_message": "<string>",
  "thank_you_message": "<string>",
  "max_duration": 123,
  "is_embedded": true
}
'
import requests

url = "https://cool.jobmojito.com/functions/v1/job-interview-create-for-candidate-with-token"

payload = {
"candidate_name": "John",
"candidate_email": "peterson6@hello.com",
"candidate_country_code": "HR",
"candidate_resume": "Curriculum Vitae ...",
"position_def_set_id": "00000000-0000-0000-0000-000000000000",
"position_external_id": "JOB-123",
"interview_template_id": "5d8ea38b-eec4-4866-aa6c-b2ea5bc6e45b",
"merchant_id": "28106cba-1c27-4e53-b149-32113e5e8e31",
"position_name": "Entry level coffee boy",
"position_location": "remote",
"position_country_code": "SK",
"mojito_language_code": "en",
"position_description": "<string>",
"position_description_long": "<string>",
"candidate_external_id": "<string>",
"candidate_linkedin_url": "<string>",
"interview_attempts": 3,
"custom_scoring": {},
"use_enhanced_expectations": True,
"include_rapport_question": True,
"include_closing_prompt": True,
"instructional_video": True,
"instructional_video_custom_text": "<string>",
"welcome_message": "<string>",
"thank_you_message": "<string>",
"max_duration": 123,
"is_embedded": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
candidate_name: 'John',
candidate_email: 'peterson6@hello.com',
candidate_country_code: 'HR',
candidate_resume: 'Curriculum Vitae ...',
position_def_set_id: '00000000-0000-0000-0000-000000000000',
position_external_id: 'JOB-123',
interview_template_id: '5d8ea38b-eec4-4866-aa6c-b2ea5bc6e45b',
merchant_id: '28106cba-1c27-4e53-b149-32113e5e8e31',
position_name: 'Entry level coffee boy',
position_location: 'remote',
position_country_code: 'SK',
mojito_language_code: 'en',
position_description: '<string>',
position_description_long: '<string>',
candidate_external_id: '<string>',
candidate_linkedin_url: '<string>',
interview_attempts: 3,
custom_scoring: {},
use_enhanced_expectations: true,
include_rapport_question: true,
include_closing_prompt: true,
instructional_video: true,
instructional_video_custom_text: '<string>',
welcome_message: '<string>',
thank_you_message: '<string>',
max_duration: 123,
is_embedded: true
})
};

fetch('https://cool.jobmojito.com/functions/v1/job-interview-create-for-candidate-with-token', 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://cool.jobmojito.com/functions/v1/job-interview-create-for-candidate-with-token",
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([
'candidate_name' => 'John',
'candidate_email' => 'peterson6@hello.com',
'candidate_country_code' => 'HR',
'candidate_resume' => 'Curriculum Vitae ...',
'position_def_set_id' => '00000000-0000-0000-0000-000000000000',
'position_external_id' => 'JOB-123',
'interview_template_id' => '5d8ea38b-eec4-4866-aa6c-b2ea5bc6e45b',
'merchant_id' => '28106cba-1c27-4e53-b149-32113e5e8e31',
'position_name' => 'Entry level coffee boy',
'position_location' => 'remote',
'position_country_code' => 'SK',
'mojito_language_code' => 'en',
'position_description' => '<string>',
'position_description_long' => '<string>',
'candidate_external_id' => '<string>',
'candidate_linkedin_url' => '<string>',
'interview_attempts' => 3,
'custom_scoring' => [

],
'use_enhanced_expectations' => true,
'include_rapport_question' => true,
'include_closing_prompt' => true,
'instructional_video' => true,
'instructional_video_custom_text' => '<string>',
'welcome_message' => '<string>',
'thank_you_message' => '<string>',
'max_duration' => 123,
'is_embedded' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://cool.jobmojito.com/functions/v1/job-interview-create-for-candidate-with-token"

payload := strings.NewReader("{\n \"candidate_name\": \"John\",\n \"candidate_email\": \"peterson6@hello.com\",\n \"candidate_country_code\": \"HR\",\n \"candidate_resume\": \"Curriculum Vitae ...\",\n \"position_def_set_id\": \"00000000-0000-0000-0000-000000000000\",\n \"position_external_id\": \"JOB-123\",\n \"interview_template_id\": \"5d8ea38b-eec4-4866-aa6c-b2ea5bc6e45b\",\n \"merchant_id\": \"28106cba-1c27-4e53-b149-32113e5e8e31\",\n \"position_name\": \"Entry level coffee boy\",\n \"position_location\": \"remote\",\n \"position_country_code\": \"SK\",\n \"mojito_language_code\": \"en\",\n \"position_description\": \"<string>\",\n \"position_description_long\": \"<string>\",\n \"candidate_external_id\": \"<string>\",\n \"candidate_linkedin_url\": \"<string>\",\n \"interview_attempts\": 3,\n \"custom_scoring\": {},\n \"use_enhanced_expectations\": true,\n \"include_rapport_question\": true,\n \"include_closing_prompt\": true,\n \"instructional_video\": true,\n \"instructional_video_custom_text\": \"<string>\",\n \"welcome_message\": \"<string>\",\n \"thank_you_message\": \"<string>\",\n \"max_duration\": 123,\n \"is_embedded\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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://cool.jobmojito.com/functions/v1/job-interview-create-for-candidate-with-token")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"candidate_name\": \"John\",\n \"candidate_email\": \"peterson6@hello.com\",\n \"candidate_country_code\": \"HR\",\n \"candidate_resume\": \"Curriculum Vitae ...\",\n \"position_def_set_id\": \"00000000-0000-0000-0000-000000000000\",\n \"position_external_id\": \"JOB-123\",\n \"interview_template_id\": \"5d8ea38b-eec4-4866-aa6c-b2ea5bc6e45b\",\n \"merchant_id\": \"28106cba-1c27-4e53-b149-32113e5e8e31\",\n \"position_name\": \"Entry level coffee boy\",\n \"position_location\": \"remote\",\n \"position_country_code\": \"SK\",\n \"mojito_language_code\": \"en\",\n \"position_description\": \"<string>\",\n \"position_description_long\": \"<string>\",\n \"candidate_external_id\": \"<string>\",\n \"candidate_linkedin_url\": \"<string>\",\n \"interview_attempts\": 3,\n \"custom_scoring\": {},\n \"use_enhanced_expectations\": true,\n \"include_rapport_question\": true,\n \"include_closing_prompt\": true,\n \"instructional_video\": true,\n \"instructional_video_custom_text\": \"<string>\",\n \"welcome_message\": \"<string>\",\n \"thank_you_message\": \"<string>\",\n \"max_duration\": 123,\n \"is_embedded\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://cool.jobmojito.com/functions/v1/job-interview-create-for-candidate-with-token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"candidate_name\": \"John\",\n \"candidate_email\": \"peterson6@hello.com\",\n \"candidate_country_code\": \"HR\",\n \"candidate_resume\": \"Curriculum Vitae ...\",\n \"position_def_set_id\": \"00000000-0000-0000-0000-000000000000\",\n \"position_external_id\": \"JOB-123\",\n \"interview_template_id\": \"5d8ea38b-eec4-4866-aa6c-b2ea5bc6e45b\",\n \"merchant_id\": \"28106cba-1c27-4e53-b149-32113e5e8e31\",\n \"position_name\": \"Entry level coffee boy\",\n \"position_location\": \"remote\",\n \"position_country_code\": \"SK\",\n \"mojito_language_code\": \"en\",\n \"position_description\": \"<string>\",\n \"position_description_long\": \"<string>\",\n \"candidate_external_id\": \"<string>\",\n \"candidate_linkedin_url\": \"<string>\",\n \"interview_attempts\": 3,\n \"custom_scoring\": {},\n \"use_enhanced_expectations\": true,\n \"include_rapport_question\": true,\n \"include_closing_prompt\": true,\n \"instructional_video\": true,\n \"instructional_video_custom_text\": \"<string>\",\n \"welcome_message\": \"<string>\",\n \"thank_you_message\": \"<string>\",\n \"max_duration\": 123,\n \"is_embedded\": true\n}"

response = http.request(request)
puts response.read_body
{
  "interview_url": "<string>",
  "position_def_set_id": "<string>",
  "interview_def_set_id": "<string>",
  "profile_interview_id": "<string>",
  "reason": "<string>",
  "embed_id": "<string>",
  "embed_signing_key": "<string>"
}
{
"error": "Field is required.",
"name": "interview_result_id"
}
{
"error": "Field is required.",
"name": "interview_result_id"
}
{
"error": "Field is required.",
"name": "interview_result_id"
}
{
"error": "Field is required.",
"name": "interview_result_id"
}

Authorizations

Authorization
string
header
required

Supabase JWT — Authorization: Bearer <token>.

Body

application/json
candidate_name
string
required

Candidate full name.

Minimum string length: 1
Example:

"John"

candidate_email
string
required

Candidate email (used as auth identity).

Minimum string length: 1
Example:

"peterson6@hello.com"

candidate_country_code
string
required

ISO country code of the candidate.

Minimum string length: 1
Example:

"HR"

candidate_resume
string
required

Candidate resume parsed text.

Minimum string length: 1
Example:

"Curriculum Vitae ..."

position_def_set_id
string | null

Existing position_def_set id. When provided, the position is looked up instead of created, and position_name/position_location/position_country_code/mojito_language_code become optional.

Example:

"00000000-0000-0000-0000-000000000000"

position_external_id
string | null

External position code used to look up an existing position.

Example:

"JOB-123"

interview_template_id
string | null

Interview template id to base the interview on. Defaults to the platform template when omitted.

Example:

"5d8ea38b-eec4-4866-aa6c-b2ea5bc6e45b"

merchant_id
string | null

Merchant id. Only honoured for admin / sub-merchant tokens; otherwise the token merchant is used.

Example:

"28106cba-1c27-4e53-b149-32113e5e8e31"

position_name
string | null

Position / job title. Required when position_def_set_id is not provided.

Example:

"Entry level coffee boy"

position_location
string | null

Position location. Required when position_def_set_id is not provided.

Example:

"remote"

position_country_code
string | null

ISO country code of the position. Required when position_def_set_id is not provided.

Example:

"SK"

mojito_language_code
enum<string> | null

Interview language code (one of the platform-languages.json codes). Required when position_def_set_id is not provided.

Available options:
ar,
bg,
zh,
hr,
cs,
da,
nl,
en,
fil,
fi,
fr,
de,
el,
hi,
hu,
id,
it,
ja,
ko,
ms,
no,
pl,
pt,
br,
ro,
ru,
sk,
es,
sv,
ta,
th,
tr,
uk,
vi
Example:

"en"

position_description
string | null

Short position description.

position_description_long
string | null

Full / long position description.

candidate_external_id
string | null

External candidate id stored on the profile.

candidate_linkedin_url
string | null

Candidate LinkedIn URL.

candidate_video_introduction
enum<string> | null

Whether a candidate video introduction is optional or required.

Available options:
optional,
required
interview_attempts
number | null

Number of allowed interview attempts (1-20).

Required range: 1 <= x <= 20
Example:

3

seniority_level
enum<string> | null

Seniority level of the position. Auto-detected when omitted.

Available options:
entry-level,
intermediate,
senior,
managerial,
director,
executive
result_view
enum<string> | null

How interview results are shown to the candidate. Defaults to minimal.

Available options:
none,
minimal,
minimal_with_score,
advanced,
full,
full_expand_scores
custom_scoring
object | null

Optional custom scoring overrides merged with platform defaults.

use_enhanced_expectations
boolean | null

Reserved flag for enhanced candidate expectations generation.

include_rapport_question
boolean | null

Include an opening rapport question. Defaults to false.

include_closing_prompt
boolean | null

Include a closing prompt. Defaults to true.

instructional_video
boolean | null

Show an instructional video before the interview. Defaults to false.

instructional_video_custom_text
string | null

Custom text shown with the instructional video.

welcome_message
string | null

Custom welcome message for the interview.

thank_you_message
string | null

Custom thank-you message shown after the interview.

max_duration
number | null

Maximum interview duration used to scale generated questions.

is_embedded
boolean | null

Set true when the interview will be embedded as an iframe on an external page. Ensures an embed key exists and returns embed_id/embed_signing_key, used to authenticate/sign the iframe embed.

Response

Candidate enrolled. Decision status, ids, and a tokenised interview URL.

Result of creating (or resolving) the position and enrolling the candidate. Fields present depend on the decision branch.

status
enum<string>
required

Decision / lifecycle status for the candidate against this position.

Available options:
ai_accept,
recruiter_accept,
recruiter_action,
ai_reject,
recruiter_reject,
already-applied
interview_url
string
required

URL the candidate should open to continue.

position_def_set_id
string

Created/resolved position id.

interview_def_set_id
string

Created/resolved interview definition set id.

profile_interview_id
string

Candidate profile_interview id.

reason
string

Human-readable reason, present on reject / already-applied branches.

embed_id
string

Embed id, present only when is_embedded=true.

embed_signing_key
string

Embed signing key, present only when is_embedded=true.