Saltar al contenido principal
POST
/
v1
/
notification
/
usage_alert
Update Usage Alert Config
import requests

url = "http://localhost:3000/v1/notification/usage_alert"

payload = {
    "enabled": True,
    "percent": 50,
    "notification_email": "jsmith@example.com"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "enabled": true,
  "percent": 50,
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
enabled
boolean
required

Whether the usage alert is enabled

percent
integer
required

Percentage of included minutes USED at which the alert will fire (1-99)

Rango requerido: 1 <= x <= 99
notification_email
string<email>
required

The email address to send usage alert notifications to

Response

Successful Response

id
string<uuid>
required

The unique identifier for the notification

enabled
boolean
required

Whether the usage alert is enabled

percent
integer
required

Percentage of included minutes USED at which the alert is triggered (1-99)

Rango requerido: 1 <= x <= 99
updated_at
string<date-time>
required

The timestamp when the configuration was last updated