Skip to main content
POST
/
persona-create
Create a new persona (role-play avatar)
curl --request POST \
  --url https://cool.jobmojito.com/functions/v1/persona-create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Difficult customer role-play",
  "interview_template_id": "baa3bf7c-6926-46fd-9005-16738a31f72d",
  "mojito_language_code": "en",
  "status": "active",
  "visibility": "merchant_public",
  "persona_role_avatar": "is to act as a happy customer responding to questions",
  "persona_role_user": "is to be a sales person trying to sell an additional product to the customer",
  "persona_avatar_who_is": "<string>",
  "persona_avatar_knowledge": "<string>",
  "persona_avatar_end_conditions": "<string>",
  "candidate_expectations": "<string>",
  "recording": "video_all",
  "recording_full_session": "video_all",
  "result_view": "full",
  "interview_conversation_speed": "normal",
  "candidate_video_introduction": "optional",
  "max_duration": 1200,
  "code": "my code",
  "cover_image_url": "https://example.com/cover.png",
  "interview_location": "remote",
  "merchant_id": "28106cba-1c27-4e53-b149-32113e5e8e31",
  "recruiter_profile_id": "<string>",
  "welcome_message": "<string>",
  "thank_you_message": "<string>",
  "tags": [
    "sales",
    "role-play"
  ],
  "is_embedded": false
}
'
import requests

url = "https://cool.jobmojito.com/functions/v1/persona-create"

payload = {
"name": "Difficult customer role-play",
"interview_template_id": "baa3bf7c-6926-46fd-9005-16738a31f72d",
"mojito_language_code": "en",
"status": "active",
"visibility": "merchant_public",
"persona_role_avatar": "is to act as a happy customer responding to questions",
"persona_role_user": "is to be a sales person trying to sell an additional product to the customer",
"persona_avatar_who_is": "<string>",
"persona_avatar_knowledge": "<string>",
"persona_avatar_end_conditions": "<string>",
"candidate_expectations": "<string>",
"recording": "video_all",
"recording_full_session": "video_all",
"result_view": "full",
"interview_conversation_speed": "normal",
"candidate_video_introduction": "optional",
"max_duration": 1200,
"code": "my code",
"cover_image_url": "https://example.com/cover.png",
"interview_location": "remote",
"merchant_id": "28106cba-1c27-4e53-b149-32113e5e8e31",
"recruiter_profile_id": "<string>",
"welcome_message": "<string>",
"thank_you_message": "<string>",
"tags": ["sales", "role-play"],
"is_embedded": False
}
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({
name: 'Difficult customer role-play',
interview_template_id: 'baa3bf7c-6926-46fd-9005-16738a31f72d',
mojito_language_code: 'en',
status: 'active',
visibility: 'merchant_public',
persona_role_avatar: 'is to act as a happy customer responding to questions',
persona_role_user: 'is to be a sales person trying to sell an additional product to the customer',
persona_avatar_who_is: '<string>',
persona_avatar_knowledge: '<string>',
persona_avatar_end_conditions: '<string>',
candidate_expectations: '<string>',
recording: 'video_all',
recording_full_session: 'video_all',
result_view: 'full',
interview_conversation_speed: 'normal',
candidate_video_introduction: 'optional',
max_duration: 1200,
code: 'my code',
cover_image_url: 'https://example.com/cover.png',
interview_location: 'remote',
merchant_id: '28106cba-1c27-4e53-b149-32113e5e8e31',
recruiter_profile_id: '<string>',
welcome_message: '<string>',
thank_you_message: '<string>',
tags: ['sales', 'role-play'],
is_embedded: false
})
};

fetch('https://cool.jobmojito.com/functions/v1/persona-create', 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/persona-create",
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' => 'Difficult customer role-play',
'interview_template_id' => 'baa3bf7c-6926-46fd-9005-16738a31f72d',
'mojito_language_code' => 'en',
'status' => 'active',
'visibility' => 'merchant_public',
'persona_role_avatar' => 'is to act as a happy customer responding to questions',
'persona_role_user' => 'is to be a sales person trying to sell an additional product to the customer',
'persona_avatar_who_is' => '<string>',
'persona_avatar_knowledge' => '<string>',
'persona_avatar_end_conditions' => '<string>',
'candidate_expectations' => '<string>',
'recording' => 'video_all',
'recording_full_session' => 'video_all',
'result_view' => 'full',
'interview_conversation_speed' => 'normal',
'candidate_video_introduction' => 'optional',
'max_duration' => 1200,
'code' => 'my code',
'cover_image_url' => 'https://example.com/cover.png',
'interview_location' => 'remote',
'merchant_id' => '28106cba-1c27-4e53-b149-32113e5e8e31',
'recruiter_profile_id' => '<string>',
'welcome_message' => '<string>',
'thank_you_message' => '<string>',
'tags' => [
'sales',
'role-play'
],
'is_embedded' => false
]),
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/persona-create"

