When to use this
Candidates receive automatic messages from a position: an invitation, one or more reminders, and a confirmation when they finish. Each message is a notification template. Use the API to:- See which templates exist and which positions use them.
- Make a copy of a template and change its text, for example a new version for next year’s campaign.
- Choose which templates a position sends, and when.
How templates and positions fit together
Templates belong to your account, not to a position. A position has a list ofnotifications, and each one points to a template by ID:
Before you start
Send your Hireflix API Key in theX-API-KEY header to https://api.hireflix.com/me. The examples use email templates; for the other channels, use type: "sms" or type: "whatsapp" in queries and type: sms or type: whatsapp in mutations.
Template operations
- List templates
- Read a template
- Clone a template
- Edit a template
- Assign to positions
- Replace everywhere
List every email template and the positions that use it.
isDefault: true marks the templates Hireflix created for your account.To get the full content of every template in one call, for example to back them up or audit their wording, add more fields to each
list entry:typeEnum: the channel (email,smsorwhatsapp).language: the template’s language code, such asen.template.subjectandtemplate.body: the content in Draft.js format. See Template content format.
positionId in the Variables panel:Template content format
A template’ssubject and body (and text for SMS and WhatsApp) are raw Draft.js objects:
blocksis a list of paragraphs. A block with an emptytextis a blank line.- Variables such as the candidate’s name or interview link are
VARIABLEentities. An entity range (offset,length) covers the braced text in the block, andentityMapholds the variable’svalue.
Keep entity ranges in sync.
offset and length count characters in the block’s text. A replacement of the same length, such as 2026 → 2027, needs no other change. Any other edit shifts every range after it in that block, so recalculate those offsets, or the variables end up in the wrong place.
Example: new templates for a new campaign
Goal: give this year’s positions new emails that say “2027”, and leave last year’s positions unchanged.1
Find the templates in use
Run List templates and read the
notifications of one 2027 position to get the IDs of the templates it sends.2
Clone and edit each template
For each template, run
cloneTemplate with a new name, read the clone, change 2026 to 2027 in its subject and body, and save it with updateEmailTemplate.3
Assign the clones
For each 2027 position, send
updatePosition with the full candidateNotifications list, pointing to the new template IDs.4
Check the result
Read every 2027 position’s
notifications again, then run List templates to confirm the 2026 positions still use the original templates. Send yourself a test invite to see the email as candidates will.Key reminders
- Templates are shared. Editing one changes every position that uses it, archived ones included.
replacePositionNotificationTemplateis account-wide. UseupdatePositionto change specific positions.candidateNotificationsreplaces the whole list. Fetch the current list first and keep each entry’sid.- Clone default templates (
isDefault: true) instead of editing them, unless you want every position to change. - WhatsApp templates can’t be edited through the API. Creating one needs an already-approved Twilio
contentSid.
Learn next?
Let’s learn how to invite a candidate.

