Skip to main content
POST
cURL

Which application

An invitation reuses the candidate’s application to the job only when it is undecided: not withdrawn or deleted, with no stage or a not_started stage, and no completed interview. Otherwise a new application is created, even when the existing one is in an in_progress stage, so a candidate can be invited again at once. There is no cooldown. The response is 201 when a new application was created and 200 when an existing one was used. A candidate whose last application to the job was rejected is invited again, on a new application. Your settings on whether rejected candidates may apply again only cover candidates who come back on their own, never an invitation you send. A job with no rounds yet can’t take invitations: the request returns 409 job_not_ready. Retry once the job has rounds. A closed job returns 409 job_closed.

When nothing is sent

invite_sent: false means Alex didn’t send an invitation. skipped_reason says why: duplicate_auto_invite, rejected_no_reapply and ats_reopen_unavailable are listed in the schema because invitations Alex starts on its own share it. An invitation sent here never returns them.

Identifying the candidate

Send candidate.id for a candidate Alex already has; an email or phone in contact then replaces theirs. A candidate deleted in your ATS can’t be invited by id: it returns 404. Otherwise send first_name, last_name and, optionally, external_id, with an email or phone in contact; Alex finds the candidate by external_id or contact details, or creates one. contact.phone must have 10 to 15 digits; any other number returns 400 parameter_invalid, where the earlier API dropped it. An optional field sent as null or a blank string, such as contact.email: "" or candidate.external_id: "", counts as not sent. Name the job with job_id or job_external_id, not both. round_number starts the candidate at that round; leave it out to start at the first.

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
candidate
object
required

Who to invite: an existing candidate's id, or the details to find or create the candidate by.

job_id
string

The job's id. Send exactly one of job_id or job_external_id.

Minimum string length: 1
job_external_id
string

The job's external_id. Send exactly one of job_id or job_external_id.

Minimum string length: 1
contact
object

Where to send the invitation. Required, with an email, a phone or both, unless candidate.id is sent. With candidate.id, it replaces the stored contact details for this invitation.

round_number
integer

The round to invite the candidate to. Defaults to the job's first round.

Required range: x >= 1

Response

Invited on the candidate's existing live application, or nothing was sent: skipped_reason says why.

object
string
required

Always "invitation".

Allowed value: "invitation"
application
object | null
required

The candidate's live application on the job: the undecided one they already had, or a new one. For a candidate who opted out of contact nothing is created, and this is their existing live application on the job, or null.

invite_sent
boolean
required

true when an invitation went out. false when nothing was sent; skipped_reason says why.

skipped_reason
enum<string> | null
required

Why nothing was sent. do_not_contact: the candidate opted out. already_in_progress: the application's earlier outreach for this invite is still running. workflow_not_started: the job's workflow has nothing to run for a manual invite. job_not_invitable, job_not_ready: the job stopped taking invitations. rejected_no_reapply, ats_reopen_unavailable and duplicate_auto_invite apply only to invitations Alex starts on its own, never to one sent here. null when invite_sent is true.

Available options:
do_not_contact,
already_in_progress,
workflow_not_started,
job_not_invitable,
job_not_ready,
rejected_no_reapply,
ats_reopen_unavailable,
duplicate_auto_invite,
null