payload := strings.NewReader("{\n \"name\": \"Difficult customer role-play\",\n \"interview_template_id\": \"baa3bf7c-6926-46fd-9005-16738a31f72d\",\n \"mojito_language_code\": \"en\",\n \"status\": \"active\",\n \"visibility\": \"merchant_public\",\n \"persona_role_avatar\": \"is to act as a happy customer responding to questions\",\n \"persona_role_user\": \"is to be a sales person trying to sell an additional product to the customer\",\n \"persona_avatar_who_is\": \"<string>\",\n \"persona_avatar_knowledge\": \"<string>\",\n \"persona_avatar_end_conditions\": \"<string>\",\n \"candidate_expectations\": \"<string>\",\n \"recording\": \"video_all\",\n \"recording_full_session\": \"video_all\",\n \"result_view\": \"full\",\n \"interview_conversation_speed\": \"normal\",\n \"candidate_video_introduction\": \"optional\",\n \"max_duration\": 1200,\n \"code\": \"my code\",\n \"cover_image_url\": \"https://example.com/cover.png\",\n \"interview_location\": \"remote\",\n \"merchant_id\": \"28106cba-1c27-4e53-b149-32113e5e8e31\",\n \"recruiter_profile_id\": \"<string>\",\n \"welcome_message\": \"<string>\",\n \"thank_you_message\": \"<string>\",\n \"tags\": [\n \"sales\",\n \"role-play\"\n ],\n \"is_embedded\": false\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/persona-create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Difficult customer role-play\",\n \"interview_template_id\": \"baa3bf7c-6926-46fd-9005-16738a31f72d\",\n \"mojito_language_code\": \"en\",\n \"status\": \"active\",\n \"visibility\": \"merchant_public\",\n \"persona_role_avatar\": \"is to act as a happy customer responding to questions\",\n \"persona_role_user\": \"is to be a sales person trying to sell an additional product to the customer\",\n \"persona_avatar_who_is\": \"<string>\",\n \"persona_avatar_knowledge\": \"<string>\",\n \"persona_avatar_end_conditions\": \"<string>\",\n \"candidate_expectations\": \"<string>\",\n \"recording\": \"video_all\",\n \"recording_full_session\": \"video_all\",\n \"result_view\": \"full\",\n \"interview_conversation_speed\": \"normal\",\n \"candidate_video_introduction\": \"optional\",\n \"max_duration\": 1200,\n \"code\": \"my code\",\n \"cover_image_url\": \"https://example.com/cover.png\",\n \"interview_location\": \"remote\",\n \"merchant_id\": \"28106cba-1c27-4e53-b149-32113e5e8e31\",\n \"recruiter_profile_id\": \"<string>\",\n \"welcome_message\": \"<string>\",\n \"thank_you_message\": \"<string>\",\n \"tags\": [\n \"sales\",\n \"role-play\"\n ],\n \"is_embedded\": false\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://cool.jobmojito.com/functions/v1/persona-create")

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 \"name\": \"Difficult customer role-play\",\n \"interview_template_id\": \"baa3bf7c-6926-46fd-9005-16738a31f72d\",\n \"mojito_language_code\": \"en\",\n \"status\": \"active\",\n \"visibility\": \"merchant_public\",\n \"persona_role_avatar\": \"is to act as a happy customer responding to questions\",\n \"persona_role_user\": \"is to be a sales person trying to sell an additional product to the customer\",\n \"persona_avatar_who_is\": \"<string>\",\n \"persona_avatar_knowledge\": \"<string>\",\n \"persona_avatar_end_conditions\": \"<string>\",\n \"candidate_expectations\": \"<string>\",\n \"recording\": \"video_all\",\n \"recording_full_session\": \"video_all\",\n \"result_view\": \"full\",\n \"interview_conversation_speed\": \"normal\",\n \"candidate_video_introduction\": \"optional\",\n \"max_duration\": 1200,\n \"code\": \"my code\",\n \"cover_image_url\": \"https://example.com/cover.png\",\n \"interview_location\": \"remote\",\n \"merchant_id\": \"28106cba-1c27-4e53-b149-32113e5e8e31\",\n \"recruiter_profile_id\": \"<string>\",\n \"welcome_message\": \"<string>\",\n \"thank_you_message\": \"<string>\",\n \"tags\": [\n \"sales\",\n \"role-play\"\n ],\n \"is_embedded\": false\n}"

response = http.request(request)
puts response.read_body
{
  "interview_def_set_id": "00000000-0000-0000-0000-000000000000",
  "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"
}

Authorizations

Authorization
string
header
required

Supabase JWT — Authorization: Bearer <token>.

Body

application/json
name
string
required

Persona / session name.

Minimum string length: 1
Example:

"Difficult customer role-play"

interview_template_id
string<uuid>
required

Id of the interview template (avatar) the persona uses.

Minimum string length: 1
Example:

"baa3bf7c-6926-46fd-9005-16738a31f72d"

mojito_language_code
enum<string>
required

Platform language code used for the conversation. Must be one of the platform-languages.json codes.

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"

status
enum<string>
required

