Update Bandwidth Auto Recharge settings
curl -X POST "https://api.5centscdn.com/v2/account/recharge" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"autorecharge_at": 85,
"autorecharge_id": 42
}'
import requests
import json
url = "https://api.5centscdn.com/v2/account/recharge"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"autorecharge_at": 85,
"autorecharge_id": 42
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/account/recharge", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"autorecharge_at": 85,
"autorecharge_id": 42
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"autorecharge_at": 85,
"autorecharge_id": 42
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/account/recharge", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/account/recharge')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"autorecharge_at": 85,
"autorecharge_id": 42
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Bandwidth Auto Recharge Updated"
}
/account/recharge
Target server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
Percentage of monthly bandwidth at which an addon package is auto-purchased. Set to 0 to disable auto recharge.
Addon service ID for the bandwidth package to auto-purchase. Required when autorecharge_at is non-zero.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Body
Percentage of monthly bandwidth at which an addon package is auto-purchased. Set to 0 to disable auto recharge.
0758595Addon service ID for the bandwidth package to auto-purchase. Required when autorecharge_at is non-zero.
42Responses
Operation outcome.
Human-readable description of the operation outcome.