This API accepts GET request
Response parameters are in JSON format
API main endpoint: https://dwebkjkovsjobzrb45dz6prnlifnapiyp2dba33vcmcsaikr2re4d5qd.onion/api
API main endpoint: https://onionlandhosting.net/api
The easiest way to access the API is with a personal access token (PAT) generated from OnionLand Hosting portal. This token should only allow the level of access needed by the application.
To create one:
Make authenticated HTTP requests to the API by including the access_token in this header with each request:
Authorization: Bearer abc123def456hij789klm
To access more APIs other than those specified below, log into your account and open a ticket with the feedback department.
/account/balance
Request sample
curl -X GET \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    "https://onionlandhosting.net/api/account/balance"
            Response sample
{
    "data": {
        "account_balance": "42.40",
        "estimated_spent_monthly": "11.95",
        "estimated_due_date": "2024-12-20",
        "generated_at": "2024-09-05 12:38:09"
    },
    "reason": null
}
        /account/payments
Request sample
curl -X GET \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    "https://onionlandhosting.net/api/account/payments"
            Response sample
{
    "data": [
        {
            "date": "<!--date-->",
            "asset": "BTC",
            "amount": "0.00080000",
            "usd": "45.75",
            "address": "<!--address-->",
            "txid": "<!--txid-->"
        },
        <!--list of payments-->
    ],
    "reason": null
}
        /account/payment-methods
Request sample
curl -X GET \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    "https://onionlandhosting.net/api/account/payment-methods"
            Response sample
{
    "data": [
        {
            "symbol": "BTC",
            "rate": "56561.08",
            "address": "<!--address-->"
        },
        {
            "symbol": "BTC",
            "rate": "56561.08",
            "address": "<!--address-->"
        },
        {
            "symbol": "ETH",
            "rate": "2385.61",
            "address": "<!--address-->"
        },
        {
            "symbol": "USDT",
            "rate": "1.00",
            "address": "<!--address-->"
        },
        {
            "symbol": "USDC",
            "rate": "1.00",
            "address": "<!--address-->"
        },
        {
            "symbol": "DAI",
            "rate": "1.00",
            "address": "<!--address-->"
        }
    ],
    "reason": null
}
        /account/invoices
Request sample
curl -X GET \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    "https://onionlandhosting.net/api/account/invoices"
            Response sample
{
    "data": [
        {
            "invoice_period": "2024-09",
            "amount": "1.62"
        },
        {
            "invoice_period": "2024-08",
            "amount": "14.94"
        },
        <!--list of invoices-->
    ],
    "reason": null
}
        /instances
Request sample
curl -X GET \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    "https://onionlandhosting.net/api/instances"
            Response sample
{
    "data": [
        {
            "id": "<!--id-->",
            "name": "<!--address-->",
            "status": "running",
            "created_at": "2019-12-19 01:27:16",
            "features": [
                "onion_aliases"
            ],
            "disk": {
                "current_usage": "4.881",
                "max_usage": "10"
            },
            "onion_aliases": [
                "<!--address-->",
                "<!--address-->"
            ],
            "www_aliases": [],
            "backups": []
        }
    ],
    "reason": null
}
        To access more APIs, log into your account and open a ticket with the feedback department.
If you need technical support regarding APIs, log into your account and open a ticket with the technical department.