RequestRocketRequestRocketDocs
ObserveAlerts

Alerts API

Create a standalone alert predicate.

Proxy and MCP servers have their own alert collections. An alert policy on another record is a field of that record, not a second route. Path, header, query, body, and token matches are on Predicates.

Endpoints

MethodPathWhat it does
GET/api/clients/:clientId/proxies/:proxyId/alertsList proxy alerts
POST/api/clients/:clientId/proxies/:proxyId/alertsCreate a proxy alert
PUT/api/clients/:clientId/proxies/:proxyId/alerts/:alertIdUpdate a proxy alert
DELETE/api/clients/:clientId/proxies/:proxyId/alerts/:alertIdDelete a proxy alert
GET/api/clients/:clientId/mcps/:mcpId/alertsList MCP alerts
POST/api/clients/:clientId/mcps/:mcpId/alertsCreate an MCP alert
PUT/api/clients/:clientId/mcps/:mcpId/alerts/:alertIdUpdate an MCP alert
DELETE/api/clients/:clientId/mcps/:mcpId/alerts/:alertIdDelete an MCP alert

Create a proxy alert

POST /api/clients/:clientId/proxies/:proxyId/alerts creates a standalone alert. Cadence is required when alerts are enabled.

Request

curl -X POST "https://api.requestrocket.com/api/clients/:clientId/proxies/:proxyId/alerts" \
  -H "Authorization: u-your-token" \
  -H "Content-Type: application/json" \
  -d '{
  "alertActive": true,
  "alertMode": "all",
  "alerts": {
    "enabled": true,
    "cadence": "day"
  }
}'
import axios from "axios";

const response = await axios.request({
  method: "POST",
  url: "https://api.requestrocket.com/api/clients/:clientId/proxies/:proxyId/alerts",
  headers: {
    "Authorization": "u-your-token",
    "Content-Type": "application/json",
  },
  data: {
  "alertActive": true,
  "alertMode": "all",
  "alerts": {
    "enabled": true,
    "cadence": "day"
  }
}
});

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

response = requests.request(
    "POST",
    "https://api.requestrocket.com/api/clients/:clientId/proxies/:proxyId/alerts",
    headers={
        "Authorization": "u-your-token",
        "Content-Type": "application/json",
    },
    data="{\n  \"alertActive\": true,\n  \"alertMode\": \"all\",\n  \"alerts\": {\n    \"enabled\": true,\n    \"cadence\": \"day\"\n  }\n}"
)
print(response.status_code, response.json())
package main

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

