Update default session limits
curl --request PATCH \
--url https://api.pingnetwork.io/customer/v2/customer/limits/session \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"downloaded_bytes": 10737418240,
"uploaded_bytes": 5368709120,
"download_speed": 31457280,
"upload_speed": 20971520
}
'import requests
url = "https://api.pingnetwork.io/customer/v2/customer/limits/session"
payload = {
"downloaded_bytes": 10737418240,
"uploaded_bytes": 5368709120,
"download_speed": 31457280,
"upload_speed": 20971520
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
downloaded_bytes: 10737418240,
uploaded_bytes: 5368709120,
download_speed: 31457280,
upload_speed: 20971520
})
};
fetch('https://api.pingnetwork.io/customer/v2/customer/limits/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pingnetwork.io/customer/v2/customer/limits/session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'downloaded_bytes' => 10737418240,
'uploaded_bytes' => 5368709120,
'download_speed' => 31457280,
'upload_speed' => 20971520
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pingnetwork.io/customer/v2/customer/limits/session"
payload := strings.NewReader("{\n \"downloaded_bytes\": 10737418240,\n \"uploaded_bytes\": 5368709120,\n \"download_speed\": 31457280,\n \"upload_speed\": 20971520\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.pingnetwork.io/customer/v2/customer/limits/session")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"downloaded_bytes\": 10737418240,\n \"uploaded_bytes\": 5368709120,\n \"download_speed\": 31457280,\n \"upload_speed\": 20971520\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pingnetwork.io/customer/v2/customer/limits/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"downloaded_bytes\": 10737418240,\n \"uploaded_bytes\": 5368709120,\n \"download_speed\": 31457280,\n \"upload_speed\": 20971520\n}"
response = http.request(request)
puts response.read_body{
"id": "sl_123456789",
"created_at": "2025-02-28T14:30:00.000Z",
"updated_at": "2025-02-28T14:30:00.000Z",
"downloaded_bytes": 10737418240,
"uploaded_bytes": 5368709120,
"download_speed": 31457280,
"upload_speed": 20971520
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Session Limits
Update default session limits
PATCH
/
customer
/
limits
/
session
Update default session limits
curl --request PATCH \
--url https://api.pingnetwork.io/customer/v2/customer/limits/session \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"downloaded_bytes": 10737418240,
"uploaded_bytes": 5368709120,
"download_speed": 31457280,
"upload_speed": 20971520
}
'import requests
url = "https://api.pingnetwork.io/customer/v2/customer/limits/session"
payload = {
"downloaded_bytes": 10737418240,
"uploaded_bytes": 5368709120,
"download_speed": 31457280,
"upload_speed": 20971520
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
downloaded_bytes: 10737418240,
uploaded_bytes: 5368709120,
download_speed: 31457280,
upload_speed: 20971520
})
};
fetch('https://api.pingnetwork.io/customer/v2/customer/limits/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pingnetwork.io/customer/v2/customer/limits/session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'downloaded_bytes' => 10737418240,
'uploaded_bytes' => 5368709120,
'download_speed' => 31457280,
'upload_speed' => 20971520
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pingnetwork.io/customer/v2/customer/limits/session"
payload := strings.NewReader("{\n \"downloaded_bytes\": 10737418240,\n \"uploaded_bytes\": 5368709120,\n \"download_speed\": 31457280,\n \"upload_speed\": 20971520\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.pingnetwork.io/customer/v2/customer/limits/session")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"downloaded_bytes\": 10737418240,\n \"uploaded_bytes\": 5368709120,\n \"download_speed\": 31457280,\n \"upload_speed\": 20971520\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pingnetwork.io/customer/v2/customer/limits/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"downloaded_bytes\": 10737418240,\n \"uploaded_bytes\": 5368709120,\n \"download_speed\": 31457280,\n \"upload_speed\": 20971520\n}"
response = http.request(request)
puts response.read_body{
"id": "sl_123456789",
"created_at": "2025-02-28T14:30:00.000Z",
"updated_at": "2025-02-28T14:30:00.000Z",
"downloaded_bytes": 10737418240,
"uploaded_bytes": 5368709120,
"download_speed": 31457280,
"upload_speed": 20971520
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Body
application/json
Session limits update request
Response
Session limits updated successfully
Unique identifier for the session limits
Example:
"sl_123456789"
Creation timestamp
Example:
"2025-02-28T14:30:00.000Z"
Last update timestamp
Example:
"2025-02-28T14:30:00.000Z"
Download limit in bytes
Example:
10737418240
Upload limit in bytes
Example:
5368709120
Download speed limit in bytes/s
Example:
31457280
Upload speed limit in bytes/s
Example:
20971520
⌘I