Update a Notification
curl --request POST \
--url https://api.lerix.dev/v1/{project-id}/notifications/{id}/update \
--header 'Content-Type: application/json' \
--header 'lerix-key: <api-key>' \
--data '
{
"apiKey": "<string>",
"title": "<string>",
"body": "<string>"
}
'import requests
url = "https://api.lerix.dev/v1/{project-id}/notifications/{id}/update"
payload = {
"apiKey": "<string>",
"title": "<string>",
"body": "<string>"
}
headers = {
"lerix-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'lerix-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>', title: '<string>', body: JSON.stringify('<string>')})
};
fetch('https://api.lerix.dev/v1/{project-id}/notifications/{id}/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lerix.dev/v1/{project-id}/notifications/{id}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => '<string>',
'title' => '<string>',
'body' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"lerix-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lerix.dev/v1/{project-id}/notifications/{id}/update"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("lerix-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lerix.dev/v1/{project-id}/notifications/{id}/update")
.header("lerix-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lerix.dev/v1/{project-id}/notifications/{id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["lerix-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyPush Notifications
Update a Notification
Change a notification’s title and body after it’s been sent or scheduled.
POST
/
v1
/
{project-id}
/
notifications
/
{id}
/
update
Update a Notification
curl --request POST \
--url https://api.lerix.dev/v1/{project-id}/notifications/{id}/update \
--header 'Content-Type: application/json' \
--header 'lerix-key: <api-key>' \
--data '
{
"apiKey": "<string>",
"title": "<string>",
"body": "<string>"
}
'import requests
url = "https://api.lerix.dev/v1/{project-id}/notifications/{id}/update"
payload = {
"apiKey": "<string>",
"title": "<string>",
"body": "<string>"
}
headers = {
"lerix-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'lerix-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>', title: '<string>', body: JSON.stringify('<string>')})
};
fetch('https://api.lerix.dev/v1/{project-id}/notifications/{id}/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lerix.dev/v1/{project-id}/notifications/{id}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => '<string>',
'title' => '<string>',
'body' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"lerix-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lerix.dev/v1/{project-id}/notifications/{id}/update"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("lerix-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lerix.dev/v1/{project-id}/notifications/{id}/update")
.header("lerix-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lerix.dev/v1/{project-id}/notifications/{id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["lerix-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyEdits a notification’s
On failure, the response follows the shape documented in Error & success codes.
title and body, using the notificationId returned
from Send a notification.
See the API introduction to set up your base URL and private key before making requests.
How this behaves by status
| Current status | What happens |
|---|---|
scheduled | Edited in place — nothing is sent yet, so the new title/body is simply what gets delivered once it’s actually due. |
sent, failed, unsent | Already had its delivery attempt, so “updating” means redelivering immediately with the new content to the current recipients (for a topic, whoever is subscribed right now — not a stale snapshot). |
canceled | Can’t be updated — returns CANNOT_UPDATE_CANCELED_NOTIFICATION. |
Parameters
string
required
The
notificationId returned when the notification was sent.string
Deprecated alternative to the
lerix-key header, still accepted.string
required
New notification title.
string
required
New notification message body.
Response
201 Created
{
"id": "b6b1a2b0-9c3f-4b3e-9c3f-4b3e9c3f4b3e",
"title": "Hello",
"body": "You have a new message.",
"status": "scheduled",
"updatedAt": "2026-09-01T10:00:00.000Z"
// ...remaining notification fields
}