Alerts
Modify subscription alert
Updates the configuration of an existing subscription alert.
put/subscriptions/{external_subscription_id}/alerts/{alert_code}
Request
- Base URLhttps://api-m.sandbox.paypal.com
- AuthOAuth 2Client credentialsToken URL/api/oauth-proxyScopesread, write
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
external_subscription_idstring required
Example:SUB_1752779018503
Unique external identifier for the subscription. This ID is used to track the subscription across systems and must be provided to access subscription-specific alerts.
alert_codestring required
Example:ALERT_CODE_1234567890
Unique identifier code for the specific alert within the subscription context. This code is customer-defined during alert creation and used for all subsequent operations on the alert.
Request body
Example request
{
"code": "api_calls_usage_alerts",
"metric_code": "api_calls",
"name": "Usage alerts for API calls",
"thresholds": [
{
"code": "warn",
"value": "80.0"
}
]
}Response
Alert configuration successfully updated with the provided changes.
Example response
{
"id": "fb2d17b8-c66d-4269-b38e-9d62d37812e3",
"external_subscription_id": "sub_external_12345",
"metric": {
"type": "METERED",
"aggregation_type": "SUM",
"created_at": "2023-10-01T12:00:00Z",
"updated_at": "2023-10-01T12:00:00Z"
},
"type": "CURRENT_USAGE_AMOUNT",
"code": "tokens_usage_alert",
"name": "Tokens Usage Alert",
"previous_value": 75.52,
"last_processed_at": "2023-10-01T12:00:00Z",
"thresholds": [
{
"code": "warn",
"value": "80",
"recurring": false
}
],
"created_at": "2023-10-01T12:00:00Z"
}Changes
No recorded changes to this operation across all 1 revision of this API.