Grant quota directly
POST
/api/v1/users/{id}/add-traffic
prm_users_add_traffic
Adds bytes and/or seconds to the subscriber's remaining period quota without pricing or charging anything, and drops the hot-path quota cache so the grant applies on the next RADIUS request.
request_id is accepted here for your own tracing but is not enforced, because adding traffic is not naturally idempotent. Two calls add twice. Do not build a retry loop on this endpoint the way you would on deposit.
At a glance
- Authentication
- Staff token or session
- Requires permission
-
prm_users_add_trafficAdd traffic - Rate limit
t_mutate
Parameters
| Parameter | Description |
|---|---|
idrequired
path · integer
|
Subscriber id. |
bytes
body · integer
|
Bytes to add. At least one of bytes or seconds must be present and positive. |
seconds
body · integer
|
Seconds to add. |
Errors
| Code | When it is returned |
|---|---|
ERR_VALIDATION400
|
a negative value, or neither bytes nor seconds supplied |
ERR_NOT_FOUND404
|
no such subscriber |