Set SMS quota
Sets the SMS quota of an endpoint and replaces any existing SMS quota.
When apply_sms_quota is enabled in the service profile, the device needs an ACTIVE quota with volume left to use SMS services.
A new ACTIVE quota takes effect as soon as the request succeeds.
To top up a quota, retrieve the remaining volume, add the top-up volume, and send the sum as the new volume.
Send threshold_percentage again, or the earlier threshold volume stays in place.
If you set threshold_percentage, the system generates an “SMS quota threshold reached” event when the remaining volume drops below it.
When the volume runs out, the system generates an “SMS quota used up” event and blocks the device from using SMS services.
Throttling isn’t available as an action on quota exhaustion.
A request with action_on_exhaustion.id set to 2 fails with a 422 error.
Authentication
An auth_token should be provided to authenticate a session.
To obtain an auth_token, see the /api/v1/authenticate POST request.
Path parameters
Request
Status to set for the quota. To let the device use the quota, set id to 1.
Number of SMS in the quota. To top up a quota, send the remaining volume plus the top-up volume.
When the quota expires, in UTC.
Accepts YYYY-MM-DD HH:MM:SS or ISO 8601.
The API ignores any time zone offset and always reads the time as UTC.
Whether the quota refills daily with the last added volume.
0 disables auto-refill and 1 enables it.
You can also send false or true.
If you leave it out, a new quota has auto-refill disabled and an existing quota keeps its setting.
A top-up also changes the refill volume, because the quota refills to the last volume you sent.
Percentage of volume below which the system generates an “SMS quota threshold reached” event.
For example, 20 with a volume of 100 generates the event when fewer than 20 SMS remain.
If you leave it out, a new quota has no threshold and an existing quota keeps its earlier threshold volume, so include it in every top-up.