Creates a new PSPAnnouncements client.
The request client to use.
Creates a new announcement that will be displayed on the specified public status page. Announcements can be used to communicate maintenance windows, incidents, or general updates to users.
Public status page ID (number or string)
Announcement configuration object (see PSPAnnouncementPayload interface for all options)
Promise that resolves to the created PSPAnnouncement object with assigned ID
// Create a maintenance announcement
const announcement = await service.psps.announcements.create(12345, {
title: 'Scheduled Maintenance',
message: 'We will be performing scheduled maintenance on Sunday at 2 AM UTC.',
status: 'PUBLISHED',
isPinned: true,
scheduledFor: '2023-11-05T02:00:00Z'
});
https://uptimerobot.com/api/v3/#post-/psps/-pspId-/announcements Official API Documentation
Fetches complete information about an individual announcement by ID, including title, message, status, publish dates, and visibility settings.
Promise that resolves to the PSPAnnouncement object
// Get announcement details
const announcement = await service.psps.announcements.get(12345, 67890);
console.log(`Announcement "${announcement.title}" is ${announcement.status}`);
https://uptimerobot.com/api/v3/#get-/psps/-pspId-/announcements/-id- Official API Documentation
Retrieves a list of announcements posted on a public status page. You can filter by status (offline, pending, published, archived) and paginate through results.
Public status page ID (number or string)
Optionalfilter: { cursor?: number; status?: string }Optional filtering and pagination parameters
Optionalcursor?: numberPagination cursor for next page
Optionalstatus?: stringFilter by announcement status ('OFFLINE', 'PENDING', 'PUBLISHED', 'ARCHIVED')
OptionalreturnFullResponse: falseReturns PSPAnnouncement[] by default, or URFullResponse<PSPAnnouncement> if returnFullResponse is true.
// Get all announcements for a status page
const announcements = await service.psps.announcements.list(12345);
// Filter by published announcements only
const published = await service.psps.announcements.list(12345, {
status: 'PUBLISHED'
});
// Paginate through results
const page1 = await service.psps.announcements.list(12345);
const page2 = await service.psps.announcements.list(12345, { cursor: 123456789 });
// Get full response for pagination
const response = await service.psps.announcements.list(12345, { status: 'PUBLISHED' }, true);
const nextUrl = new URL(response.nextLink);
const nextCursorVal = nextUrl.searchParams.get('cursor');
console.log(nextCursorVal);
https://uptimerobot.com/api/v3/#get-/psps/-pspId-/announcements Official API Documentation
Retrieves a list of announcements posted on a public status page. You can filter by status (offline, pending, published, archived) and paginate through results.
Public status page ID (number or string)
Optional filtering and pagination parameters
Optionalcursor?: numberPagination cursor for next page
Optionalstatus?: stringFilter by announcement status ('OFFLINE', 'PENDING', 'PUBLISHED', 'ARCHIVED')
Returns PSPAnnouncement[] by default, or URFullResponse<PSPAnnouncement> if returnFullResponse is true.
// Get all announcements for a status page
const announcements = await service.psps.announcements.list(12345);
// Filter by published announcements only
const published = await service.psps.announcements.list(12345, {
status: 'PUBLISHED'
});
// Paginate through results
const page1 = await service.psps.announcements.list(12345);
const page2 = await service.psps.announcements.list(12345, { cursor: 123456789 });
// Get full response for pagination
const response = await service.psps.announcements.list(12345, { status: 'PUBLISHED' }, true);
const nextUrl = new URL(response.nextLink);
const nextCursorVal = nextUrl.searchParams.get('cursor');
console.log(nextCursorVal);
https://uptimerobot.com/api/v3/#get-/psps/-pspId-/announcements Official API Documentation
Pins a specific announcement to make it appear prominently at the top of the status page. Pinned announcements remain visible above other content to ensure important messages are seen first.
Promise that resolves to true when pinning is successful
// Pin an important announcement
const success = await service.psps.announcements.pin(12345, 67890);
if (success) {
console.log('Announcement pinned successfully');
}
https://uptimerobot.com/api/v3/#post-/psps/-pspId-/announcements/-id-/pin Official API Documentation
Removes the pinned status from an announcement, allowing it to appear in normal chronological order with other announcements instead of being prominently displayed at the top.
Promise that resolves to true when unpinning is successful
// Unpin an announcement
const success = await service.psps.announcements.unpin(12345, 67890);
if (success) {
console.log('Announcement unpinned successfully');
}
https://uptimerobot.com/api/v3/#post-/psps/-pspId-/announcements/-id-/unpin Official API Documentation
Modifies the settings of an existing announcement. Only provided fields will be updated; omitted fields retain their current values. Changes take effect immediately on the status page.
Public status page ID (number or string)
Announcement ID (number or string)
Announcement configuration updates (partial PSPAnnouncementPayload object)
Promise that resolves to the updated PSPAnnouncement object
// Update announcement status and message
const updatedAnnouncement = await service.psps.announcements.update(12345, 67890, {
message: 'Maintenance completed successfully. All services are now operational.',
status: 'ARCHIVED'
});
https://uptimerobot.com/api/v3/#patch-/psps/-pspId-/announcements/-id- Official API Documentation
Client for the PSP Announcements API (
psps/{pspId}/announcements/...).Use via PSPs.announcements.
See
https://uptimerobot.com/api/v3 Official API Documentation
Since
1.0.0