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
| Method | Path | What it does |
|---|---|---|
| GET | /api/clients/:clientId/proxies/:proxyId/alerts | List proxy alerts |
| POST | /api/clients/:clientId/proxies/:proxyId/alerts | Create a proxy alert |
| PUT | /api/clients/:clientId/proxies/:proxyId/alerts/:alertId | Update a proxy alert |
| DELETE | /api/clients/:clientId/proxies/:proxyId/alerts/:alertId | Delete a proxy alert |
| GET | /api/clients/:clientId/mcps/:mcpId/alerts | List MCP alerts |
| POST | /api/clients/:clientId/mcps/:mcpId/alerts | Create an MCP alert |
| PUT | /api/clients/:clientId/mcps/:mcpId/alerts/:alertId | Update an MCP alert |
| DELETE | /api/clients/:clientId/mcps/:mcpId/alerts/:alertId | Delete 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": "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
| Attribute | Type | Description |
|---|---|---|
alerts | array | The alert that was created. A list returns every alert on the parent. |
message | string | Success on a completed call. |
pKey | string | Parent id. The proxy id or the MCP server id. |
sKey | string | Alert id. |
parentId | string | Copy of pKey. |
clientId | string | Organisation id. |
userId | string | User who created the alert. |
alertRegion | string | Region copied from the parent. |
createdAt | string | ISO-8601 time the alert was created. |
updatedAt | string | ISO-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
| Parameter | Type | Required | Description |
|---|---|---|---|
alertActive | boolean | ✓ | When true, the alert can match. An inactive alert is stored and skipped at evaluation. |
alertMode | string | ✓ | all matches every call. conditional matches from the predicates and effect. |
effect | string | include or exclude. Used when alertMode is conditional. include matches when the predicates match. exclude matches when they do not. Omitted means include. | |
methods | string[] | HTTP methods: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS. Empty matches every method. | |
path | object | Path predicate. See Predicates. | |
query | object[] | Query-parameter predicates. | |
headers | object[] | Request-header predicates. | |
body | object[] | JSON request-body predicates. | |
token | object[] | JWT claim predicates on the inbound credential. | |
responseHeaders | object[] | Header predicates on the target response. | |
responseBody | object[] | Body predicates on the target response. | |
responseStatus | object[] | Status predicates on the target response. | |
variables | object[] | Names pulled from the call and reused inside patterns. | |
priority | number | Higher numbers are evaluated first. Omitted means 0. | |
notes | string | Free-text note stored on the alert. | |
alerts | object | ✓ | Delivery policy. cadence is required when alerts.enabled is true. |
alerts
| Parameter | Type | Required | Description |
|---|---|---|---|
enabled | boolean | ✓ | When true, matches are included in cadence digests. |
cadence | string | minute, hour, day, or month. Required when enabled is true. | |
notifyTrigger | string | exceed, predicate_match, or threshold. Applies to meters. | |
alertThreshold | object | Meter windows minute, hour, day, and month. Used when a meter's notifyTrigger is threshold. | |
alertNote | string | Context 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
| Parameter | Type | Required | Description |
|---|---|---|---|
alertActive | boolean | When true, the alert can match. | |
alertMode | string | all or conditional. | |
effect | string | include or exclude. | |
methods | string[] | HTTP methods: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS. | |
path | object | Path predicate. See Predicates. | |
query | object[] | Query-parameter predicates. | |
headers | object[] | Request-header predicates. | |
body | object[] | JSON request-body predicates. | |
token | object[] | JWT claim predicates. | |
responseHeaders | object[] | Header predicates on the target response. | |
responseBody | object[] | Body predicates on the target response. | |
responseStatus | object[] | Status predicates on the target response. | |
variables | object[] | Names pulled from the call and reused inside patterns. | |
priority | number | Higher numbers are evaluated first. | |
notes | string | Free-text note stored on the alert. | |
alerts | object | Delivery 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.