Replace alert templates for a check
Replaces the complete set of custom alert message templates for the check (replace-the-set semantics).
- Keys present in the body with a non-empty string → stored as the custom template for that key.
- Keys absent from the body or mapped to an empty string → the custom template is deleted and the built-in default text is used instead.
All entries are validated before any writes: if any key is invalid or any template body references an unknown {variable}, the entire request is rejected with 400 and nothing is written.
Key format: bare event type (down, recovery, fail, every-run, success, started, blocked, note) or event_type/cause for a per-cause override (e.g. "down/silence", "down/overrun", "down/never_started", "fail/runaway"). Per-cause entries take priority over the event-type-wide entry for that event.
Returns the resulting set (same shape as GET) on success.
Request
- Base URL: https://app.lastping.dev
- URL: https://app.lastping.dev/api/v1/checks/{id}/templates
- Auth: API key in header X-Api-Key
Request body
Example request
{
"templates": {
"down": "[LastPing] {check_name} is down.",
"down/silence": "[LastPing] {check_name} hasn't checked in; last seen {last_ping}."
}
}Response
Resulting custom templates after applying the replace-the-set operation.
Example response
{
"templates": {
"down": "[LastPing] {check_name} is down.",
"down/silence": "[LastPing] {check_name} hasn't checked in; last seen {last_ping}.",
"fail": "{failing_stage} failed on {branch} — {run_url}."
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.