تحديث إشعار
curl --request POST \
--url https://api.atelerix.dev/v1/{project-id}/notifications/{id}/update \
--header 'Content-Type: application/json' \
--header 'atelerix-api-key: <api-key>' \
--data '
{
"apiKey": "<string>",
"title": "<string>",
"body": "<string>"
}
'import requests
url = "https://api.atelerix.dev/v1/{project-id}/notifications/{id}/update"
payload = {
"apiKey": "<string>",
"title": "<string>",
"body": "<string>"
}
headers = {
"atelerix-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'atelerix-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>', title: '<string>', body: JSON.stringify('<string>')})
};
fetch('https://api.atelerix.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.atelerix.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",
"atelerix-api-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.atelerix.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("atelerix-api-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.atelerix.dev/v1/{project-id}/notifications/{id}/update")
.header("atelerix-api-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.atelerix.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["atelerix-api-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_bodyالإشعارات
تحديث إشعار
غيّر عنوان الإشعار ونصّه بعد إرساله أو جدولته.
POST
/
v1
/
{project-id}
/
notifications
/
{id}
/
update
تحديث إشعار
curl --request POST \
--url https://api.atelerix.dev/v1/{project-id}/notifications/{id}/update \
--header 'Content-Type: application/json' \
--header 'atelerix-api-key: <api-key>' \
--data '
{
"apiKey": "<string>",
"title": "<string>",
"body": "<string>"
}
'import requests
url = "https://api.atelerix.dev/v1/{project-id}/notifications/{id}/update"
payload = {
"apiKey": "<string>",
"title": "<string>",
"body": "<string>"
}
headers = {
"atelerix-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'atelerix-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>', title: '<string>', body: JSON.stringify('<string>')})
};
fetch('https://api.atelerix.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.atelerix.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",
"atelerix-api-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.atelerix.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("atelerix-api-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.atelerix.dev/v1/{project-id}/notifications/{id}/update")
.header("atelerix-api-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.atelerix.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["atelerix-api-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_bodyيعدّل
عند الفشل، تتبع الاستجابة الشكل الموثّق في رموز الأخطاء والنجاح.
title وbody لإشعار، باستخدام notificationId المُرجَع من
إرسال إشعار.
راجع مقدمة الـ API لإعداد الرابط الأساسي ومفتاحك الخاص قبل إرسال الطلبات.
كيف يتصرّف حسب الحالة
| الحالة الحالية | ما الذي يحدث |
|---|---|
scheduled | يُعدَّل مباشرة — لم يُرسَل شيء بعد، لذا فإن title/body الجديدين هما ما سيُسلَّم بمجرد حلول موعده. |
sent، failed، unsent | كان قد جرت محاولة تسليمه بالفعل، لذا فإن “التحديث” يعني إعادة التسليم فوراً بالمحتوى الجديد للمستلمين الحاليين (بالنسبة لموضوع، من هم مشتركون الآن — وليست لقطة قديمة). |
canceled | لا يمكن تحديثه — يُرجِع CANNOT_UPDATE_CANCELED_NOTIFICATION. |
المعاملات (Parameters)
string
مطلوب
معرّف مشروعك من إعدادات المشروع في لوحة التحكم.
string
مطلوب
notificationId المُرجَع عند إرسال الإشعار.string
مطلوب
مفتاحك الخاص من إعدادات المشروع.
string
مطلوب
عنوان الإشعار الجديد.
string
مطلوب
نص رسالة الإشعار الجديد.
الاستجابة (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"
// ...بقية حقول الإشعار
}
⌘I