# API Documentation

All of our API endpoints use Basic Auth, using your registered Email Address and Password to authenticate.

Live Endpoint: <https://dashboard.suborbit.al/api/>

## Get User Information

<pre><code><strong>GET https://dashboard.suborbit.al/api/user
</strong></code></pre>

Returns basic user information and last 20 traffic logs, example response:

```json
{
    "id": 26,
    "name": "example",
    "username": "example",
    "email": "example@suborbit.al",
    "plan_id": 1,
    "referral_code": null,
    "referral": null,
    "balance": "0.00",
    "traffic_logs": [
    ],
    "topups": "25.00",
    "plan": {
        "id": 1,
        "name": "Basic Plan",
        "description": "Basic Plan",
        "active": "1",
        "price_per_gb": "3.00000",
        "mobile_enabled": "0",
        "price_per_gb_mobile": "0.00000",
        "high_performance_enabled": "1",
        "price_per_gb_high_performance": "5.00000",
        "price_per_gb_dc": "0.50000",
        "price_per_gb_dc_high_performance": "1.00000",
        "price_per_gb_isp": "1.00000",
        "price_per_gb_isp_high_performance": "2.00000",
        "price_per_static_isp": "2.00000",
        "price_per_static_dc": "1.00000",
        "price_for_plan": "0.00000",
        "allowed_groups": "*"
    }
}
```

## Get User Static IPs

```
GET https://dashboard.suborbit.al/api/user/ips
```

Returns all of the users static IPs, can be filtered with the following GET parameters:

* status - Proxy Status (0 - expired, 1 - active, 10 - offline)
* ip - Proxy IP address (does not have to be the full IP, for example you can provide 127.0.0 and it will return all matching IPs)
* order - Column to order by (id, ip, status, expires\_at, country, type)
* sort - Sorting style for order (DESC or ASC)

Example Response:

```json
[
    {
        "id": 134471,
        "username": "example",
        "ip": "207.*.*.*",
        "replacement_ip": "156.*.*.*",
        "status": "10",
        "auto_replace_ip": "0",
        "country": "sg",
        "type": "DC",
        "updated_at": "2024-03-08T02:57:51.000000Z",
        "expires_at": "2024-05-07 21:00:34",
        "auto_renew": 1
    },
    {
        "id": 102210,
        "username": "example",
        "ip": "38.*.*.*",
        "replacement_ip": null,
        "status": "1",
        "auto_replace_ip": null,
        "country": "hk",
        "type": "DC",
        "updated_at": "2024-02-22T19:59:24.000000Z",
        "expires_at": "2024-03-12 18:52:09",
        "auto_renew": 1
    },
    {
        "id": 82451,
        "username": "example",
        "ip": "154.*.*.*",
        "replacement_ip": null,
        "status": "0",
        "auto_replace_ip": null,
        "country": "de-fra",
        "type": "ISP",
        "updated_at": "2024-02-24T19:00:01.000000Z",
        "expires_at": "2024-02-24 18:29:27",
        "auto_renew": 0
    }
]
```

## Get Specific Static Proxy by IP

```
GET https://dashboard.suborbit.al/api/user/ip/IPADDRESS
```

Return information about static IP, example response:

```json
{
        "id": 82451,
        "username": "example",
        "ip": "154.*.*.*",
        "replacement_ip": null,
        "status": "0",
        "auto_replace_ip": null,
        "country": "de-fra",
        "type": "ISP",
        "updated_at": "2024-02-24T19:00:01.000000Z",
        "expires_at": "2024-02-24 18:29:27",
        "auto_renew": 0
}
```

## Update Static IP

```
PATCH https://dashboard.suborbit.al/api/user/ip/IPADDRESS
```

Updates a static IP allowing you to enable auto renew and auto replace IP. Returns the updated IP, parameters can be send as JSON or standard POST:

* auto\_renew - (0 - Don't auto renew, 1 - Auto renew)
* auto\_replace\_ip (0 - Don't automatically replace the IP, 1 - Replace the IP when offline)

Response:

```json
{
        "id": 82451,
        "username": "example",
        "ip": "154.*.*.*",
        "replacement_ip": null,
        "status": "0",
        "auto_replace_ip": null,
        "country": "de-fra",
        "type": "ISP",
        "updated_at": "2024-02-24T19:00:01.000000Z",
        "expires_at": "2024-02-24 18:29:27",
        "auto_renew": 0
}
```

## Extend Static IP Address for 1 Month

```
GET https://dashboard.suborbit.al/api/user/ip/IPADDRESS/extend
```

Allows you to extend the static IP for 1 month without using the dashboard. This endpoint will charge you the purchase fee that is assigned to your plan (typically $2 for ISP and $1 for DC). If you do not have enough balance the request will fail.

Response:

```json
{
        "id": 82451,
        "username": "example",
        "ip": "154.*.*.*",
        "replacement_ip": null,
        "status": "0",
        "auto_replace_ip": null,
        "country": "de-fra",
        "type": "ISP",
        "updated_at": "2024-02-24T19:00:01.000000Z",
        "expires_at": "2024-02-24 18:29:27",
        "auto_renew": 0
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.suborbit.al/api/api-documentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