func main() {
    payload := strings.NewReader(`{
  "alertActive": true,
  "alertMode": "all",
  "alerts": {
    "enabled": true,
    "cadence": "day"
  }
}`)
    req, _ := http.NewRequest("POST", "https://api.requestrocket.com/api/clients/:clientId/proxies/:proxyId/alerts", 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/clients/:clientId/proxies/:proxyId/alerts"))
            .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"alertActive\": true,\n  \"alertMode\": \"all\",\n  \"alerts\": {\n    \"enabled\": true,\n    \"cadence\": \"day\"\n  }\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

{
  "alerts": [
    {
      "pKey": "5d8a1c30-4e72-4b19-8f6a-0c3d9e7b1a25",
      "sKey": "0d4f8b21-6a35-4e70-9c1d-5b3a7f2e8c64",
      "parentId": "5d8a1c30-4e72-4b19-8f6a-0c3d9e7b1a25",
      "userId": "0f8e6c1a-2b7d-4c3e-9a55-1d2e3f4a5b6c",
      "clientId": "b3a1c7d2-5e44-4f0a-9c1e-7d2f8a6b1c90",
      "alertRegion": "us-east-2",
      "alertActive": true,
      "alertMode": "all",
      "effect": null,
      "methods": null,
      "path": null,
      "query": null,
      "headers": null,
      "body": null,
      "token": null,
      "responseHeaders": null,
      "responseBody": null,
      "responseStatus": null,
      "variables": null,
      "priority": 0,
      "notes": null,
      "alerts": {
        "enabled": true,
        "cadence": "day"
      },
      "createdAt": "2026-11-02T07:30:00.000Z",
      "updatedAt": "2026-11-02T07:30:00.000Z"
    }
  ],
  "message": "Success"
}
{
  "message": "alerts.cadence is required when alerts.enabled is true"
}
{
  "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"
}

The same body creates an MCP alert at POST /api/clients/:clientId/mcps/:mcpId/alerts. An MCP server that uses a backing proxy responds with 409. Configure its alerts on the proxy.

Returns

The response contains the created alert in alerts, with message set to Success.

Response attributes

AttributeTypeDescription
alertsarrayThe alert that was created. A list returns every alert on the parent.
messagestringSuccess on a completed call.
pKeystringParent id. The proxy id or the MCP server id.
sKeystringAlert id.
parentIdstringCopy of pKey.
clientIdstringOrganisation id.
userIdstringUser who created the alert.
alertRegionstringRegion copied from the parent.
createdAtstringISO-8601 time the alert was created.
updatedAtstringISO-8601 time the alert was last written.

Request fields are returned with the same names. Predicate fields you omit come back as null.

Request body

ParameterTypeRequiredDescription
alertActiveboolean✓When true, the alert can match. An inactive alert is stored and skipped at evaluation.
alertModestring✓all matches every call. conditional matches from the predicates and effect.
effectstringinclude or exclude. Used when alertMode is conditional. include matches when the predicates match. exclude matches when they do not. Omitted means include.
methodsstring[]HTTP methods: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS. Empty matches every method.
pathobjectPath predicate. See Predicates.
queryobject[]Query-parameter predicates.
headersobject[]Request-header predicates.
bodyobject[]JSON request-body predicates.
tokenobject[]JWT claim predicates on the inbound credential.
responseHeadersobject[]Header predicates on the target response.
responseBodyobject[]Body predicates on the target response.
responseStatusobject[]Status predicates on the target response.
variablesobject[]Names pulled from the call and reused inside patterns.
prioritynumberHigher numbers are evaluated first. Omitted means 0.
notesstringFree-text note stored on the alert.
alertsobject✓Delivery policy. cadence is required when alerts.enabled is true.

alerts

ParameterTypeRequiredDescription
enabledboolean✓When true, matches are included in cadence digests.
cadencestringminute, hour, day, or month. Required when enabled is true.
notifyTriggerstringexceed, predicate_match, or threshold. Applies to meters.
alertThresholdobjectMeter windows minute, hour, day, and month. Used when a meter's notifyTrigger is threshold.
alertNotestringContext forwarded to the digest and the notification inbox. Maximum 500 characters.

Update an alert

PUT /api/clients/:clientId/proxies/:proxyId/alerts/:alertId updates one proxy alert. The MCP path is PUT /api/clients/:clientId/mcps/:mcpId/alerts/:alertId.

All fields are optional. Omit a field to leave it unchanged; send null to clear it.

Returns

The response contains the updated alert in alerts, with message set to Success. Enabling alerts still requires cadence on the policy that is saved.

Request body

ParameterTypeRequiredDescription
alertActivebooleanWhen true, the alert can match.
alertModestringall or conditional.
effectstringinclude or exclude.
methodsstring[]HTTP methods: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS.
pathobjectPath predicate. See Predicates.
queryobject[]Query-parameter predicates.
headersobject[]Request-header predicates.
bodyobject[]JSON request-body predicates.
tokenobject[]JWT claim predicates.
responseHeadersobject[]Header predicates on the target response.
responseBodyobject[]Body predicates on the target response.
responseStatusobject[]Status predicates on the target response.
variablesobject[]Names pulled from the call and reused inside patterns.
prioritynumberHigher numbers are evaluated first.
notesstringFree-text note stored on the alert.
alertsobjectDelivery policy. Same fields as create. cadence is required when the saved policy has enabled set to true.

List alerts

GET /api/clients/:clientId/proxies/:proxyId/alerts returns every alert on that proxy. The MCP path is GET /api/clients/:clientId/mcps/:mcpId/alerts. Append the alert id to read one.

Returns

The response contains those alerts in alerts, with message set to Success. The list is the full collection for that parent.

Next

On this page