Skip to main content
POST
/
job-interview-set-state
Set interview state
curl --request POST \
  --url https://cool.jobmojito.com/functions/v1/job-interview-set-state \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "position_id": "00000000-0000-0000-0000-000000000000",
  "is_embedded": true
}
'
{
  "success": true
}

Authorizations

Authorization
string
header
required

Supabase JWT access token, passed as Authorization: Bearer <token>.

Body

application/json
position_id
string<uuid>
required

Interview definition id or position id whose state should change.

Minimum string length: 1
Example:

"00000000-0000-0000-0000-000000000000"

status
enum<string> | null

New lifecycle status to apply.

Available options:
draft,
active,
archived,
deleted,
preparing,
completed
is_embedded
boolean | null

Controls iframe embedding of the interview on an external page. When true, ensures an embed key exists (returns embed_id/embed_signing_key, used to authenticate/sign the iframe embed). When false, removes the embed keys (disables embedding).

Response

State updated.

Returns { embed_id, embed_signing_key } when an embed key was created/returned (is_embedded=true), otherwise { success: true }.

success
boolean
required