Lifecycle status of the interview. Options — draft: Created but not published — not visible to candidates and cannot be run yet. Use to stage an interview before going live. | active: Published and live — candidates can run it..

Available options:
draft,
active
Example:

"active"

visibility
enum<string>
required

Who can discover and access the interview. Options — merchant_public: Listed on the merchant's public interview list — anyone with the merchant link can find and start it. | merchant_invite: Invite-only — only candidates explicitly invited (by email/link) can access it; not listed anywhere. | merchant_unlisted: Reachable only via a direct link — not listed anywhere; share the link manually..

Available options:
merchant_public,
merchant_invite,
merchant_unlisted
Example:

"merchant_public"

persona_role_avatar
string
required

The role the AI avatar plays. Example: 'is to act as a happy customer responding to questions'.

Minimum string length: 1
Example:

"is to act as a happy customer responding to questions"

persona_role_user
string
required

The role the candidate (mentee) plays. Example: 'is to be a sales person trying to sell an additional product to the customer'.

Minimum string length: 1
Example:

"is to be a sales person trying to sell an additional product to the customer"

persona_avatar_who_is
string | null

Who the avatar represents (background/identity of the persona).

persona_avatar_knowledge
string | null

What the avatar knows — facts/context the avatar can draw on during the conversation.

persona_avatar_end_conditions
string | null

Conditions under which the avatar should end the session.

candidate_expectations
string | null

Mentee assessment goals — free-text describing what the candidate is expected to achieve (max 2100 chars).

Maximum string length: 2100
recording
enum<string> | null

Cheating/proctoring detection mode for candidate answers — this is NOT a full session recording. Video options also record the candidate. Omit/null to disable. Options — audio_first_5_answers: Audio-only cheating detection, first 5 answers only. | audio_all: Audio-only cheating detection on every answer. | video_all: Audio + video cheating detection on every answer (candidate is recorded for all answers). | video_first_5_answers: Audio + video cheating detection, first 5 answers only..

Available options:
audio_first_5_answers,
audio_all,
video_all,
video_first_5_answers
Example:

"video_all"

recording_full_session
enum<string> | null

Full interview-session recording (includes the avatar and voice) produced as a single file. Independent of recording. Omit/null to disable. Options — audio_all: Record the whole session audio (avatar + candidate voice) into a single file. Adds +0.2 credits. | video_all: Record the whole session video + audio (avatar + candidate) into a single file. Adds +0.4 credits..

Available options:
audio_all,
video_all
Example:

"video_all"

result_view
enum<string> | null

Result screen shown to the candidate after finishing. With any value other than none, the candidate sees a results screen where they can provide feedback, record an intro video and edit the transcript, and must then submit the result; the value sets how much score/result detail is shown. Options — none: No results screen at all — the interview is submitted immediately when the candidate finishes (no feedback, intro video, transcript edit or manual submit step). | minimal: Minimal results layout, no score shown. | minimal_with_score: Minimal results layout including the overall score. | advanced: Advanced results layout with more detail. | full: Full results layout with all sections. | full_expand_scores: Full results with every score breakdown expanded..

Available options:
none,
minimal,
minimal_with_score,
advanced,
full,
full_expand_scores
Example:

"full"

interview_conversation_speed
enum<string> | null

Conversation pace of the AI avatar. Omit/null keeps the template default pace. Options — slower: The avatar speaks more slowly — easier to follow for non-native speakers. | normal: Default speaking pace. | faster: The avatar speaks more quickly for a snappier conversation..

Available options:
slower,
normal,
faster
Example:

"normal"

candidate_video_introduction
enum<string> | null

Whether a candidate video introduction is optional or required.

Available options:
optional,
required
Example:

"optional"

max_duration
number | null

Maximum conversation duration in seconds. Defaults to 1200 (20 min) when omitted.

Example:

1200

code
string | null

Optional external code/reference for the persona.

Example:

"my code"

cover_image_url
string | null

Cover image URL.

Example:

"https://example.com/cover.png"

interview_location
string | null

Optional location label shown for the session.

Example:

"remote"

merchant_id
string | null

Merchant id. Admin / sub-merchant callers only; otherwise taken from your token.

Example:

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

recruiter_profile_id
string | null

Profile id of the recruiter owning this persona. Must be a merchant/merchant_owner/admin profile of the same merchant.

welcome_message
string | null

Custom welcome message shown to the candidate.

thank_you_message
string | null

Custom thank-you message shown after the session.

tags
string[] | null

Free-form tags stored on the persona.

Example:
["sales", "role-play"]
is_embedded
boolean | null

Set true when the persona will be embedded as an iframe on an external page. Provisions an embed key and returns embed_id / embed_signing_key.

Example:

false

Response

Persona created.

Id of the created persona. Includes embed_id/embed_signing_key when is_embedded=true.

interview_def_set_id
string
required

Id of the newly created persona definition set.

Example:

"00000000-0000-0000-0000-000000000000"

embed_id
string

Embed id, present only when is_embedded=true.

embed_signing_key
string

Embed signing key, present only when is_embedded=true.