When to use this
A position is an interview template — it holds a name, one or more questions (steps), an optional outro, and optional intro/outro/question videos. UsecreatePosition whenever you want to set up a new role programmatically instead of using the Hireflix dashboard. Once a position exists, you invite candidates to it to actually create interviews (see Inviting a Candidate).
Videos are optional — you can attach an intro, outro, and/or per-question video, covered in Adding video content to a position below.
Before you start
Don’t forget to send your Hireflix API Key in theX-API-KEY header to https://api.hireflix.com/me. Unlike updating or archiving a position, creating one needs no prior IDs — createPosition is often the very first mutation you’ll call against the API.
GraphQL Playground
Create examples
Each tab below shows a variation of the samecreatePosition mutation, from a minimal position to one with tags, an outro, and multiple questions.
- Basic
- Full example
The smallest valid position: a name and one question.
answerFormat: { video: {} } uses the default recording settings (120s max duration, 30s to think, no retakes).- name – required, 1–110 characters.
- steps – required, at least 1 entry (max 50). Each
QAstep needs atitleand ananswerFormat. - answerFormat.video – required for a QA step. An empty object
{}just means “use the defaults” — no custom duration, thinking time, or retakes.
None of the examples above upload a new video —
mediaId fields only reference media that already exists in your account. To upload a video and obtain a real mediaId, follow Adding video content to a position below, then come back and drop the returned mediaId into introVideo, outro.video, or a step’s questionFormat.video.Handling the response
createPosition returns a union type — always branch on the possible cases:
MutationCreatePositionSuccess– the position was created; read it fromdata.ValidationError– one or more fields failed validation; inspectfieldErrorsfor the offendingpathandmessage.MediaNotFoundError– amediaIdyou referenced (e.g. inintroVideo) doesn’t exist, doesn’t belong to your company, or its upload reservation was never completed.MediaFileTooLargeError/MediaFileUploadMimeTypeNotSupportedError/MediaMimeTypeMismatchError– only relevant if you’re referencing a media asset with the wrong type or size for where it’s used.ThemeNotFoundError/UsersNotFoundError/TemplatesNotFoundError– thethemeId,users, or notificationtemplateIDs you passed don’t exist or aren’t accessible to you.
Key reminders
nameis required, 1–110 characters.stepsis required — at least 1, max 50. Each step currently supports theQAtype.publicdefaults totrueif omitted.mediaIdfields never upload anything — they only reference media created via areservePosition*VideoUploadmutation (see below).- Verify a position was created by checking admin.hireflix.com/jobs and searching by name.
- Unsure what
maxDurationSeconds,timeToThinkSeconds, ornumAllowedRetakesshould be set to? See Tailoring the Interview for what each setting means for candidates.
Adding video content to a position
A position can show a video in three places: the intro screen, the outro screen, and a QA question prompt. All three follow the same three-step flow:- Reserve an upload with the matching mutation for that destination.
- PUT the video file to the returned
presignedPutUrl. - Pass the returned
mediaIdintocreatePosition(orupdatePositionfor an existing position).
All three take the same input —
mimeType (must match video/*, e.g. "video/mp4") and sizeBytes (max 157286400 bytes / 150 MB) — and return the same shape: { mediaId, presignedPutUrl, expiresAt }. expiresAt is roughly 1 hour from the reservation — upload before then, or reserve again.
Uploading the file
Once you have apresignedPutUrl, PUT the raw file to it with a matching Content-Type:
mediaId from step 1 is ready to use. The tabs below show each reserve mutation paired with the createPosition call that uses its mediaId, followed by a full example combining all three.
- Intro video
- Outro video
- QA question video
- Full example
1. Reserve the upload:2. PUT the file to
presignedPutUrl (see Uploading the file above).3. Use the mediaId in createPosition:Learn next?
Need to create many positions at once? Let’s learn how to bulk-create positions with a script.

