OpenAPI Documentation
OpenAPI Documentation

Update a dynamic sub-account traffic limit

Update the lifetime cumulative traffic limit of a dynamic sub-account. The sub-account name does not change, and the response does not include the password.

API information

Item Value
Method PATCH
Path /open-api/v1/dynamic/accounts/{id}
Authentication X-API-Key
Content-Type application/json
Processing Synchronous

Path parameter

Parameter Type Required Description
id string Yes Dynamic sub-account ID

Request body

Field Type Required Description Constraints
limit_traffic_gb string Yes New lifetime cumulative traffic limit in GB Nonnegative plain decimal string with up to 6 decimal places; 0 changes the limit to unlimited

The request body cannot contain sub_account, user_enabled, or any other field.

Request example

curl --request PATCH \
  --url 'https://api-test.puraroute.com/gin/open-api/v1/dynamic/accounts/1912345678901234567' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <YOUR_API_KEY>' \
  --data '{
    "limit_traffic_gb": "20.000000"
  }'

Response fields

Field Type Nullable Description
id string No Dynamic sub-account ID
sub_account string No Sub-account name
limit_traffic_gb string No New traffic limit with 6 decimal places; 0.000000 means unlimited
lifetime_used_gb string No Lifetime cumulative traffic used
resource_status string No ACTIVE or REMOVED
user_enabled boolean No Caller-requested enabled state
flow_blocked boolean No Whether use is paused due to traffic-balance conditions
available boolean No Whether current conditions for use are met
control_pending boolean No Whether a state change is still being applied
update_time string No Update time in GMT+8 ISO-8601

Successful response example

{
  "code": 0,
  "msg": "success",
  "data": {
    "id": "1912345678901234567",
    "sub_account": "team_a_01",
    "limit_traffic_gb": "20.000000",
    "lifetime_used_gb": "1.250000",
    "resource_status": "ACTIVE",
    "user_enabled": true,
    "flow_blocked": false,
    "available": true,
    "control_pending": false,
    "update_time": "2026-08-24T15:40:00.000+08:00"
  },
  "next": null
}

Possible error codes

code Description
300001 The account does not exist or is inaccessible
300328 The account has been removed and cannot be changed
400001 Authentication failed
400009 The limit, path, or request body is invalid
500000 System processing failed; the request did not complete

On this page