Back to Home

API Documentation

Base URL: https://api.rizzcode.id/api/v1

Authentication

All API requests require a Bearer token. Get your API key from the API Keys page.

curl -X GET "https://api.rizzcode.id/api/v1/account" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json"
}

response = requests.get(f"{BASE_URL}/account", headers=headers)
print(response.json())
$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';

$ch = curl_init("$baseUrl/account");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $apiKey",
        "Accept: application/json",
    ],
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($response);
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';

const response = await fetch(`${BASE_URL}/account`, {
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
});

const data = await response.json();
console.log(data);
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"

    req, _ := http.NewRequest("GET", baseURL+"/account", nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}

Rate Limiting

Rate limits vary by plan. Response headers include:

X-RateLimit-Limit Max requests per minute
X-RateLimit-Remaining Remaining requests in current window

When exceeded, API returns 429 Too Many Requests.

Error Codes

Code Error Description
401 unauthorized Missing or invalid API key
401 invalid_api_key API key not found in database
403 account_disabled Account has been deactivated
403 plan_expired Subscription plan has expired
403 install_limit_reached Monthly install limit exceeded
403 plan_restriction Feature not available on current plan
404 not_found Resource not found
422 validation_error Invalid request body
429 rate_limit_exceeded Rate limit exceeded

Install

POST/api/v1/installTrigger RDP install

Request Body:

Field Type Required Description
target_ip string Required IP address target server
ssh_user string Required SSH username
ssh_password string Required SSH password
image_id integer Required Windows image ID
windows_password string Required Windows password (min 6 char)
linode_token string Optional Linode/Akamai API token for cloud instances. See Linode integration.

Example Request

curl -X POST "https://api.rizzcode.id/api/v1/install" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "target_ip": "192.168.1.100",
    "ssh_user": "root",
    "ssh_password": "your_ssh_pass",
    "image_id": 1,
    "windows_password": "MyWinPass123",
    "linode_token": "your_linode_token_here"
  }'
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json",
}

response = requests.post(
    f"{BASE_URL}/install",
    headers={**headers, "Content-Type": "application/json"},
    json={
        "target_ip": "192.168.1.100",
        "ssh_user": "root",
        "ssh_password": "your_ssh_pass",
        "image_id": 1,
        "windows_password": "MyWinPass123",
        "linode_token": "your_linode_token_here"  # optional
    }
)

result = response.json()
print(f"Install code: {result['data']['install_code']}")
<?php

$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';

$payload = json_encode([
    'target_ip'        => '192.168.1.100',
    'ssh_user'         => 'root',
    'ssh_password'     => 'your_ssh_pass',
    'image_id'         => 1,
    'windows_password' => 'MyWinPass123',
    'linode_token'     => 'your_linode_token_here', // optional
]);

$ch = curl_init("$baseUrl/install");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => $payload,
    CURLOPT_HTTPHEADER     => [
        "Authorization: Bearer $apiKey",
        "Content-Type: application/json",
        "Accept: application/json",
    ],
]);

$result = json_decode(curl_exec($ch), true);
curl_close($ch);

echo "Install code: " . $result['data']['install_code'];
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';

const response = await fetch(`${BASE_URL}/install`, {
    method: 'POST',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    },
    body: JSON.stringify({
        target_ip: '192.168.1.100',
        ssh_user: 'root',
        ssh_password: 'your_ssh_pass',
        image_id: 1,
        windows_password: 'MyWinPass123',
        linode_token: 'your_linode_token_here' // optional
    })
});

const result = await response.json();
console.log('Install code:', result.data.install_code);
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"

    payload := strings.NewReader(`{
        "target_ip": "192.168.1.100",
        "ssh_user": "root",
        "ssh_password": "your_ssh_pass",
        "image_id": 1,
        "windows_password": "MyWinPass123",
        "linode_token": "your_linode_token_here"
    }`)

    req, _ := http.NewRequest("POST", baseURL+"/install", payload)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}

