Skip to main content
PATCH
/
organizations
/
{organization_id}
/
alerts
/
subscriptions
/
{subscription_id}
/
usage
Update usage alerts.
curl --request PATCH \
  --url {schemes}://api.upsun.com/organizations/{organization_id}/alerts/subscriptions/{subscription_id}/usage \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "alerts": [
    {
      "id": "<string>",
      "active": true,
      "config": {
        "threshold": 123
      }
    }
  ]
}
'
{
  "current": [
    {
      "id": "<string>",
      "active": true,
      "alerts_sent": 123,
      "last_alert_at": "<string>",
      "updated_at": "<string>",
      "config": {
        "threshold": {
          "formatted": "<string>",
          "amount": 123,
          "unit": "<string>"
        }
      }
    }
  ],
  "available": [
    {
      "id": "<string>",
      "active": true,
      "alerts_sent": 123,
      "last_alert_at": "<string>",
      "updated_at": "<string>",
      "config": {
        "threshold": {
          "formatted": "<string>",
          "amount": 123,
          "unit": "<string>"
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Path Parameters

organization_id
string
required

The ID of the organization.
Prefix with name= to retrieve the organization by name instead.

subscription_id
string
required

The ID of the subscription.

Body

application/json
alerts
object[]

The list of alerts to update.

Response

OK

current
object[]

The list of currently set usage alerts.

available
object[]

The list of available usage alerts.