RequestRocketRequestRocketDocs
PersonalNotifications

Personal notifications API

List and acknowledge notifications for a user.

The user id is the person the notification was sent to.

Endpoints

MethodPathWhat it does
GET/api/users/:userId/notificationsList user notifications
GET/api/users/:userId/notifications/:notificationIdRead one
PUT/api/users/:userId/notifications/:notificationIdAcknowledge one

List user notifications

GET /api/users/:userId/notifications lists notifications for that user.

Request

curl -X GET "https://api.requestrocket.com/api/users/:userId/notifications" \
  -H "Authorization: u-your-token"
import axios from "axios";

const response = await axios.request({
  method: "GET",
  url: "https://api.requestrocket.com/api/users/:userId/notifications",
  headers: {
    "Authorization": "u-your-token",
  }
});

console.log(response.status, response.data);
import requests

response = requests.request(
    "GET",
    "https://api.requestrocket.com/api/users/:userId/notifications",
    headers={
        "Authorization": "u-your-token",
    }
)
print(response.status_code, response.json())
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    var payload io.Reader
    req, _ := http.NewRequest("GET", "https://api.requestrocket.com/api/users/:userId/notifications", payload)
    req.Header.Set("Authorization", "u-your-token")
    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(resp.StatusCode, string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.requestrocket.com/api/users/:userId/notifications"))
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .header("Authorization", "u-your-token")
            .build();
        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode());
        System.out.println(response.body());
    }
}

Responses

{
  "userNotifications": [
    {
      "pKey": "0f8e6c1a-2b7d-4c3e-9a55-1d2e3f4a5b6c",
      "sKey": "b8e0c125-4a67-4d93-9f2c-1a5e7b3d0f86",
      "title": "Welcome",
      "message": "Your account is ready.",
      "createdAt": "2026-11-02T07:30:00.000Z",
      "read": false
    }
  ],
  "message": "Notifications retrieved successfully"
}
{
  "message": "Unauthorized"
}
{
  "Message": "User is not authorized to access this resource with an explicit deny in an identity-based policy"
}
{
  "message": "method / endpoint not supported"
}

Returns every notification for the user in userNotifications, plus message.

New notifications are written with a default DynamoDB expiry 90 days after dispatch unless the queued record supplies another TTL. Expiry removal is handled by DynamoDB and is not an exact deletion schedule.

Query parameters

None.

Response attributes

AttributeTypeDescription
userNotificationsarrayNotifications for the user.
userNotifications[].pKeystringUser id.
userNotifications[].sKeystringNotification id.
userNotifications[].titlestringTitle.
userNotifications[].messagestringBody, in Markdown.
userNotifications[].createdAtstringISO 8601 creation time.
userNotifications[].createdBystring or nullUser id of the creator, when set.
userNotifications[].readbooleanWhether the notification has been acknowledged.
userNotifications[].readAtstring or nullWhen it was acknowledged.
messagestringNotifications retrieved successfully.

Acknowledge a notification

PUT /api/users/:userId/notifications/:notificationId sets the read flag. isRead is optional. Omit it to leave read unchanged. A successful call sets readAt to the current time.

Request

curl -X PUT "https://api.requestrocket.com/api/users/:userId/notifications/:notificationId" \
  -H "Authorization: u-your-token" \
  -H "Content-Type: application/json" \
  -d '{
  "isRead": true
}'
import axios from "axios";

const response = await axios.request({
  method: "PUT",
  url: "https://api.requestrocket.com/api/users/:userId/notifications/:notificationId",
  headers: {
    "Authorization": "u-your-token",
    "Content-Type": "application/json",
  },
  data: {
  "isRead": true
}
});

console.log(response.status, response.data);
import requests

response = requests.request(
    "PUT",
    "https://api.requestrocket.com/api/users/:userId/notifications/:notificationId",
    headers={
        "Authorization": "u-your-token",
        "Content-Type": "application/json",
    },
    data="{\n  \"isRead\": true\n}"
)
print(response.status_code, response.json())
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    payload := strings.NewReader(`{
  "isRead": true
}`)
    req, _ := http.NewRequest("PUT", "https://api.requestrocket.com/api/users/:userId/notifications/:notificationId", payload)
    req.Header.Set("Authorization", "u-your-token")
    req.Header.Set("Content-Type", "application/json")
    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(resp.StatusCode, string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.requestrocket.com/api/users/:userId/notifications/:notificationId"))
            .method("PUT", HttpRequest.BodyPublishers.ofString("{\n  \"isRead\": true\n}"))
            .header("Authorization", "u-your-token")
            .header("Content-Type", "application/json")
            .build();
        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode());
        System.out.println(response.body());
    }
}

Responses

{
  "notification": {
    "pKey": "0f8e6c1a-2b7d-4c3e-9a55-1d2e3f4a5b6c",
    "sKey": "b8e0c125-4a67-4d93-9f2c-1a5e7b3d0f86",
    "title": "Welcome",
    "message": "Your account is ready.",
    "createdAt": "2026-11-02T07:30:00.000Z",
    "read": true,
    "readAt": "2026-11-02T08:00:00.000Z"
  },
  "message": "Notification read status updated successfully"
}
{
  "message": "Notification not found"
}

Request body

ParameterTypeRequiredDescription
isReadbooleantrue marks the notification read. false marks it unread. Omit it to leave read unchanged.

Returns the notification and message set to Notification read status updated successfully. Notification fields match List user notifications. The object is under notification.

Shared status codes, the 5.5 MB cap, and plan rate limits are on Platform limits.

Next

On this page