Response

{
  "success": true,
  "message": "Install initiated.",
  "data": {
    "install_code": "INS-2026021966080",
    "status": "running",
    "target_ip": "192.168.1.100",
    "image": "Windows Server 2012 R2",
    "created_at": "2026-02-19T16:34:58+00:00"
  }
}
GET/api/v1/installList install history

Query Params: per_page (optional, default 20, max 100)

Example Request

curl -X GET "https://api.rizzcode.id/api/v1/install?per_page=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json",
}

response = requests.get(f"{BASE_URL}/install", headers=headers, params={"per_page": 10})
installs = response.json()["data"]

for i in installs:
    print(f"{i['install_code']} - {i['status']}")
<?php

$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';

$ch = curl_init("$baseUrl/install?per_page=10");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $apiKey"],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);

foreach ($result['data'] as $install) {
    echo "{$install['install_code']} - {$install['status']}\n";
}
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';

const res = await fetch(`${BASE_URL}/install?per_page=10`, {
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
});
const { data, meta } = await res.json();
console.log(`Page ${meta.current_page} of ${meta.last_page}`);
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"

    req, _ := http.NewRequest("GET", baseURL+"/install?per_page=10", nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}

Response

{
  "success": true,
  "data": [...],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 20,
    "total": 5
  }
}
GET/api/v1/install/{code}Get install status

Example Request

curl -X GET "https://api.rizzcode.id/api/v1/install/INS-2026021966080" \
  -H "Authorization: Bearer YOUR_API_KEY"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json",
}

code = "INS-2026021966080"
response = requests.get(f"{BASE_URL}/install/{code}", headers=headers)
install = response.json()["data"]

print(f"Status: {install['status']}")
print(f"Duration: {install['duration']}s")
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';
const code = 'INS-2026021966080';
const res = await fetch(`${BASE_URL}/install/${code}`, {
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
});
const { data } = await res.json();
console.log(`Status: ${data.status}, Duration: ${data.duration}s`);
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"
    code := "INS-2026021966080"

    req, _ := http.NewRequest("GET", baseURL+"/install/"+code, nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
<?php

$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';
$code = 'INS-2026021966080';

$ch = curl_init("$baseUrl/install/$code");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $apiKey",
        "Accept: application/json",
    ],
]);

$result = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($result['data']);

Response

{
  "success": true,
  "data": {
    "install_code": "INS-2026021966080",
    "status": "success",
    "target_ip": "192.168.1.100",
    "ssh_user": "root",
    "image": { "id": 1, "name": "Windows Server 2012 R2", "version_code": "2012" },
    "duration": 245,
    "error_message": null,
    "started_at": "2026-02-19T16:35:00+00:00",
    "finished_at": "2026-02-19T16:39:05+00:00"
  }
}

Images

GET/api/v1/imagesList available images

Example Request

curl -X GET "https://api.rizzcode.id/api/v1/images" \
  -H "Authorization: Bearer YOUR_API_KEY"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json",
}

response = requests.get(f"{BASE_URL}/images", headers=headers)
images = response.json()["data"]

for img in images:
    print(f"[{img['id']}] {img['name']} ({img['type']})")
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';

const res = await fetch(`${BASE_URL}/images`, {
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
});
const { data } = await res.json();

data.forEach((image) => {
    console.log(`[${image.id}] ${image.name} (${image.type})`);
});
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"

    req, _ := http.NewRequest("GET", baseURL+"/images", nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
<?php

$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';

$ch = curl_init("$baseUrl/images");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $apiKey"],
]);
$images = json_decode(curl_exec($ch), true)['data'];
curl_close($ch);

foreach ($images as $img) {
    echo "[{$img['id']}] {$img['name']}\n";
}

Response

{
  "success": true,
  "data": [
    { "id": 1, "name": "Windows Server 2012 R2", "version_code": "2012", "type": "global" }
  ]
}
GET/api/v1/images/{id}Get image detail

