Skip to main content

Announcements

These are the docs for the announcements endpoint, which is used for fetching announcements made on PasteMyst. These announcements are shown on the front page, usually to inform users of new releases.

Get the latest announcement​

Returns the most recent announcement.

GET /api/v3/announcements/latest

The content is actually markdown text.

Response​
{
"id": "hguyfnvh",
"createdAt": "2025-03-02T19:06:29.538Z",
"title": "new pastemyst release",
"content": "a **new** pastemyst version has just been released!"
}

Get all announcements​

Returns all of the announcements.

GET /api/v3/announcements

The content is actually markdown text.

Response​
[
{
"id": "hguyfnvh",
"createdAt": "2025-03-02T19:06:29.538Z",
"title": "new pastemyst release",
"content": "a **new** pastemyst version has just been released!"
}
]

Create a new announcement​

Creates a new announcement to be shown on the front page. You must be logged in as an admin user to create announcements.

POST /api/v3/announcements

The content is actually markdown text.

Request​
{
"title": "new pastemyst release",
"content": "a **new** pastemyst version has just been released!"
}

Edit an announcement​

Edits a specific announcement. You must be logged in as an admin user to create announcements.

PATCH /api/v3/announcements/:id

The content is actually markdown text.

Request​
{
"title": "new pastemyst release",
"content": "a **new** pastemyst version has just been released!"
}

Delete an announcement​

Deletes a single announcement. You must be logged in as an admin user to create announcements.

DELET /api/v3/announcements/:id

The content is actually markdown text.