Skip to content

Create Alert

Set the billing alert for certain usage amount in plan currency.

Endpoint

http
POST /api/subscriptions/billing-alert

Parameters

Body parameters

ParameterTypeRequiredDescription
amountintegeryesThe amount in plan currency that has to be reached

Request example

sh
curl --location --request POST 'https://files.ro/api/subscriptions/billing-alert' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data-raw '{
  "amount": 20
}'

Response

json
{
  "type": "success",
  "message": "Billing alert was stored successfully"
}
json
{
  "type": "error",
  "message": "You are not authorized"
}
json
{
  "message": "The given data was invalid.",
  "errors": {
    "field": [
      "The field is required."
    ]
  }
}
json
{
  "type": "error",
  "message": "You already have created billing alert."
}