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.
Want candidates to answer while looking at an image, such as a diagram or a chart? See Adding an Image Prompt Question. Images are uploaded differently from videos, and only one image per question is supported.
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.MediaFileUploadTooBigError– only relevant for image prompt questions: an uploaded image is over 10 MB.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).- Video files: 150 MB max, any video format/codec (MP4 H.264 is a safe default). 4:3 aspect ratio fills the screen best; 16:9 works but shows black bars. See Video requirements below.
- Image prompt questions use
questionFormat.imageand a multipart upload in the same request, with one image per question (10 MB max). See Adding an Image Prompt Question. - 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.
Video requirements
Since every video gets transcoded after upload, Hireflix accepts a very wide range of formats and codecs — you don’t need to pre-convert a video before uploading it.- File size – 150 MB max (157,286,400 bytes). Larger file? Compress it first — this short Loom walks through doing that for free.
- Format – any video format/codec works (MP4, MOV, MKV, WebM, AVI, FLV, and more; H.264, H.265, VP8, VP9, AV1, and most common audio tracks). If you want a safe default to recommend to users, MP4 (H.264) is guaranteed to decode correctly, but there’s no need to force candidates or recruiters to re-encode to it —
.movand.webmwork just as well. - Aspect ratio – 4:3 fills the candidate’s screen edge-to-edge and is the most reliable across devices. A 16:9 (HD widescreen) video also works fine, but plays with black bars above and below since it doesn’t fill the 4:3 frame.
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?
Let’s learn how to add an image prompt question, where candidates answer while looking at an image.

