Skip to main content
POST
cURL

Waiting for the job

The response is 202 with generation_status: "pending". Poll the job until generation finishes:
  • complete: the job is ready. Invite candidates to it.
  • failed: generation stopped. failure_reason says why. Fix the request and create the job again.
While a job is pending, GET /jobs doesn’t list it and PATCH /jobs/{id} returns 409 job_generating. DELETE /jobs/{id} cancels it.

Authorizations

X-API-Key
string
header
required

Your company's API key, from Settings → Integrations in Alex. The earlier API's api-key header is accepted too; if you send both headers they must carry the same key.

Headers

Idempotency-Key
string

A unique value, 1 to 255 characters, that makes the request safe to retry. See Idempotency.

Required string length: 1 - 255

Body

application/json
external_id
string
required

Your identifier for the job, such as its ATS requisition id. Must be unique within your company.

Minimum string length: 1
Example:

"REQ-12345"

description
string
required

The full job description. Alex generates the interview's questions and evaluation criteria from it.

Minimum string length: 1
name
string

The job's title. When omitted, Alex infers one from description.

candidate_facing_name
string

The title candidates see, when it should differ from name.

status
enum<string>
default:active

Whether the job is created active or inactive.

Available options:
active,
inactive
workflow_id
string

The application workflow the job runs (see GET /workflows). When omitted, your company's default workflow.

Minimum string length: 1
additional_generation_context
string

Free-text guidance for generation, such as seniority signals or must-have skills.

rounds
object[]

How to set up the workflow's rounds. Every human interview round and assessment round of the workflow needs an entry.

Response

Accepted. The job is being generated.

object
string
required

Always "job".

Allowed value: "job"
id
string
required

The job's id. The same id the earlier API calls positionId or interviewerId.

Example:

"8b1f0c52-3e4a-4d8e-9a77-2f6c1d0b9e31"

name
string | null
required

The job's title. null while generation is still inferring it from the description.

Example:

"Senior Backend Engineer"

candidate_facing_name
string | null
required

The title candidates see. null while generation is still inferring it.

description
string | null
required

The job description. null only for a job whose generation hasn't created it yet.

external_id
string | null
required

Your identifier for the job, such as its ATS requisition id.

Example:

"REQ-12345"

status
enum<string> | null
required

Whether the job accepts candidates. null until generation has created the job.

Available options:
active,
inactive,
null
workflow_id
string | null
required

The application workflow the job runs. null until generation has created the job.

language
string | null
required

ISO code of the language candidates start in. null for the workflow's first language.

application_url
string<uri> | null
required

The job's public application page, while it is published.

rounds
object[]
required

The job's rounds, in order. Empty until generation has created them.

custom_fields
object
required

Stored custom field values, by custom field key (see GET /custom-fields). A field with no stored value is left out. A field read live from your ATS (type: ats_field) is never stored, so it never appears here.

Example:
generation_status
enum<string>
required

pending while Alex builds the job from its description, complete once it is ready, and failed if generation stopped. failed is final. A job created any other way is complete.

Available options:
pending,
complete,
failed
failure_reason
string | null
required

Why generation failed. Set only when generation_status is failed.

updated_at
string<date-time> | null
required

When the job last changed. null on the response to POST /jobs.