Notification Templates
Notification templates let you define reusable message content — a title and body — that you can apply consistently across campaigns and API calls. Instead of hard-coding notification text every time you send, you create a template once and reference it by ID.
This guide walks through the full lifecycle: creating a template in the dashboard, using it from the Composer, referencing it directly in the API, updating it, and deleting it safely.
1. Create a Template via the Dashboard
- Log in to the Hober Dashboard and navigate to Templates in the left sidebar.
- Click New Template (or go directly to
/templates/new). - Fill in the fields:
- Name — a unique, human-readable identifier (e.g.
order-shipped). Names must be unique within your workspace. - Title — the notification title that recipients will see.
- Body — the notification body text.
- Name — a unique, human-readable identifier (e.g.
- Click Save Template.
The dashboard saves the template and redirects you to the template detail page, where you can copy the template ID for use in the API.
2. Use the Template Picker in the Composer
When composing a notification in the dashboard (Composer), you can select an existing template instead of typing the content manually.
- Open the Composer from the main navigation.
- In the Message section, click Use a template.
- A picker appears listing all templates in your workspace. Use the search box to filter by name.
- Click a template to populate the Title and Body fields automatically.
- You can still edit the pre-filled fields before sending — changes made here apply only to this notification job and do not modify the saved template.
3. Use a Template via the API
To send a notification that uses a template, pass the template's id as templateId in the request body. The API resolves the title and body at send time from the template content at that moment.
curl -X POST https://api.hober.io/api/v1/notifications \
-H "X-SDK-Key: YOUR_SDK_KEY" \
-H "Content-Type: application/json" \
-d '{
"subscriberIds": ["user-123", "user-456"],
"templateId": "tpl_a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'
You can still override the title or body for an individual send by also supplying title and/or body fields. When both templateId and explicit content fields are present, the explicit fields take precedence.
4. Update a Template
You can update a template's name or content at any time using the API or the dashboard.
Via the dashboard
- Navigate to Templates and click the template you want to edit.
- Modify the Name, Title, or Body fields.
- Click Save Changes.
Via the API
curl -X PATCH https://api.hober.io/api/v1/templates/tpl_a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "X-SDK-Key: YOUR_SDK_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": {
"title": "Your order is on its way!",
"body": "Track your shipment in the app."
}
}'
Snapshot semantics
Hober uses a send-time snapshot model. When the API dispatches a notification, it reads the template content at the moment of sending. Notification jobs that have already been sent are not retroactively updated — the recipient saw whatever content was in the template at send time.
However, scheduled (future-dated) notification jobs will use the template content as it exists when the job actually runs, not at the time the job was created. If you update a template while jobs referencing it are queued, those jobs will pick up the new content.
5. Delete a Template
Template deletion is irreversible. There is no undo.
Before deleting a template, check whether any notification jobs are scheduled to send using it. Scheduled jobs that still reference the deleted template ID will fail to send when their scheduled time arrives.
Recommended steps before deleting:
- In the dashboard, navigate to Templates and open the template.
- Click View scheduled jobs to list any pending notification jobs that reference this template.
- Cancel or reassign those jobs before proceeding.
- Return to the template detail page and click Delete Template, then confirm in the modal.
Via the API
curl -X DELETE https://api.hober.io/api/v1/templates/tpl_a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "X-SDK-Key: YOUR_SDK_KEY"
A successful deletion returns 204 No Content with an empty body.