Example Request

curl -X GET "https://api.rizzcode.id/api/v1/images/1" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json",
}

response = requests.get(f"{BASE_URL}/images/1", headers=headers)
print(response.json()["data"])
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';

const res = await fetch(`${BASE_URL}/images/1`, {
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
});
console.log((await res.json()).data);
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"

    req, _ := http.NewRequest("GET", baseURL+"/images/1", nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
<?php

$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';

$ch = curl_init("$baseUrl/images/1");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $apiKey",
        "Accept: application/json",
    ],
]);

$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result['data']);

Response

{
  "success": true,
  "data": {
    "id": 1,
    "name": "Windows Server 2012 R2",
    "version_code": "2012",
    "type": "global",
    "created_at": "2026-02-19T15:54:17+00:00"
  }
}

Account

GET/api/v1/accountGet account info

Example Request

curl -X GET "https://api.rizzcode.id/api/v1/account" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json",
}

response = requests.get(f"{BASE_URL}/account", headers=headers)
print(response.json())
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';

const res = await fetch(`${BASE_URL}/account`, {
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
});
console.log(await res.json());
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"

    req, _ := http.NewRequest("GET", baseURL+"/account", nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
<?php

$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';

$ch = curl_init("$baseUrl/account");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $apiKey",
        "Accept: application/json",
    ],
]);

$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);

Response

{
  "success": true,
  "data": {
    "id": 1,
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "username": "johndoe",
    "usercode": "USR001",
    "plan": {
      "name": "Pro",
      "slug": "pro",
      "install_limit": 50,
      "api_rate_limit": 100,
      "has_webhook": true
    },
    "date_exp": "2026-03-21T00:00:00+00:00",
    "is_active": true
  }
}
GET/api/v1/account/usageGet monthly usage

Example Request

curl -X GET "https://api.rizzcode.id/api/v1/account/usage" \
  -H "Authorization: Bearer YOUR_API_KEY"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json",
}

response = requests.get(f"{BASE_URL}/account/usage", headers=headers)
usage = response.json()["data"]

print(f"Used: {usage['installs_this_month']}/{usage['install_limit']}")
print(f"Remaining: {usage['remaining']}")
print(f"Days left: {usage['days_remaining']}")
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';

const res = await fetch(`${BASE_URL}/account/usage`, {
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
});
const { data } = await res.json();
console.log(`${data.installs_this_month}/${data.install_limit} installs used`);
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"

    req, _ := http.NewRequest("GET", baseURL+"/account/usage", nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
<?php

$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';

$ch = curl_init("$baseUrl/account/usage");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $apiKey",
        "Accept: application/json",
    ],
]);

$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result['data']);

Response

{
  "success": true,
  "data": {
    "installs_this_month": 5,
    "install_limit": 50,
    "remaining": 45,
    "total_installs": 120,
    "success_installs": 115,
    "failed_installs": 5,
    "days_remaining": 29,
    "plan_expired": false
  }
}
POST/api/v1/account/api-key/regenerateRegenerate API key
Warning: This invalidates your current API key immediately. All existing integrations using the old key will stop working.

Example Request

curl -X POST "https://api.rizzcode.id/api/v1/account/api-key/regenerate" \
  -H "Authorization: Bearer YOUR_API_KEY"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json",
}

response = requests.post(f"{BASE_URL}/account/api-key/regenerate", headers=headers)
new_key = response.json()["data"]["api_key"]
print(f"New API key: {new_key}")
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';

const res = await fetch(`${BASE_URL}/account/api-key/regenerate`, {
    method: 'POST',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
});
const { data } = await res.json();
console.log('New API key:', data.api_key);
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"

    req, _ := http.NewRequest("POST", baseURL+"/account/api-key/regenerate", nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
<?php

$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';

$ch = curl_init("$baseUrl/account/api-key/regenerate");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $apiKey",
        "Accept: application/json",
    ],
]);

