Ticket Announcements
The five endpoints that publish and manage the announcements shown in the support area.
Overview
Announcements are banners hung across the support area as a whole rather than on one ticket. They carry things like planned maintenance, a passing outage or news of a new service. A client sees them on reaching the support page.
Who sees one is narrowed by four targeting fields: country, language, product group and server. Leave them all out and the announcement is open to everyone; fill one in and only clients matching it see it.
When it shows comes from two dates and a switch. The dates draw the window and the switch turns the whole thing on or off, and the two work together.
Reference
Listing the Announcements
Returns the announcements shown in the support area.
info, warning, danger, success.curl 'https://panel.example.com/api/v1/admin/tickets/announcements' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.example.com/api/v1/admin/tickets/announcements', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.example.com/api/v1/admin/tickets/announcements');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// The list is NOT filtered: past, future and switched-off announcements come back too.
$all = Api::Tickets()->GetTicketAnnouncements()['data'];
$live = array_filter($all, fn ($a) => $a['status']);Creating an Announcement
Publishes a new announcement for clients to see.
info, warning, danger, success. The info tone by default.curl -X POST 'https://panel.example.com/api/v1/admin/tickets/announcements' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"title":"Planli bakim","message":"02:00-03:00 arasi kesinti olacak.","type":"warning"}'const res = await fetch('https://panel.example.com/api/v1/admin/tickets/announcements', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
title: 'Scheduled maintenance',
message: 'We will be down between 02:00 and 03:00.',
type: 'warning',
is_popup: true,
}),
});
const body = await res.json();$ch = curl_init('https://panel.example.com/api/v1/admin/tickets/announcements');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Scheduled maintenance',
'message' => 'We will be down between 02:00 and 03:00.',
'type' => 'warning',
'is_popup' => true,
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Leave the status out and the announcement is born LIVE and shows at once; set dates first.
Api::Tickets()->CreateTicketAnnouncement([
'title' => 'Scheduled maintenance',
'message' => $text,
'start_date' => '2026-02-01 02:00:00',
'end_date' => '2026-02-01 03:00:00',
]);Reading One Announcement
Returns a single announcement.
info, warning, danger, success.curl 'https://panel.example.com/api/v1/admin/tickets/announcements/4' \
-H "Authorization: Bearer $API_KEY"const res = await fetch(`https://panel.example.com/api/v1/admin/tickets/announcements/${aid}`, {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.example.com/api/v1/admin/tickets/announcements/' . $aid);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Whether an announcement shows RIGHT NOW comes from the status and the dates together.
$a = Api::Tickets()->GetTicketAnnouncement(['aid' => $aid])['data'];Updating an Announcement
Changes the announcement fields you send.
info, warning, danger, success. The info tone by default.curl -X PATCH 'https://panel.example.com/api/v1/admin/tickets/announcements/4' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"status":false}'const res = await fetch(`https://panel.example.com/api/v1/admin/tickets/announcements/${aid}`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ status: false }),
});
const body = await res.json();$ch = curl_init('https://panel.example.com/api/v1/admin/tickets/announcements/' . $aid);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['status' => false]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// What you leave out is KEPT; switch the status off to silence one without removing it.
Api::Tickets()->UpdateTicketAnnouncement(['aid' => $aid, 'status' => false]);Deleting an Announcement
Removes an announcement.
curl -X DELETE 'https://panel.example.com/api/v1/admin/tickets/announcements/4' \
-H "Authorization: Bearer $API_KEY"const res = await fetch(`https://panel.example.com/api/v1/admin/tickets/announcements/${aid}`, {
method: 'DELETE',
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.example.com/api/v1/admin/tickets/announcements/' . $aid);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Rather than delete a past announcement, give it an END DATE: the record stays, the showing stops.
Api::Tickets()->DeleteTicketAnnouncement(['aid' => $aid]);Pitfalls
Leave the status field out and the announcement is created live. With no dates either, clients begin seeing it that moment. There is no notion of a draft here. While preparing one, either send the status off or put the start date on a later day.
The listing endpoint returns every announcement, including ones that have expired, ones that have yet to start and ones switched off. It gives the set an operator manages rather than the set a client sees. To count what is live on a dashboard, weigh the status and both dates yourself.
Country, language, product group and server each shrink the audience. Filling more than one means all of them at once rather than any of them. A client who fails to match all four sees nothing. When an announcement reaches nobody, look at these fields first.
An announcement that opens as a window interrupts the client and stands in front of them until closed. For news that is not truly urgent, the banner tone does the job. An old announcement left as a window turns up months later in front of someone it no longer concerns. An end date prevents that.
Deleting a past announcement wipes it out, leaving no record of what you said and when. Giving it an end date or switching the status off stops the showing and leaves the record in place. When the same maintenance window comes round next month, updating the dates beats writing the text again.
Related Articles
Vielen Dank für Ihre Rückmeldung!
Unser Support-Team ist rund um die Uhr für Sie da, wenn Sie oben nicht fündig werden.