GET /api/userinfo/{hcid}
const url = 'https://client.example.com/api/userinfo/0446'; const options = { method: 'GET', headers: { "Content-Type": "application/json", "Authorization": `hcla_ssiFTXhBkCurmomIsGaYqlMx58vBByGM` }, }; const response = await fetch(url, options); const data = await response.json(); console.log(data);
curl -X GET \ 'https://client.example.com/api/userinfo/0446' \ -H 'Content-Type: application/json' \ -H 'Authorization: hcla_ssiFTXhBkCurmomIsGaYqlMx58vBByGM'
<?php $url = 'https://client.example.com/api/userinfo/0446'; $options = [ 'http' => [ 'method' => 'GET', 'header' => 'Content-Type: application/json' . "\r\n" . 'Authorization: hcla_ssiFTXhBkCurmomIsGaYqlMx58vBByGM' ] ]; $context = stream_context_create($options); $response = file_get_contents($url, false, $context); $data = json_decode($response); print_r($data); ?>
import requests url = 'https://client.example.com/api/userinfo/0446' headers = { "Content-Type": "application/json", 'Authorization': 'hcla_ssiFTXhBkCurmomIsGaYqlMx58vBByGM' } response = requests.get(url, headers=headers) data = response.json() print(data)
{ status: 'success', package: { name: 'Default', ram: 10240, disk: 20480, cpu: 400, servers: 10, databases: 10, backups: 10, allocations: 20 }, extra: { ram: 0, disk: 0, cpu: 0, servers: 0, databases: 0, backups: 0, allocations: 0 }, pterodactyl: { object: 'user', attributes: { id: 2, external_id: null, uuid: 'xnxx-xxxx-xxx-xxx-xxxx', username: 'crazymath072', email: '[email protected]', first_name: 'CR072', last_name: 'discord-auth', language: 'en', root_admin: true, '2fa': false, created_at: '2023-07-21T14:51:13+00:00', updated_at: '2023-09-08T11:43:44+00:00', relationships: [Object] } }, userinfo: { id: '863452735998656512', hcid: '0446', name: 'CR072', username: 'crazymath072', discriminator: '0', avatar: '165df7bff7757ab60f0fb6d641956055', profile: 'https://cdn.discordapp.com/avatars/863452735998656512/165df7bff7757ab60f0fb6d641956055', public_flags: 64, flags: 64, banner: null, accent_color: 2303016, avatar_decoration_data: null, banner_color: '#232428', mfa_enabled: true, locale: 'en-US', premium_type: 0, email: '[email protected]', verified: true }, coins: 1000 }
GET /api/package/{hcid}
const url = 'https://client.example.com/api/package/0446'; const options = { method: 'GET', headers: { "Content-Type": "application/json", "Authorization": `YOUR_API_KEY` }, }; const response = await fetch(url, options); const data = await response.json(); console.log(data);
curl -X GET \ 'https://client.example.com/api/package/0446' \ -H 'Content-Type: application/json' \ -H 'Authorization: hcla_ssiFTXhBkCurmomIsGaYqlMx58vBByGM'
<?php $url = 'https://client.example.com/api/package/0446'; $options = [ 'http' => [ 'method' => 'GET', 'header' => 'Content-Type: application/json' . "\r\n" . 'Authorization: hcla_ssiFTXhBkCurmomIsGaYqlMx58vBByGM' ] ]; $context = stream_context_create($options); $response = file_get_contents($url, false, $context); $data = json_decode($response); print_r($data); ?>
import requests url = 'https://client.example.com/api/package/0446' headers = { "Content-Type": "application/json", 'Authorization': 'hcla_ssiFTXhBkCurmomIsGaYqlMx58vBByGM' } response = requests.get(url, headers=headers) data = response.json() print(data)
{ status: 'success', package: 'Default' }
POST /api/coins/add
const url = 'https://client.example.com/api/coins/add'; const options = { method: 'POST', headers: { "Content-Type": "application/json", "Authorization": `YOUR_API_KEY` }, body: JSON.stringify({ coins: 100, user: '0446' }) }; const response = await fetch(url, options); const data = await response.json(); console.log(data);
curl -X POST \ https://client.example.com/api/coins/add \ -H 'Content-Type: application/json' \ -H 'Authorization: YOUR_API_KEY' \ -d '{ "coins": 100, "user": "0446" }'
<?php $url = 'https://client.example.com/api/coins/add'; $data = array( 'coins' => 100, 'user' => '0446' ); $options = array( 'http' => array( 'header' => "Content-Type: application/json\r\n", 'method' => 'POST', 'content' => json_encode($data) ) ); $context = stream_context_create($options); $response = file_get_contents($url, false, $context); if ($response === false) { echo 'Error'; } else { echo $response; } ?>
import requests url = 'https://client.example.com/api/coins/add' headers = { "Content-Type": "application/json", 'Authorization': 'YOUR_API_KEY' } data = { 'coins': 100, 'user': '0446' } response = requests.post(url, headers=headers, json=data) print(response.json())
{ status: 'success' }
POST /api/coins/set
const url = 'https://client.example.com/api/coins/set'; const options = { method: 'POST', headers: { "Content-Type": "application/json", "Authorization": `YOUR_API_KEY` }, body: JSON.stringify({ coins: 100, user: '0446' }) }; const response = await fetch(url, options); const data = await response.json(); console.log(data);
curl -X POST \ https://client.example.com/api/coins/set \ -H 'Content-Type: application/json' \ -H 'Authorization: YOUR_API_KEY' \ -d '{ "coins": 100, "user": "0446" }'
<?php $url = 'https://client.example.com/api/coins/set'; $data = array( 'coins' => 100, 'user' => '0446' ); $options = array( 'http' => array( 'header' => "Content-Type: application/json\r\n", 'method' => 'POST', 'content' => json_encode($data) ) ); $context = stream_context_create($options); $response = file_get_contents($url, false, $context); if ($response === false) { echo 'Error'; } else { echo $response; } ?>
import requests url = 'https://client.example.com/api/coins/set' headers = { "Content-Type": "application/json", 'Authorization': 'YOUR_API_KEY' } data = { 'coins': 100, 'user': '0446' } response = requests.post(url, headers=headers, json=data) print(response.json())
{ status: 'success' }
POST /api/coins/remove
const url = 'https://client.example.com/api/coins/remove'; const options = { method: 'POST', headers: { "Content-Type": "application/json", "Authorization": `YOUR_API_KEY` }, body: JSON.stringify({ coins: 100, user: '0446' }) }; const response = await fetch(url, options); const data = await response.json(); console.log(data);
curl -X POST \ https://client.example.com/api/coins/remove \ -H 'Content-Type: application/json' \ -H 'Authorization: YOUR_API_KEY' \ -d '{ "coins": 100, "user": "0446" }'
<?php $url = 'https://client.example.com/api/coins/remove'; $data = array( 'coins' => 100, 'user' => '0446' ); $options = array( 'http' => array( 'header' => "Content-Type: application/json\r\n", 'method' => 'POST', 'content' => json_encode($data) ) ); $context = stream_context_create($options); $response = file_get_contents($url, false, $context); if ($response === false) { echo 'Error'; } else { echo $response; } ?>
import requests url = 'https://client.example.com/api/coins/remove' headers = { "Content-Type": "application/json", 'Authorization': 'YOUR_API_KEY' } data = { 'coins': 100, 'user': '0446' } response = requests.post(url, headers=headers, json=data) print(response.json())
{ status: 'success' }
POST /api/coupons/create
const url = 'https://client.example.com/api/coins/remove'; const options = { method: 'POST', headers: { "Content-Type": "application/json", "Authorization": `YOUR_API_KEY` }, body: JSON.stringify({ "code": "COUPON_CODE", // Specify the coupon name "coins": 100, // Specify the number of coins for the coupon "ram": 2048, // Specify the amount of RAM for the coupon (in MB) "disk": 3072 // Specify the disk space for the coupon (in MB) "cpu": 2, // Specify the CPU limit for the coupon (percentage) "servers": 3, // Specify the number of servers for the coupon "backups": 5, // Specify the number of backups for the coupon "allocations": 6, // Specify the number of allocations for the coupon "databases": 2, // Specify the number of databases for the coupon "uses": 2 // Specify the number of times this coupon can be claimed }) }; const response = await fetch(url, options); const data = await response.json(); console.log(data);
curl -X POST "https://client.example.com/api/coins/remove" \ -H "Content-Type: application/json" \ -H "Authorization: YOUR_API_KEY" \ -d '{ "code": "COUPON_CODE", "coins": 100, "ram": 2048, "disk": 3072, "cpu": 2, "servers": 3, "backups": 5, "allocations": 6, "databases": 2, "uses": 2 }'
<?php $url = 'https://client.example.com/api/coins/remove'; $headers = [ 'Content-Type: application/json', 'Authorization: YOUR_API_KEY' ]; $data = [ 'code' => 'COUPON_CODE', 'coins' => 100, 'ram' => 2048, 'disk' => 3072, 'cpu' => 2, 'servers' => 3, 'backups' => 5, 'allocations' => 6, 'databases' => 2, 'uses' => 2 ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if ($response === false) { echo 'cURL Error: ' . curl_error($ch); } else { $responseData = json_decode($response, true); print_r($responseData); } curl_close($ch); ?>
import requests url = 'https://client.example.com/api/coins/remove' headers = { "Content-Type": "application/json", 'Authorization': 'YOUR_API_KEY' } data = { 'code': 'COUPON_CODE', 'coins': 100, 'ram': 2048, 'disk': 3072, 'cpu': 2, 'servers': 3, 'backups': 5, 'allocations': 6, 'databases': 2, 'uses': 2 } response = requests.post(url, headers=headers, json=data) if response.status_code == 200: responseData = response.json() print(responseData) else: print('Request failed with status code:', response.status_code)
{ status: 'success', code: 'test' }
GET /api/coupons/revoke/{code}
const url = 'https://client.example.com/api/coupons/revoke/{code}'; const options = { method: 'GET', headers: { "Content-Type": "application/json", "Authorization": `YOUR_API_KEY` }, }; const response = await fetch(url, options); const data = await response.json(); console.log(data);
curl -X GET "https://client.example.com/api/coupons/revoke/{code}" \ -H "Content-Type: application/json" \ -H "Authorization: YOUR_API_KEY"
<?php $code = 'YOUR_COUPON_CODE'; // Replace with the actual coupon code $url = "https://client.example.com/api/coupons/revoke/$code"; $headers = [ 'Content-Type: application/json', 'Authorization: YOUR_API_KEY' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if ($response === false) { echo 'cURL Error: ' . htmlspecialchars(curl_error($ch)); } else { $responseData = json_decode($response, true); print_r($responseData); } curl_close($ch); ?>
import requests code = 'YOUR_COUPON_CODE' # Replace with the actual coupon code url = f'https://client.example.com/api/coupons/revoke/{code}' headers = { "Content-Type": "application/json", 'Authorization': 'YOUR_API_KEY' } response = requests.get(url, headers=headers) if response.status_code == 200: responseData = response.json() print(responseData) else: print('Request failed with status code:', response.status_code)
{ status: 'success' }
GET /api/coupons
const url = 'https://client.example.com/api/coupons'; const options = { method: 'GET', headers: { "Content-Type": "application/json", "Authorization": `YOUR_API_KEY` }, }; const response = await fetch(url, options); const data = await response.json(); console.log(data);
curl -X GET "https://client.example.com/api/coupons" \ -H "Content-Type: application/json" \ -H "Authorization: YOUR_API_KEY"
<?php $code = 'YOUR_COUPON_CODE'; // Replace with the actual coupon code $url = "https://client.example.com/api/coupons"; $headers = [ 'Content-Type: application/json', 'Authorization: YOUR_API_KEY' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if ($response === false) { echo 'cURL Error: ' . htmlspecialchars(curl_error($ch)); } else { $responseData = json_decode($response, true); print_r($responseData); } curl_close($ch); ?>
import requests url = f'https://client.example.com/api/coupons' headers = { "Content-Type": "application/json", 'Authorization': 'YOUR_API_KEY' } response = requests.get(url, headers=headers) if response.status_code == 200: responseData = response.json() print(responseData) else: print('Request failed with status code:', response.status_code)
{ status: 'success' }
POST /api/resources/set
const url = 'https://client.example.com/api/resources/set'; const options = { method: 'POST', headers: { "Content-Type": "application/json", "Authorization": `YOUR_API_KEY` }, body: JSON.stringify({ "user": '1234', "ram": '1', "disk": '1', "cpu": '1', "servers": '1', "backups": '1', "allocations": '1', "databases": '1' }) }; const response = await fetch(url, options); const data = await response.json(); console.log(data);
curl -X POST "https://client.example.com/api/resources/set" \ -H "Content-Type: application/json" \ -H "Authorization: YOUR_API_KEY" \ -d '{ "user": "1234", "ram": "1", "disk": "1", "cpu": "1", "servers": "1", "backups": "1", "allocations": "1", "databases": "1" }'
<?php $url = 'https://client.example.com/api/resources/set'; $data = [ "user" => '1234', "ram" => '1', "disk" => '1', "cpu" => '1', "servers" => '1', "backups" => '1', "allocations" => '1', "databases" => '1' ]; $options = [ 'http' => [ 'method' => 'POST', 'header' => "Content-Type: application/json\r\n" . "Authorization: YOUR_API_KEY\r\n", 'content' => json_encode($data) ] ]; $context = stream_context_create($options); $response = file_get_contents($url, false, $context); if ($response === FALSE) { echo 'Error: ' . $response; } else { echo $response; } ?>
import requests url = 'https://client.example.com/api/resources/set' headers = { "Content-Type": "application/json", 'Authorization': 'YOUR_API_KEY' } data = { "user": '1234', "ram": '1', "disk": '1', "cpu": '1', "servers": '1', "backups": '1', "allocations": '1', "databases": '1' } response = requests.post(url, headers=headers, json=data) if response.status_code == 200: print(response.json()) else: print('Error:', response.text)
{ status: 'success' }
POST /api/package/set
const url = 'https://client.example.com/api/package/set'; const options = { method: 'POST', headers: { "Content-Type": "application/json", "Authorization": `YOUR_API_KEY` }, body: JSON.stringify({ "user": '1234', "package": 'default' }) }; const response = await fetch(url, options); const data = await response.json(); console.log(data);
curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: YOUR_API_KEY" \ -d '{"user": "1234", "package": "default"}' \ https://client.example.com/api/package/set
<?php $url = 'https://client.example.com/api/package/set'; $api_key = 'YOUR_API_KEY'; $data = [ 'user' => '1234', 'package' => 'default' ]; $options = [ 'http' => [ 'header' => "Content-Type: application/json\r\n" . "Authorization: $api_key\r\n", 'method' => 'POST', 'content' => json_encode($data), ], ]; $context = stream_context_create($options); $response = file_get_contents($url, false, $context); if ($response === false) { echo 'Error: ' . error_get_last()['message']; } else { $data = json_decode($response); print_r($data); } ?>
import requests import json url = 'https://client.example.com/api/package/set' api_key = 'YOUR_API_KEY' data = { 'user': '1234', 'package': 'default' } headers = { "Content-Type": "application/json", 'Authorization': api_key } response = requests.post(url, headers=headers, data=json.dumps(data)) if response.status_code == 200: result = response.json() print(result) else: print('Error:', response.status_code) print(response.text)
{ status: 'success' }
GET /api/[total/used]/[disk/ram]
const url = 'https://client.example.com/api/[total/used]/[disk/ram]'; const options = { method: 'GET', headers: { "Content-Type": "application/json", "Authorization": `YOUR_API_KEY` }, }; const response = await fetch(url, options); const data = await response.json(); console.log(data);
curl -X GET "https://client.example.com/api/[total/used]/[disk/ram]" \ -H "Content-Type: application/json" \ -H "Authorization: YOUR_API_KEY"
<?php $code = 'YOUR_COUPON_CODE'; // Replace with the actual coupon code $url = "https://client.example.com/api/[total/used]/[disk/ram]"; $headers = [ 'Content-Type: application/json', 'Authorization: YOUR_API_KEY' ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if ($response === false) { echo 'cURL Error: ' . htmlspecialchars(curl_error($ch)); } else { $responseData = json_decode($response, true); print_r($responseData); } curl_close($ch); ?>
import requests url = f'https://client.example.com/api/[total/used]/[disk/ram]' headers = { "Content-Type": "application/json", 'Authorization': 'YOUR_API_KEY' } response = requests.get(url, headers=headers) if response.status_code == 200: responseData = response.json() print(responseData) else: print('Request failed with status code:', response.status_code)
{ status: 'success' }