$result = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $result['data']['api_key'];

Response

{
  "success": true,
  "message": "API key regenerated.",
  "data": { "api_key": "rz_live_a1b2c3d4e5f6..." }
}

Webhook

GET/api/v1/webhookGet webhook config

Example Request

curl -X GET "https://api.rizzcode.id/api/v1/webhook" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json",
}

response = requests.get(f"{BASE_URL}/webhook", headers=headers)
print(response.json())
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';

const res = await fetch(`${BASE_URL}/webhook`, {
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
});
console.log(await res.json());
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"

    req, _ := http.NewRequest("GET", baseURL+"/webhook", nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
<?php

$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';

$ch = curl_init("$baseUrl/webhook");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $apiKey",
        "Accept: application/json",
    ],
]);

$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);

Response

{
  "success": true,
  "data": {
    "webhook_url": "https://yoursite.com/hook",
    "webhook_events": ["install.completed", "install.failed"],
    "has_secret": true
  }
}
PUT/api/v1/webhookUpdate webhook config
Field Type Required Description
webhook_url string Optional Webhook URL
webhook_secret string Optional HMAC secret (auto-generated if empty)
webhook_events array Optional install.started, install.completed, install.failed

Example Request

curl -X PUT "https://api.rizzcode.id/api/v1/webhook" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "webhook_url": "https://yoursite.com/webhook",
    "webhook_events": ["install.completed", "install.failed"]
  }'
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json",
}

response = requests.put(
    f"{BASE_URL}/webhook",
    headers=headers,
    json={
        "webhook_url": "https://yoursite.com/webhook",
        "webhook_events": ["install.completed", "install.failed"]
    }
)
print(response.json())
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';

const res = await fetch(`${BASE_URL}/webhook`, {
    method: 'PUT',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    },
    body: JSON.stringify({
        webhook_url: 'https://yoursite.com/webhook',
        webhook_events: ['install.completed', 'install.failed']
    })
});
console.log(await res.json());
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"

    payload := strings.NewReader(`{
        "webhook_url": "https://yoursite.com/webhook",
        "webhook_events": ["install.completed", "install.failed"]
    }`)

    req, _ := http.NewRequest("PUT", baseURL+"/webhook", payload)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
<?php

$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';

$ch = curl_init("$baseUrl/webhook");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'PUT',
    CURLOPT_POSTFIELDS     => json_encode([
        'webhook_url'    => 'https://yoursite.com/webhook',
        'webhook_events' => ['install.completed', 'install.failed'],
    ]),
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $apiKey",
        "Content-Type: application/json",
    ],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
DELETE/api/v1/webhookRemove webhook config

Removes webhook URL, secret, and all event subscriptions.

Example Request

curl -X DELETE "https://api.rizzcode.id/api/v1/webhook" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Accept": "application/json",
}

response = requests.delete(f"{BASE_URL}/webhook", headers=headers)
print(response.json())
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';

const res = await fetch(`${BASE_URL}/webhook`, {
    method: 'DELETE',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Accept': 'application/json'
    }
});
console.log(await res.json());
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"

    req, _ := http.NewRequest("DELETE", baseURL+"/webhook", nil)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Accept", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
<?php

$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://api.rizzcode.id/api/v1';

$ch = curl_init("$baseUrl/webhook");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $apiKey",
        "Accept: application/json",
    ],
]);

$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);

Webhook Integration Guide

When an event fires, a POST request is sent to your webhook URL with the following payload:

{
  "event": "install.completed",
  "timestamp": "2026-02-19T16:39:05+00:00",
  "data": {
    "install_code": "INS-2026021966080",
    "status": "success",
    "target_ip": "192.168.1.100"
  }
}

Headers include X-Webhook-Signature (HMAC-SHA256 of JSON body using your secret).

Verify Signature

import hmac, hashlib

