Back to Knowledge Base

ITLDC API Documentation

Complete API reference for managing your servers, deployments, and resources programmatically.

Updated:
ITLDC Team
api rest automation

ITLDC API Documentation

Our REST API allows you to manage your infrastructure programmatically. This documentation covers all available endpoints and authentication methods.

Authentication

All API requests require authentication using API tokens.

Getting Your API Token

  1. Log in to your ITLDC account
  2. Navigate to Account Settings → API Tokens
  3. Generate a new token
  4. Store it securely

Authentication Header

Authorization: Bearer YOUR_API_TOKEN

Base URL

https://api.itldc.com/v1

Endpoints

Servers

List All Servers

GET /servers

Response:

{
  "servers": [
    {
      "id": "srv_123abc",
      "name": "web-server-01",
      "status": "running",
      "ip": "203.0.113.1",
      "plan": "nvme-vds-2",
      "location": "EU1-AMS"
    }
  ]
}

Get Server Details

GET /servers/:id

Create Server

POST /servers

Request Body:

{
  "name": "my-server",
  "plan": "nvme-vds-2",
  "location": "EU1-AMS",
  "os": "ubuntu-22.04"
}

Restart Server

POST /servers/:id/restart

Delete Server

DELETE /servers/:id

Billing

Get Invoices

GET /billing/invoices

Get Usage Statistics

GET /billing/usage

Locations

List Available Locations

GET /locations

Response:

{
  "locations": [
    {
      "code": "EU1-AMS",
      "city": "Amsterdam",
      "country": "Netherlands",
      "available": true
    }
  ]
}

Rate Limiting

API requests are limited to:

  • 100 requests per minute
  • 1000 requests per hour

Rate limit headers are included in all responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000

Error Handling

Error Response Format

{
  "error": {
    "code": "invalid_request",
    "message": "The request was invalid",
    "details": "Server plan 'invalid-plan' does not exist"
  }
}

HTTP Status Codes

  • 200 - Success
  • 201 - Created
  • 400 - Bad Request
  • 401 - Unauthorized
  • 403 - Forbidden
  • 404 - Not Found
  • 429 - Too Many Requests
  • 500 - Internal Server Error

Code Examples

cURL

curl -X GET https://api.itldc.com/v1/servers \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Python

import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN"
}

response = requests.get(
    "https://api.itldc.com/v1/servers",
    headers=headers
)

print(response.json())

Node.js

const fetch = require('node-fetch');

const headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN'
};

fetch('https://api.itldc.com/v1/servers', { headers })
  .then(res => res.json())
  .then(data => console.log(data));

Webhooks

Configure webhooks to receive real-time notifications:

Available Events

  • server.created
  • server.started
  • server.stopped
  • server.deleted
  • invoice.created
  • invoice.paid

Webhook Payload

{
  "event": "server.created",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "server_id": "srv_123abc",
    "name": "web-server-01"
  }
}

Support

For API support:

Need Help?

Our support team is available 24/7 to assist you.

Contact Support

Related Articles

Browse more articles in these categories.