def verify_webhook(body: bytes, signature: str, secret: str) -> bool:
    expected = hmac.new(secret.encode(), body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, signature)

# Flask example
@app.route('/webhook', methods=['POST'])
def handle_webhook():
    signature = request.headers.get('X-Webhook-Signature', '')
    if not verify_webhook(request.data, signature, WEBHOOK_SECRET):
        return 'Invalid signature', 401

    payload = request.json
    event = payload['event']

    if event == 'install.completed':
        print(f"Install {payload['data']['install_code']} completed")
    elif event == 'install.failed':
        print(f"Install {payload['data']['install_code']} failed")

    return 'OK', 200
const crypto = require('crypto');

function verifyWebhook(body, signature, secret) {
    const expected = crypto.createHmac('sha256', secret)
        .update(body).digest('hex');
    return crypto.timingSafeEqual(
        Buffer.from(expected), Buffer.from(signature)
    );
}

// Express example
app.post('/webhook', express.raw({ type: '*/*' }), (req, res) => {
    const signature = req.headers['x-webhook-signature'] || '';
    if (!verifyWebhook(req.body, signature, WEBHOOK_SECRET)) {
        return res.status(401).send('Invalid signature');
    }

    const payload = JSON.parse(req.body);
    console.log(`Event: ${payload.event}`);
    console.log(`Install: ${payload.data.install_code}`);

    res.sendStatus(200);
});
function verifyWebhook(string $body, string $signature, string $secret): bool {
    $expected = hash_hmac('sha256', $body, $secret);
    return hash_equals($expected, $signature);
}

// Laravel controller example
$body = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '';

if (!verifyWebhook($body, $signature, $webhookSecret)) {
    http_response_code(401);
    exit('Invalid signature');
}

$payload = json_decode($body, true);
$event = $payload['event'];

match ($event) {
    'install.completed' => handleCompleted($payload['data']),
    'install.failed'    => handleFailed($payload['data']),
    default             => null,
};
import (
    "crypto/hmac"
    "crypto/sha256"
    "encoding/hex"
    "encoding/json"
    "io"
    "net/http"
)

func verifyWebhook(body []byte, sig, secret string) bool {
    mac := hmac.New(sha256.New, []byte(secret))
    mac.Write(body)
    expected := hex.EncodeToString(mac.Sum(nil))
    return hmac.Equal([]byte(expected), []byte(sig))
}

func webhookHandler(w http.ResponseWriter, r *http.Request) {
    body, _ := io.ReadAll(r.Body)
    signature := r.Header.Get("X-Webhook-Signature")

    if !verifyWebhook(body, signature, webhookSecret) {
        http.Error(w, "Invalid signature", 401)
        return
    }

    var payload map[string]interface{}
    json.Unmarshal(body, &payload)

    event := payload["event"].(string)
    fmt.Printf("Event: %s\n", event)

    w.WriteHeader(200)
}

Linode / Akamai Cloud Integration

If your target server runs on Linode (Akamai Connected Cloud), you can pass an optional linode_token parameter when triggering an install. This allows the system to interact with the Linode API for additional operations such as verifying instance status, retrieving networking details, or performing post-install configurations.

How It Works

1. Create a Linode Personal Access Token from the Linode Cloud Manager.

2. Grant the token at minimum Linodes: Read/Write permissions.

3. Pass the token as linode_token in the install request body.

Note: The linode_token parameter is entirely optional. If your server is not hosted on Linode/Akamai, simply omit it. The install will proceed using direct SSH connection only.

Example with Linode Token

# Get Linode IP first
LINODE_IP=$(curl -s -H "Authorization: Bearer $LINODE_TOKEN" \
  "https://api.linode.com/v4/linode/instances/12345678" \
  | jq -r '.ipv4[0]')

# Trigger install with Linode token
curl -X POST "https://api.rizzcode.id/api/v1/install" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"target_ip\": \"$LINODE_IP\",
    \"ssh_user\": \"root\",
    \"ssh_password\": \"your_ssh_pass\",
    \"image_id\": 1,
    \"windows_password\": \"MyWinPass123\",
    \"linode_token\": \"$LINODE_TOKEN\"
  }"
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.rizzcode.id/api/v1"
LINODE_TOKEN = "your_linode_personal_access_token"

headers = {"Authorization": f"Bearer {API_KEY}"}

# Step 1: Get Linode instance IP
linode_id = 12345678
linode_info = requests.get(
    f"https://api.linode.com/v4/linode/instances/{linode_id}",
    headers={"Authorization": f"Bearer {LINODE_TOKEN}"}
).json()
target_ip = linode_info["ipv4"][0]

# Step 2: Trigger install with Linode token
response = requests.post(
    f"{BASE_URL}/install",
    headers=headers,
    json={
        "target_ip": target_ip,
        "ssh_user": "root",
        "ssh_password": "your_ssh_pass",
        "image_id": 1,
        "windows_password": "MyWinPass123",
        "linode_token": LINODE_TOKEN
    }
)

result = response.json()
print(f"Install started: {result['data']['install_code']}")
$apiKey = 'YOUR_API_KEY';
$linodeToken = 'your_linode_personal_access_token';
$linodeId = 12345678;

// Step 1: Get Linode instance IP
$ch = curl_init("https://api.linode.com/v4/linode/instances/$linodeId");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $linodeToken"],
]);
$linode = json_decode(curl_exec($ch), true);
curl_close($ch);
$targetIp = $linode['ipv4'][0];

// Step 2: Trigger install
$ch = curl_init("https://api.rizzcode.id/api/v1/install");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => json_encode([
        'target_ip'        => $targetIp,
        'ssh_user'         => 'root',
        'ssh_password'     => 'your_ssh_pass',
        'image_id'         => 1,
        'windows_password' => 'MyWinPass123',
        'linode_token'     => $linodeToken,
    ]),
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer $apiKey",
        "Content-Type: application/json",
    ],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);

echo "Install started: {$result['data']['install_code']}";
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.rizzcode.id/api/v1';
const LINODE_TOKEN = 'your_linode_personal_access_token';
const linodeId = 12345678;

// Step 1: Get Linode instance IP
const linodeRes = await fetch(
    `https://api.linode.com/v4/linode/instances/${linodeId}`,
    { headers: { 'Authorization': `Bearer ${LINODE_TOKEN}` } }
);
const linode = await linodeRes.json();
const targetIp = linode.ipv4[0];

// Step 2: Trigger install
const installRes = await fetch(`${BASE_URL}/install`, {
    method: 'POST',
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        target_ip: targetIp,
        ssh_user: 'root',
        ssh_password: 'your_ssh_pass',
        image_id: 1,
        windows_password: 'MyWinPass123',
        linode_token: LINODE_TOKEN
    })
});

const result = await installRes.json();
console.log('Install started:', result.data.install_code);
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    apiKey := "YOUR_API_KEY"
    baseURL := "https://api.rizzcode.id/api/v1"
    linodeToken := "your_linode_personal_access_token"
    linodeID := "12345678"

    linodeReq, _ := http.NewRequest("GET", "https://api.linode.com/v4/linode/instances/"+linodeID, nil)
    linodeReq.Header.Set("Authorization", "Bearer "+linodeToken)
    linodeResp, _ := http.DefaultClient.Do(linodeReq)
    defer linodeResp.Body.Close()

    payload := strings.NewReader(`{
        "target_ip": "192.168.1.100",
        "ssh_user": "root",
        "ssh_password": "your_ssh_pass",
        "image_id": 1,
        "windows_password": "MyWinPass123",
        "linode_token": "your_linode_personal_access_token"
    }`)

    req, _ := http.NewRequest("POST", baseURL+"/install", payload)
    req.Header.Set("Authorization", "Bearer "+apiKey)
    req.Header.Set("Content-Type", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}