Reseller API
Matrix Streamline Infotech
Matrix Streamline · Reseller API v1

Sell cloud servers under your own brand.

Everything a client can do in the panel — order and pay for servers, power and rebuild them, read credentials, handle invoices, the wallet and support tickets — over one JSON REST API. Connect your billing system, keep the wallet funded, and every order you place starts building straight away.

First server in four calls
export API_KEY="mlk_…"   # from API access in the panel
BASE="https://my.matrixstreamline.com/api/v1"
AUTH="Authorization: Bearer $API_KEY"

# 1 · What can I sell?
curl "$BASE/plans" -H "$AUTH"

# 2 · Installable OS, free IPs and the exact price
curl "$BASE/order-options?plan_id=2&zone_id=1" -H "$AUTH"

# 3 · Order and pay from the wallet in one call
curl -X POST "$BASE/orders" -H "$AUTH" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"plan_id": 2, "zone_id": 1, "os_id": 2,
       "hostname": "web-01.example.in", "pay_with": "wallet"}'

# 4 · Poll until "status" is "completed"; vm_id is your server
curl "$BASE/orders/311" -H "$AUTH"
Base URL https://my.matrixstreamline.com/api/v1
Postman collection

50 endpoints · 120 requests a minute per account · JSON in, JSON out · bearer keys locked to your IPs

Quick start#

  1. Create a key. Sign in, open API access and create a key. Copy it: it is shown only once.
  2. Whitelist your server. Add the public IP address (or CIDR range) of every server that will call the API to the key's whitelist.
  3. Test it from that server:
    Shell
    export API_KEY="mlk_…"
    curl "https://my.matrixstreamline.com/api/v1/ping" -H "Authorization: Bearer $API_KEY"
  4. Fund the wallet and order. Top up in the panel, then order with "pay_with": "wallet" — the server is built straight away (see Reseller workflow).

Authentication#

Every request carries an API key in the Authorization header as a bearer token. There are no sessions or cookies.

Header
Authorization: Bearer mlk_3f9a2c1d7e6b5a4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a
  • Keys look like mlk_ followed by 48 hexadecimal characters. The panel stores only a SHA-256 fingerprint, so a lost key cannot be shown again — revoke it and create a new one.
  • If a proxy in your stack strips Authorization, send the key as X-API-Key: mlk_… instead.
  • A key acts on the account that created it, with the same rights the account holder has in the client panel. Up to 20 active keys per account.
  • Keys can carry an expiry date. Revoking a key (in the panel or with DELETE /api-keys/{id}) takes effect immediately.
  • The administrator can switch API access off for an account, or for the whole panel.
401 — missing or wrong key
{
    "error": {
        "code": "invalid_api_key",
        "message": "That API key is not valid or has been revoked.",
        "request_id": "req_9f2c4b1a7d3e5f60"
    }
}

IP whitelisting#

Each key has its own whitelist. A request is accepted only when it comes from an address on the list, so a leaked key is useless anywhere else.

  • Entries are single addresses or CIDR ranges, IPv4 or IPv6: 203.0.113.10, 198.51.100.0/24, 2001:db8:42::/48. Up to 50 per key. Catch-all ranges (0.0.0.0/0, ::/0) are refused.
  • This panel requires a whitelist: a key with no entries is refused (ip_whitelist_empty).
  • Manage the list in the panel, or through the API: read, replace, add, remove. Changing the calling key's list so that it would block the address you call from is refused with would_lock_out unless you send "force": true.
  • The address checked is the one the panel sees. Calling through your own proxy or NAT? Whitelist its public address. GET /ping echoes the address the panel saw.
403 — address not on the list
{
    "error": {
        "code": "ip_not_whitelisted",
        "message": "Requests from 192.0.2.77 are not allowed for this key. Add the address to the key's IP whitelist.",
        "request_id": "req_51c0d2e3f4a5b6c7"
    }
}

Access levels#

Key accessCan callTypical use
readGET endpoints only. Any other method returns 403 read_only_key.Dashboards, monitoring, syncing status into your billing system.
fullEvery endpoint: ordering, payments, power, rebuilds, passwords, tickets.Provisioning automation.

Each endpoint below is tagged with the access it needs: read works with any key, full needs a full-access key.

Requests & responses#

  • Send bodies as JSON with Content-Type: application/json (form-encoded bodies are also accepted). Query parameters go in the URL.
  • Every response is JSON. A single object comes back in data; a list comes back in data with paging in meta.
  • Money is a number with two decimals in the account currency (INR). Prices exclude tax unless named total.
  • Timestamps are ISO 8601 in UTC (2026-10-10T09:12:44Z); dates are YYYY-MM-DD. Absent values are null, never omitted.
  • Servers are identified by a UUID; orders, invoices and tickets by a number id, or by their reference (ORD-…, MTX-…, TKT-…) wherever an id goes in the path.
  • Every response has an X-Request-Id header; errors repeat it as request_id. Quote it when you contact support.
One object
{
    "data": {
        "id": "6f1c2a9e-…",
        "hostname": "web-01.client1042.in",
        "…": "…"
    }
}
A list
{
    "data": [
        {
            "…": "…"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 1,
        "pages": 1
    }
}

Errors#

Failures use the HTTP status and a stable code to branch on, with a message written for people. Validation errors add fields, mapping each field to its problem.

422 — validation failed
{
    "error": {
        "code": "validation_failed",
        "message": "Plan id is required.",
        "request_id": "req_0a1b2c3d4e5f6a7b",
        "fields": {
            "plan_id": "Plan id is required.",
            "hostnames": "Send \"hostname\" for one server, or \"hostnames\" (a list) for several."
        }
    }
}
StatusCodeMeaning
400invalid_jsonThe body was sent as application/json but did not parse.
400invalid_idempotency_keyThe Idempotency-Key header is longer than 100 characters or not printable ASCII.
401missing_api_keyNo key in the Authorization (or X-API-Key) header.
401invalid_api_keyThe key does not exist or was revoked.
401api_key_expiredThe key passed its expiry date.
402insufficient_balanceThe wallet does not cover a wallet payment.
403ip_not_whitelistedThe calling IP is not on the key's whitelist. The message names the IP the panel saw.
403ip_whitelist_emptyThe key has no whitelist entries and the panel requires them.
403read_only_keyA read-only key made a non-GET request.
403api_access_disabledAPI access is turned off for this account.
403account_inactiveThe account is suspended or closed.
404not_foundNo such endpoint, or the resource does not exist on your account.
405method_not_allowedThe path exists but not with this HTTP method.
409idempotency_in_progressA request with the same Idempotency-Key is still running.
409…State conflicts: already_paid, invoice_not_payable, vm_suspended, vm_busy, vm_terminated, vm_failed, rebuild_pending, rebuild_in_progress, ticket_closed, would_lock_out, key_revoked, already_revoked.
422validation_failedInput is missing or invalid; error.fields maps each field to its problem.
422order_rejectedAn order could not be placed; the message says why.
422coupon_invalidA coupon code cannot be used for this order; the message says why.
422idempotency_key_reusedThe Idempotency-Key was used before with a different request.
422payment_failedA wallet payment could not be completed.
429rate_limitedToo many requests this minute. Wait for Retry-After seconds.
429action_too_frequentThe same power action was sent to the server moments ago.
500server_errorAn unexpected error. Quote request_id to support.
502…The hypervisor failed: hypervisor_unavailable, power_action_failed, password_reset_failed, console_failed.
503api_disabledThe API is switched off on this panel.
503service_unavailableThe panel is temporarily unavailable. Retry later.
503console_unavailableThe console bridge is not configured.

Retry 429, 500, 502 and 503 with backoff (and an Idempotency-Key on writes). Do not retry other 4xx errors unchanged.

Rate limits#

Each account may make 120 requests per minute, shared by all its keys. Every response reports where you stand:

HeaderMeaning
X-RateLimit-LimitRequests allowed per minute.
X-RateLimit-RemainingRequests left in the current minute.
X-RateLimit-ResetUnix time when the window resets.
Retry-AfterOn a 429: seconds to wait before retrying.

Power actions are also limited per server: the same action within 8 seconds returns 429 action_too_frequent.

Idempotent retries#

Networks fail. To retry a write safely, send a unique Idempotency-Key header (a UUID is ideal) with every POST, PUT, PATCH or DELETE that must not happen twice — above all placing orders and paying invoices.

  • The first request runs normally and its response is stored for 24 hours against the key.
  • A retry with the same key, path and body gets the stored response back, with the header Idempotent-Replayed: true. Nothing runs twice.
  • A retry while the first is still running gets 409 idempotency_in_progress; wait and retry.
  • Reusing a key for a different request gets 422 idempotency_key_reused.
  • Server errors (5xx) are not stored, so the retry runs for real.

The Postman collection sends a fresh Idempotency-Key with every order, invoice payment and top-up.

Pagination#

List endpoints take page (from 1) and per_page (1–100, default 25) and return meta:

meta
{
    "meta": {
        "page": 2,
        "per_page": 25,
        "total": 61,
        "pages": 3
    }
}

A page past the end returns an empty data list, so "fetch until empty" loops stop on their own.

Reseller workflow#

The usual way to sell a server to your customer end-to-end:

  1. Pick what to sell. GET /plans and GET /zones once, then GET /order-options?plan_id=2&zone_id=1 to get the installable OS list and the exact price including tax.
  2. Order and pay in one call. POST /orders with "pay_with": "wallet" and an Idempotency-Key. The response holds the orders, the paid invoice and your new wallet balance. Have a discount code? Check it with GET /coupons/{code} and send it as "coupon".
  3. Wait for the build. Poll GET /orders/{id} every 15–30 seconds until status is completed (usually 1–5 minutes for Linux, up to 20 for Windows); vm_id then holds the server id. failed means the build failed — open a ticket; the order can be re-provisioned by staff.
  4. Hand over. GET /vms/{id}/credentials gives the IP, username and password for your customer. Store your customer reference in the server's label.
  5. Renewals. Each server renews monthly. A renewal invoice is raised a few days before billing.next_due_date; list unpaid ones with GET /invoices?status=unpaid and pay each with POST /invoices/{id}/pay ("method": "wallet") by the due date. The wallet is never charged without that call. GET /wallet shows what is due in the next 30 days.
  6. Ending a server. Set auto_renew to false with PATCH /vms/{id} so no further renewal invoice is raised, then open a ticket to have it terminated; servers are not removed automatically. Unpaid servers are suspended a few days after the due date (status suspended) and later terminated; paying the invoice lifts a suspension.
Card and UPI payments (wallet top-ups, or paying an invoice by gateway) are completed by the account holder in the panel through the returned payment_url. Fully automated resellers pay everything from the wallet.

When something goes wrong, GET /api-logs shows every call your keys made — including refused ones and the reason — and GET /vm-actions shows what happened on your servers.

4 endpoints

Account#

The account the API key belongs to. Every other endpoint acts on this account only.

Check a key

#
GET /api/v1/ping Key access: read

Confirms the key works from this address. Use it to test a new key or a new server's whitelist entry.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/ping" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "pong": true,
        "account_id": "0b6f3f5e-8a51-4c43-9d7e-2c1f0a9b7d34",
        "key": {
            "id": 7,
            "name": "Billing system",
            "access": "full"
        },
        "ip": "203.0.113.10",
        "server_time": "2026-10-10T09:15:00Z",
        "api_version": "v1"
    }
}

Get the account

#
GET /api/v1/account Key access: read

Profile, wallet balance, tax rate and headline counters.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/account" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": "0b6f3f5e-8a51-4c43-9d7e-2c1f0a9b7d34",
        "name": "Asha Rao",
        "email": "asha@hostreseller.in",
        "phone": "+91 98200 12345",
        "company": "HostReseller Pvt Ltd",
        "address": "4th Floor, Andheri East",
        "city": "Mumbai",
        "state": "Maharashtra",
        "country": "India",
        "zip": "400069",
        "gst_number": "27ABCDE1234F1Z5",
        "wallet_balance": 15240.5,
        "currency": "INR",
        "vm_limit": null,
        "created_at": "2026-03-14T08:21:09Z",
        "stats": {
            "vms_total": 12,
            "vms_active": 11,
            "vms_suspended": 1,
            "vms_building": 0,
            "unpaid_invoices": 1,
            "amount_due": 588.82,
            "open_tickets": 1
        },
        "tax": {
            "name": "GST",
            "percent": 18.0
        }
    }
}

Update the account

#
PATCH /api/v1/account Key access: full

Change profile and billing details. Send only the fields to change; an empty string clears an optional field. Email and password can only be changed in the panel.

Body parameters

NameTypeDescription
nameoptional string 2–120 characters. Cannot be blank.
phoneoptional string Up to 30 characters.
companyoptional string Up to 150 characters.
addressoptional string Up to 255 characters.
cityoptional string Up to 100 characters.
stateoptional string Up to 100 characters.
countryoptional string Up to 100 characters.
zipoptional string Up to 20 characters.
gst_numberoptional string GSTIN printed on invoices. Up to 30 characters.

Example

Request · curl
curl -X PATCH "https://my.matrixstreamline.com/api/v1/account" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "company": "HostReseller Pvt Ltd",
    "gst_number": "27ABCDE1234F1Z5"
}'
Response200
{
    "data": {
        "id": "0b6f3f5e-8a51-4c43-9d7e-2c1f0a9b7d34",
        "name": "Asha Rao",
        "email": "asha@hostreseller.in",
        "phone": "+91 98200 12345",
        "company": "HostReseller Pvt Ltd",
        "address": "4th Floor, Andheri East",
        "city": "Mumbai",
        "state": "Maharashtra",
        "country": "India",
        "zip": "400069",
        "gst_number": "27ABCDE1234F1Z5",
        "wallet_balance": 15240.5,
        "currency": "INR",
        "vm_limit": null,
        "created_at": "2026-03-14T08:21:09Z"
    }
}

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
422validation_failedA field is too long, nothing was sent, or email/password was included.

List account activity

#
GET /api/v1/account/activity Key access: read

The audit trail of the account, newest first: sign-ins, profile changes, orders, payments, rebuilds, key changes. "via" tells whether the action came from the panel or the API.

Query parameters

NameTypeDescription
actionoptional string Only this action, e.g. login, order_placed, invoice_paid_wallet, vm_rebuild, api_key_revoked.
viaoptional string "api" or "panel".
searchoptional string Text in the description.
fromoptional date From this day (UTC), YYYY-MM-DD.
tooptional date Up to and including this day (UTC).
pageoptional integer Page number, from 1. Pages past the end return an empty list.
per_pageoptional integer Items per page, 1–100. Default 25.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/account/activity" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 45120,
            "action": "order_placed",
            "description": "Order for 1 × plan #2",
            "via": "api",
            "ip_address": "203.0.113.10",
            "created_at": "2026-10-10T09:12:40Z"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 1,
        "pages": 1
    }
}

Errors specific to this endpoint

StatusCodeWhen
422validation_failedvia is not api or panel, or a date is malformed.

8 endpoints

API keys & IP whitelist#

Keys are created in the panel under Account → API access, where the full key is shown once. Through the API you can list keys, manage the IP whitelist of each key and revoke keys — enough to rotate keys and follow your servers' addresses without signing in.

List keys

#
GET /api/v1/api-keys Key access: read

All keys on the account, active first. The secret is never returned — only its prefix.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/api-keys" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 7,
            "name": "Billing system",
            "prefix": "mlk_3f9a2c1d",
            "access": "full",
            "status": "active",
            "allowed_ips": [
                "203.0.113.10",
                "198.51.100.0/24"
            ],
            "expires_at": null,
            "last_used_at": "2026-10-10T09:14:02Z",
            "last_used_ip": "203.0.113.10",
            "created_at": "2026-09-01T11:00:00Z",
            "revoked_at": null
        },
        {
            "id": 4,
            "name": "Old monitoring",
            "prefix": "mlk_77b0e9aa",
            "access": "read",
            "status": "revoked",
            "allowed_ips": [
                "192.0.2.44"
            ],
            "expires_at": null,
            "last_used_at": "2026-08-30T22:10:00Z",
            "last_used_ip": "192.0.2.44",
            "created_at": "2026-05-02T07:30:00Z",
            "revoked_at": "2026-09-01T11:02:00Z"
        }
    ]
}
status is active, expired or revoked.

Get the calling key

#
GET /api/v1/api-keys/current Key access: read

The key that made this request.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/api-keys/current" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": 7,
        "name": "Billing system",
        "prefix": "mlk_3f9a2c1d",
        "access": "full",
        "status": "active",
        "allowed_ips": [
            "203.0.113.10",
            "198.51.100.0/24"
        ],
        "expires_at": null,
        "last_used_at": "2026-10-10T09:14:02Z",
        "last_used_ip": "203.0.113.10",
        "created_at": "2026-09-01T11:00:00Z",
        "revoked_at": null
    }
}

Get a key

#
GET /api/v1/api-keys/{id} Key access: read

Path parameters

NameTypeDescription
idrequired integer Key id from GET /api-keys.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/api-keys/7" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": 7,
        "name": "Billing system",
        "prefix": "mlk_3f9a2c1d",
        "access": "full",
        "status": "active",
        "allowed_ips": [
            "203.0.113.10",
            "198.51.100.0/24"
        ],
        "expires_at": null,
        "last_used_at": "2026-10-10T09:14:02Z",
        "last_used_ip": "203.0.113.10",
        "created_at": "2026-09-01T11:00:00Z",
        "revoked_at": null
    }
}

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo key with that id on your account.

Get a key's IP whitelist

#
GET /api/v1/api-keys/{id}/whitelist Key access: read

Path parameters

NameTypeDescription
idrequired integer Key id.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/api-keys/7/whitelist" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "key_id": 7,
        "allowed_ips": [
            "203.0.113.10",
            "198.51.100.0/24"
        ]
    }
}

Replace a key's IP whitelist

#
PUT /api/v1/api-keys/{id}/whitelist Key access: full

Sets the whole list. Entries are single IPv4/IPv6 addresses or CIDR ranges; they are stored in canonical form (198.51.100.7/24 becomes 198.51.100.0/24).

Path parameters

NameTypeDescription
idrequired integer Key id.

Body parameters

NameTypeDescription
ipsrequired string[] The new list, at most 50 entries. Must not be empty while the panel requires whitelists.
forceoptional boolean Apply even when the new list would block the address you are calling from (only checked when changing the calling key).

Example

Request · curl
curl -X PUT "https://my.matrixstreamline.com/api/v1/api-keys/7/whitelist" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ips": [
        "203.0.113.10",
        "203.0.113.11",
        "198.51.100.0/24",
        "2001:db8:42::/48"
    ]
}'
Response200
{
    "data": {
        "key_id": 7,
        "allowed_ips": [
            "203.0.113.10",
            "203.0.113.11",
            "198.51.100.0/24",
            "2001:db8:42::/48"
        ]
    }
}

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
409would_lock_outThe new list leaves out the address you are calling from. Resend with "force": true to apply it.
409key_revokedThe key is revoked.
422validation_failedAn entry is not an IP or CIDR range, the list is empty, or it has more than 50 entries.

Add to a key's IP whitelist

#
POST /api/v1/api-keys/{id}/whitelist Key access: full

Adds entries; ones already on the list are ignored.

Path parameters

NameTypeDescription
idrequired integer Key id.

Body parameters

NameTypeDescription
ipsrequired string[] Addresses or CIDR ranges to add.

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/api-keys/7/whitelist" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ips": [
        "192.0.2.50"
    ]
}'
Response200
{
    "data": {
        "key_id": 7,
        "allowed_ips": [
            "203.0.113.10",
            "198.51.100.0/24",
            "192.0.2.50"
        ]
    }
}

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
422validation_failedAn entry is invalid, or the list would exceed 50 entries.

Remove from a key's IP whitelist

#
DELETE /api/v1/api-keys/{id}/whitelist Key access: full

Removes the listed entries (exact matches after canonicalising).

Path parameters

NameTypeDescription
idrequired integer Key id.

Body parameters

NameTypeDescription
ipsrequired string[] Entries to remove.
forceoptional boolean Apply even if it blocks your current address.

Example

Request · curl
curl -X DELETE "https://my.matrixstreamline.com/api/v1/api-keys/7/whitelist" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ips": [
        "198.51.100.0/24"
    ]
}'
Response200
{
    "data": {
        "key_id": 7,
        "allowed_ips": [
            "203.0.113.10"
        ]
    }
}

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
409would_lock_outRemoving the entries would block the address you are calling from.
422validation_failedThe list would become empty while whitelists are required.

Revoke a key

#
DELETE /api/v1/api-keys/{id} Key access: full

Permanently disables a key. It can be the calling key: the response still arrives, and every later request with it gets 401 invalid_api_key.

Path parameters

NameTypeDescription
idrequired integer Key id.

Body

No body.

Example

Request · curl
curl -X DELETE "https://my.matrixstreamline.com/api/v1/api-keys/7" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": 7,
        "name": "Billing system",
        "prefix": "mlk_3f9a2c1d",
        "access": "full",
        "status": "revoked",
        "allowed_ips": [
            "203.0.113.10",
            "198.51.100.0/24"
        ],
        "expires_at": null,
        "last_used_at": "2026-10-10T09:14:02Z",
        "last_used_ip": "203.0.113.10",
        "created_at": "2026-09-01T11:00:00Z",
        "revoked_at": "2026-10-10T09:20:00Z"
    }
}

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
409already_revokedThe key was already revoked.

6 endpoints

Catalogue#

What can be ordered, where, and for how much. Only plans and locations that are open for orders are listed.

List product categories

#
GET /api/v1/categories Key access: read

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/categories" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 1,
            "name": "Linux VPS",
            "slug": "linux-vps",
            "tagline": "Root access in about a minute",
            "description": "KVM servers on NVMe with full root access.",
            "highlights": [
                "Full root access",
                "NVMe storage",
                "Dedicated IPv4",
                "Ready in about a minute"
            ],
            "plan_count": 4,
            "from_price": 299.0
        }
    ]
}

List plans

#
GET /api/v1/plans Key access: read

Orderable plans with their specs, price and the operating systems each allows. zone_ids is empty when the plan is sold in every zone.

Query parameters

NameTypeDescription
categoryoptional integer|string Only plans in this category (id or slug).
zone_idoptional integer Only plans sold in this zone.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/plans" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 2,
            "name": "Linux Standard",
            "slug": "linux-standard",
            "description": "Web apps, small databases and Kali",
            "category": {
                "id": 1,
                "name": "Linux VPS",
                "slug": "linux-vps"
            },
            "cpu_cores": 2,
            "ram_mb": 2048,
            "disk_gb": 50,
            "disk_type": "nvme",
            "bandwidth_gb": 2000,
            "network_speed_mbps": 1000,
            "ipv4_count": 1,
            "price_monthly": 499.0,
            "setup_fee": 0.0,
            "currency": "INR",
            "stock": null,
            "featured": true,
            "operating_systems": [
                {
                    "id": 1,
                    "name": "Ubuntu 24.04 LTS",
                    "family": "linux"
                },
                {
                    "id": 2,
                    "name": "Ubuntu 22.04 LTS",
                    "family": "linux"
                },
                {
                    "id": 4,
                    "name": "Debian 12 Bookworm",
                    "family": "linux"
                }
            ],
            "zone_ids": []
        }
    ]
}
stock is null when unlimited. Prices exclude tax; see GET /account for the tax rate, or GET /order-options for an exact quote.

Get a plan

#
GET /api/v1/plans/{id} Key access: read

One plan, plus the zones where it can be deployed right now and which of its operating systems each zone can install.

Path parameters

NameTypeDescription
idrequired integer|string Plan id or slug.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/plans/2" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": 2,
        "name": "Linux Standard",
        "slug": "linux-standard",
        "description": "Web apps, small databases and Kali",
        "category": {
            "id": 1,
            "name": "Linux VPS",
            "slug": "linux-vps"
        },
        "cpu_cores": 2,
        "ram_mb": 2048,
        "disk_gb": 50,
        "disk_type": "nvme",
        "bandwidth_gb": 2000,
        "network_speed_mbps": 1000,
        "ipv4_count": 1,
        "price_monthly": 499.0,
        "setup_fee": 0.0,
        "currency": "INR",
        "stock": null,
        "featured": true,
        "operating_systems": [
            {
                "id": 1,
                "name": "Ubuntu 24.04 LTS",
                "family": "linux"
            },
            {
                "id": 2,
                "name": "Ubuntu 22.04 LTS",
                "family": "linux"
            },
            {
                "id": 4,
                "name": "Debian 12 Bookworm",
                "family": "linux"
            }
        ],
        "zone_ids": [],
        "available_zones": [
            {
                "id": 1,
                "name": "Mumbai DC1",
                "slug": "mumbai-dc1",
                "city": "Mumbai",
                "country": "India",
                "country_code": "IN",
                "flag": "🇮🇳",
                "description": "Tier III, 10 Gbps uplinks",
                "operating_system_ids": [
                    1,
                    2,
                    4
                ]
            }
        ]
    }
}

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo active plan with that id or slug.

List zones

#
GET /api/v1/zones Key access: read

Locations taking new orders.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/zones" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 1,
            "name": "Mumbai DC1",
            "slug": "mumbai-dc1",
            "city": "Mumbai",
            "country": "India",
            "country_code": "IN",
            "flag": "🇮🇳",
            "description": "Tier III, 10 Gbps uplinks"
        }
    ]
}

List operating systems

#
GET /api/v1/operating-systems Key access: read

Every active OS in the catalogue. What you can actually install depends on the plan and zone — use GET /order-options for that.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/operating-systems" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 2,
            "name": "Ubuntu 22.04 LTS",
            "slug": "ubuntu-2204",
            "family": "linux",
            "version": "22.04",
            "default_username": "root",
            "min_disk_gb": 10,
            "min_ram_mb": 512,
            "logo_url": "https://panel.example.com/assets/img/os/ubuntu.svg?v=1760000000"
        }
    ]
}

Get order options and a price quote

#
GET /api/v1/order-options Key access: read

Everything needed to build a valid order for a plan in a zone: the installable operating systems, the host nodes, the free IP pools, and the exact price for the quantity — computed the way the invoice will be.

Query parameters

NameTypeDescription
plan_idrequired integer The plan.
zone_idrequired integer The zone.
quantityoptional integer Servers to price, 1–10. Default 1.
server_idoptional integer Limit OS and IP pools to one host node.
os_idoptional integer Limit IP pools to nodes that have this OS.
couponoptional string Include a coupon in the price quote.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/order-options?plan_id=2&zone_id=1&quantity=2" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "plan_id": 2,
        "zone_id": 1,
        "available": true,
        "operating_systems": [
            {
                "id": 2,
                "name": "Ubuntu 22.04 LTS",
                "family": "linux",
                "logo_url": "https://panel.example.com/assets/img/os/ubuntu.svg?v=1760000000"
            }
        ],
        "nodes": [
            {
                "id": 3,
                "name": "pve-mum-01"
            },
            {
                "id": 4,
                "name": "pve-mum-02"
            }
        ],
        "ips": [
            {
                "id": 120,
                "address": "161.248.163.12",
                "node_id": 3,
                "node": "pve-mum-01"
            }
        ],
        "ip_pools": [
            {
                "pool": "161.248.163",
                "label": "161.248.163.xxx",
                "free": 18
            },
            {
                "pool": "103.20.231",
                "label": "103.20.231.xxx",
                "free": 4
            }
        ],
        "pricing": {
            "quantity": 2,
            "price_monthly": 499.0,
            "setup_fee": 0.0,
            "subtotal": 998.0,
            "discount": 0.0,
            "coupon": null,
            "tax_name": "GST",
            "tax_percent": 18.0,
            "tax_amount": 179.64,
            "total": 1177.64,
            "renewal_monthly": 998.0,
            "currency": "INR"
        }
    }
}
ip_pools groups the free addresses by their first three parts; order in one with "ip_pool" on POST /orders and each server gets the next free address in it. ips (every free address) is deprecated and kept only so existing integrations keep working; use ip_pools. "available": false means the plan is not sold in that zone. total is what the order invoice will charge; tax is worked out after the discount. renewal_monthly is what the servers renew at each month, before tax (lower with a recurring coupon).

Errors specific to this endpoint

StatusCodeWhen
404not_foundThe plan does not exist or is not active.
422coupon_invalidA coupon was given and it does not fit this order.
422validation_failedplan_id or zone_id is missing, the zone is not taking orders, or quantity is out of range.

1 endpoint

Coupons#

Discount codes created by the panel administrator. A percentage coupon takes that share off each server's monthly price and, on the first invoice, its setup fee; a fixed coupon takes an amount off each server's monthly price. Recurring coupons keep the monthly discount on every renewal. Discounts come off before tax. Each order placed with a code is one use.

Check a coupon

#
GET /api/v1/coupons/{code} Key access: read

Tells whether a code can be used and what it takes off. With plan_id, every rule is checked for that plan and your account (dates, use limits, plan list, first-order rule) and the exact price is returned. Checking does not use up the code.

Path parameters

NameTypeDescription
coderequired string The coupon code; not case-sensitive.

Query parameters

NameTypeDescription
plan_idoptional integer Work out the discount for this plan.
quantityoptional integer Servers, 1–10. Default 1.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/coupons/WELCOME20?plan_id=2&quantity=1" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "code": "WELCOME20",
        "description": "20% off, every month",
        "type": "percent",
        "value": 20.0,
        "recurring": true,
        "first_order_only": false,
        "valid_from": null,
        "valid_until": "2026-12-31",
        "plan_ids": [],
        "valid_for_plan": true,
        "discount": {
            "per_server_first_invoice": 99.8,
            "renewal_per_server": 99.8,
            "first_invoice_total": 99.8
        },
        "pricing": {
            "quantity": 1,
            "price_monthly": 499.0,
            "setup_fee": 0.0,
            "subtotal": 499.0,
            "discount": 99.8,
            "coupon": "WELCOME20",
            "tax_name": "GST",
            "tax_percent": 18.0,
            "tax_amount": 71.86,
            "total": 471.06,
            "renewal_monthly": 399.2,
            "currency": "INR"
        }
    }
}
Without plan_id only the code itself is checked (exists and enabled); discount, pricing and valid_for_plan are then left out / null. plan_ids is empty when the code works on every plan. valid_until is the last day the code works.

Errors specific to this endpoint

StatusCodeWhen
404not_foundplan_id was given but is not an active plan.
422coupon_invalidThe code is unknown, disabled, not yet valid, expired, used up, not for this plan, already used by you, or for first orders only. The message says which.

3 endpoints

Orders#

An order buys 1–10 servers of one plan in one zone. Each server becomes its own order; they share one invoice. Paying the invoice builds every server automatically.

Place an order

#
POST /api/v1/orders Key access: full

Creates the orders and their invoice. With "pay_with": "wallet" the invoice is paid from the wallet in the same call and the servers start building at once; the wallet is checked first, so a short balance creates nothing. Without it the invoice waits for POST /invoices/{id}/pay.

Body parameters

NameTypeDescription
plan_idrequired integer Plan to order (GET /plans).
zone_idrequired integer Zone to deploy in (GET /zones).
os_idrequired integer Operating system; must be allowed by the plan and installable in the zone (GET /order-options).
hostnameoptional string Hostname for a single server. Letters, digits, hyphens and dots.
hostnamesoptional string[] One hostname per server for 1–10 servers, all different. Use this or hostname.
ip_pooloptional string An IP pool from GET /order-options, e.g. "161.248.163". Each server gets the next free address in it; without it the address is picked automatically.
ip_idsoptional integer[] Deprecated — exact IP ids from the ips list, at most one per server. Use ip_pool; do not send both.
server_idoptional integer Pin all servers to one host node in the zone.
couponoptional string A coupon code (not case-sensitive). The discount comes off before tax; check a code first with GET /coupons/{code}.
pay_withoptional string "wallet" to pay immediately from the wallet, or "none" (default) to leave the invoice unpaid.

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/orders" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c8e5e-2b8f-4f7e-9d0b-3e1a7c2d9f41" \
  -H "Content-Type: application/json" \
  -d '{
    "plan_id": 2,
    "zone_id": 1,
    "os_id": 2,
    "hostnames": [
        "web-01.client1042.in"
    ],
    "ip_pool": "161.248.163",
    "coupon": "WELCOME20",
    "pay_with": "wallet"
}'
Response201
{
    "data": {
        "orders": [
            {
                "id": 311,
                "order_number": "ORD-261010-A1B2C3",
                "status": "paid",
                "hostname": "web-01.client1042.in",
                "plan": {
                    "id": 2,
                    "name": "Linux Standard"
                },
                "zone": {
                    "id": 1,
                    "name": "Mumbai DC1"
                },
                "os": {
                    "id": 2,
                    "name": "Ubuntu 22.04 LTS"
                },
                "cpu_cores": 2,
                "ram_mb": 2048,
                "disk_gb": 50,
                "amount": 499.0,
                "setup_fee": 0.0,
                "coupon": "WELCOME20",
                "discount": 99.8,
                "renewal_discount": 99.8,
                "tax_amount": 71.86,
                "total": 471.06,
                "currency": "INR",
                "invoice_id": 902,
                "vm_id": null,
                "error_message": null,
                "created_at": "2026-10-10T09:12:40Z",
                "updated_at": "2026-10-10T09:12:41Z"
            }
        ],
        "invoice": {
            "id": 902,
            "invoice_number": "MTX-202610-0042",
            "type": "new",
            "status": "paid",
            "subtotal": 499.0,
            "discount": 99.8,
            "coupon_code": "WELCOME20",
            "tax": {
                "name": "GST",
                "percent": 18.0,
                "amount": 71.86
            },
            "total": 471.06,
            "amount_paid": 471.06,
            "amount_due": 0.0,
            "currency": "INR",
            "due_date": "2026-10-10",
            "overdue": false,
            "paid_at": "2026-10-10T09:12:41Z",
            "payment_method": "wallet",
            "created_at": "2026-10-10T09:12:40Z",
            "view_url": "https://panel.example.com/billing/invoices/902",
            "items": [
                {
                    "description": "Linux Standard — web-01.client1042.in (monthly)",
                    "quantity": 1,
                    "unit_price": 499.0,
                    "amount": 499.0,
                    "period_start": "2026-10-10",
                    "period_end": "2026-11-10",
                    "vm_id": null
                }
            ]
        },
        "payment": {
            "method": "wallet",
            "status": "paid",
            "error": null
        },
        "wallet_balance": 15358.26
    }
}
Send an Idempotency-Key header so a retried request can never place a second order. payment.status is "unpaid" without pay_with, "paid" on success, or "failed" (with payment.error) if the wallet changed between the check and the charge — the order then waits for payment. Poll GET /orders/{id} until status is completed; vm_id then holds the server id.

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
402insufficient_balancepay_with is wallet and the balance does not cover the total. Nothing was created.
422coupon_invalidThe coupon is unknown, disabled, expired, used up, not for this plan, or for first orders only. The message says which. Nothing was created.
422ip_pool_exhaustedThe chosen ip_pool has fewer free addresses than servers ordered. Nothing was created.
422order_rejectedThe order is not possible: sold out, OS not on the plan, zone closed, no capacity, IP taken, account server limit, invalid or duplicate hostnames. The message says which.
422validation_failedA required field is missing or malformed.

List orders

#
GET /api/v1/orders Key access: read

Query parameters

NameTypeDescription
statusoptional string pending, awaiting_payment, paid, provisioning, completed, failed or cancelled.
pageoptional integer Page number, from 1. Pages past the end return an empty list.
per_pageoptional integer Items per page, 1–100. Default 25.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/orders" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 311,
            "order_number": "ORD-261010-A1B2C3",
            "status": "completed",
            "hostname": "web-01.client1042.in",
            "plan": {
                "id": 2,
                "name": "Linux Standard"
            },
            "zone": {
                "id": 1,
                "name": "Mumbai DC1"
            },
            "os": {
                "id": 2,
                "name": "Ubuntu 22.04 LTS"
            },
            "cpu_cores": 2,
            "ram_mb": 2048,
            "disk_gb": 50,
            "amount": 499.0,
            "setup_fee": 0.0,
            "coupon": null,
            "discount": 0.0,
            "renewal_discount": 0.0,
            "tax_amount": 89.82,
            "total": 588.82,
            "currency": "INR",
            "invoice_id": 902,
            "vm_id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
            "error_message": null,
            "created_at": "2026-10-10T09:12:40Z",
            "updated_at": "2026-10-10T09:12:41Z"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 1,
        "pages": 1
    }
}

Get an order

#
GET /api/v1/orders/{id} Key access: read

Poll this after paying to follow the build: awaiting_payment → paid → provisioning → completed (or failed).

Path parameters

NameTypeDescription
idrequired integer|string Order id or order number (ORD-…).

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/orders/311" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": 311,
        "order_number": "ORD-261010-A1B2C3",
        "status": "completed",
        "hostname": "web-01.client1042.in",
        "plan": {
            "id": 2,
            "name": "Linux Standard"
        },
        "zone": {
            "id": 1,
            "name": "Mumbai DC1"
        },
        "os": {
            "id": 2,
            "name": "Ubuntu 22.04 LTS"
        },
        "cpu_cores": 2,
        "ram_mb": 2048,
        "disk_gb": 50,
        "amount": 499.0,
        "setup_fee": 0.0,
        "coupon": null,
        "discount": 0.0,
        "renewal_discount": 0.0,
        "tax_amount": 89.82,
        "total": 588.82,
        "currency": "INR",
        "invoice_id": 902,
        "vm_id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
        "error_message": null,
        "created_at": "2026-10-10T09:12:40Z",
        "updated_at": "2026-10-10T09:12:41Z"
    }
}

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo such order on your account.

14 endpoints

Servers#

Virtual servers on the account. A server's id is a UUID. Statuses: pending, provisioning, active, rebuilding, suspended, failed, terminated. power_state is running, stopped or unknown.

List servers

#
GET /api/v1/vms Key access: read

Newest first. Terminated servers are left out unless asked for.

Query parameters

NameTypeDescription
statusoptional string Only servers in this status.
searchoptional string Match hostname, label or primary IP.
include_terminatedoptional boolean Include terminated servers. Default false.
pageoptional integer Page number, from 1. Pages past the end return an empty list.
per_pageoptional integer Items per page, 1–100. Default 25.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/vms" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
            "hostname": "web-01.client1042.in",
            "label": "Client 1042 — web",
            "status": "active",
            "power_state": "running",
            "primary_ip": "103.20.10.11",
            "plan": {
                "id": 2,
                "name": "Linux Standard"
            },
            "os": {
                "id": 2,
                "name": "Ubuntu 22.04 LTS",
                "slug": "ubuntu-2204",
                "family": "linux"
            },
            "zone": {
                "id": 1,
                "name": "Mumbai DC1",
                "city": "Mumbai"
            },
            "node": "pve-mum-01",
            "specs": {
                "cpu_cores": 2,
                "ram_mb": 2048,
                "disk_gb": 50,
                "disk_type": "nvme",
                "bandwidth_gb": 2000,
                "network_speed_mbps": 1000
            },
            "billing": {
                "price": 499.0,
                "currency": "INR",
                "billing_cycle": "monthly",
                "next_due_date": "2026-11-10",
                "auto_renew": true
            },
            "created_at": "2026-10-10T09:12:44Z",
            "provisioned_at": "2026-10-10T09:14:31Z",
            "suspended_at": null,
            "terminated_at": null
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 1,
        "pages": 1
    }
}

Get a server

#
GET /api/v1/vms/{id} Key access: read

Full detail: IP addresses with gateway and netmask, login username and this month's bandwidth. The password is only returned by GET /vms/{id}/credentials.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
        "hostname": "web-01.client1042.in",
        "label": "Client 1042 — web",
        "status": "active",
        "power_state": "running",
        "primary_ip": "103.20.10.11",
        "plan": {
            "id": 2,
            "name": "Linux Standard"
        },
        "os": {
            "id": 2,
            "name": "Ubuntu 22.04 LTS",
            "slug": "ubuntu-2204",
            "family": "linux"
        },
        "zone": {
            "id": 1,
            "name": "Mumbai DC1",
            "city": "Mumbai"
        },
        "node": "pve-mum-01",
        "specs": {
            "cpu_cores": 2,
            "ram_mb": 2048,
            "disk_gb": 50,
            "disk_type": "nvme",
            "bandwidth_gb": 2000,
            "network_speed_mbps": 1000
        },
        "billing": {
            "price": 499.0,
            "currency": "INR",
            "billing_cycle": "monthly",
            "next_due_date": "2026-11-10",
            "auto_renew": true
        },
        "created_at": "2026-10-10T09:12:44Z",
        "provisioned_at": "2026-10-10T09:14:31Z",
        "suspended_at": null,
        "terminated_at": null,
        "username": "root",
        "error_message": null,
        "ips": [
            {
                "address": "103.20.10.11",
                "type": "ipv4",
                "cidr": 24,
                "netmask": "255.255.255.0",
                "gateway": "103.20.10.1",
                "mac": "BC:24:11:5A:9E:01",
                "rdns": null
            }
        ],
        "traffic": {
            "period": "2026-10",
            "used_bytes": 48318382080,
            "limit_bytes": 2147483648000,
            "used_percent": 2.25
        },
        "rebuild": null
    }
}
error_message is set only when status is failed. traffic.limit_bytes is null for unmetered plans. rebuild is "queued" or "running" while a rebuild job exists for the server or the server is rebuilding, and null otherwise; status stays "active" while the job is queued, so watch rebuild, not status.

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo server with that id on your account.

Update label or auto-renew

#
PATCH /api/v1/vms/{id} Key access: full

Set a private label (for example your customer's reference) and switch auto-renew. With auto-renew off, no renewal invoice is raised and the server ends after its paid period.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Body parameters

NameTypeDescription
labeloptional string|null Up to 120 characters; empty or null clears it.
auto_renewoptional boolean Raise a renewal invoice each month.

Example

Request · curl
curl -X PATCH "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Client 1042 — web",
    "auto_renew": true
}'
Response200
{
    "data": {
        "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
        "hostname": "web-01.client1042.in",
        "label": "Client 1042 — web",
        "status": "active",
        "power_state": "running",
        "primary_ip": "103.20.10.11",
        "plan": {
            "id": 2,
            "name": "Linux Standard"
        },
        "os": {
            "id": 2,
            "name": "Ubuntu 22.04 LTS",
            "slug": "ubuntu-2204",
            "family": "linux"
        },
        "zone": {
            "id": 1,
            "name": "Mumbai DC1",
            "city": "Mumbai"
        },
        "node": "pve-mum-01",
        "specs": {
            "cpu_cores": 2,
            "ram_mb": 2048,
            "disk_gb": 50,
            "disk_type": "nvme",
            "bandwidth_gb": 2000,
            "network_speed_mbps": 1000
        },
        "billing": {
            "price": 499.0,
            "currency": "INR",
            "billing_cycle": "monthly",
            "next_due_date": "2026-11-10",
            "auto_renew": true
        },
        "created_at": "2026-10-10T09:12:44Z",
        "provisioned_at": "2026-10-10T09:14:31Z",
        "suspended_at": null,
        "terminated_at": null,
        "username": "root",
        "error_message": null,
        "ips": [
            {
                "address": "103.20.10.11",
                "type": "ipv4",
                "cidr": 24,
                "netmask": "255.255.255.0",
                "gateway": "103.20.10.1",
                "mac": "BC:24:11:5A:9E:01",
                "rdns": null
            }
        ],
        "traffic": {
            "period": "2026-10",
            "used_bytes": 48318382080,
            "limit_bytes": 2147483648000,
            "used_percent": 2.25
        },
        "rebuild": null
    }
}

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
404not_foundNo server with that id on your account.
422validation_failedNeither field sent, or a value is invalid.

Get login credentials

#
GET /api/v1/vms/{id}/credentials Key access: read

The username and current password of the server, for handing over to your customer. Kept out of every other response on purpose.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d/credentials" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
        "hostname": "web-01.client1042.in",
        "ip": "103.20.10.11",
        "username": "root",
        "password": "q7T!vR2m-Kx9pL4s",
        "os_family": "linux",
        "login_with": "ssh"
    }
}
login_with is ssh for Linux and rdp for Windows. password is null while the server is still being built.

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo server with that id on your account.

Get live status

#
GET /api/v1/vms/{id}/status Key access: read

Reads the power state and resource use from the hypervisor right now.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d/status" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
        "status": "active",
        "power_state": "running",
        "usage": {
            "cpu_percent": 6.4,
            "memory_bytes": 912261120,
            "memory_total_bytes": 2147483648,
            "memory_percent": 42.5,
            "disk_total_bytes": 53687091200,
            "uptime_seconds": 86211
        },
        "traffic": {
            "period": "2026-10",
            "used_bytes": 48318382080,
            "limit_bytes": 2147483648000,
            "used_percent": 2.25
        },
        "error": null
    }
}
usage is null when the server is not active. If the hypervisor cannot be reached, power_state is "unknown" and error explains it (still HTTP 200).

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo server with that id on your account.

Get usage graphs

#
GET /api/v1/vms/{id}/metrics Key access: read

CPU, memory and network time series for charts. time is a Unix timestamp; network values are average bytes per second over each sample.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Query parameters

NameTypeDescription
timeframeoptional string hour, day (default), week or month.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d/metrics" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "timeframe": "day",
        "series": [
            {
                "time": 1760086800,
                "cpu_percent": 5.12,
                "memory_bytes": 905969664,
                "net_in_bytes_sec": 18233.4,
                "net_out_bytes_sec": 40211.9
            },
            {
                "time": 1760088600,
                "cpu_percent": 7.3,
                "memory_bytes": 912261120,
                "net_in_bytes_sec": 20110.0,
                "net_out_bytes_sec": 51876.2
            }
        ]
    }
}

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo server with that id on your account.
502hypervisor_unavailableThe hypervisor could not be reached.

Get bandwidth usage

#
GET /api/v1/vms/{id}/traffic Key access: read

This month's usage against the plan allowance, and previous months.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Query parameters

NameTypeDescription
monthsoptional integer Months of history, 1–24. Default 6.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d/traffic" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "current": {
            "period": "2026-10",
            "used_bytes": 48318382080,
            "limit_bytes": 2147483648000,
            "used_percent": 2.25
        },
        "history": [
            {
                "period": "2026-10",
                "in_bytes": 12079595520,
                "out_bytes": 36238786560,
                "total_bytes": 48318382080
            }
        ]
    }
}

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo server with that id on your account.

List server actions

#
GET /api/v1/vms/{id}/actions Key access: read

Power actions, rebuilds, password resets, Reconfigure IP ("network") and console sessions on this server, newest first.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Query parameters

NameTypeDescription
pageoptional integer Page number, from 1. Pages past the end return an empty list.
per_pageoptional integer Items per page, 1–100. Default 25.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d/actions" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 9921,
            "action": "reboot",
            "status": "success",
            "message": "Requested via API",
            "by": "Asha Rao",
            "created_at": "2026-10-10T11:40:00Z"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 1,
        "pages": 1
    }
}

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo server with that id on your account.

List rebuild options

#
GET /api/v1/vms/{id}/os-options Key access: read

Operating systems this server can be rebuilt to: allowed by its plan and available on its node.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d/os-options" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 2,
            "name": "Ubuntu 22.04 LTS",
            "slug": "ubuntu-2204",
            "family": "linux",
            "version": "22.04",
            "default_username": "root",
            "min_disk_gb": 10,
            "min_ram_mb": 512,
            "logo_url": "https://panel.example.com/assets/img/os/ubuntu.svg?v=1760000000"
        }
    ]
}

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo server with that id on your account.

Power action

#
POST /api/v1/vms/{id}/power Key access: full

Sends a power command to the hypervisor. It runs asynchronously; check GET /vms/{id}/status a few seconds later.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Body parameters

NameTypeDescription
actionrequired string start, stop (hard power-off), shutdown (graceful, via ACPI), reboot or reset (hard reset).

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d/power" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "reboot"
}'
Response202
{
    "data": {
        "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
        "action": "reboot",
        "accepted": true,
        "expected_power_state": "running"
    }
}

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
404not_foundNo server with that id on your account.
409vm_suspendedThe server is suspended for an unpaid invoice.
409vm_busyThe server is still being built or rebuilt.
409rebuild_pendingA rebuild job for the server has not ended yet. Retry later: the 409 clears as soon as the job ends, when GET /vms/{id} shows "rebuild": null.
409vm_terminatedThe server is terminated (vm_failed when its build failed).
422validation_failedaction is missing or not one of the five.
429action_too_frequentThe same action was sent to this server in the last 8 seconds.
502power_action_failedThe hypervisor refused or could not be reached.

Rebuild (reinstall)

#
POST /api/v1/vms/{id}/rebuild Key access: full

Erases the disk and installs the chosen operating system. The id, hostname, IP and billing stay the same. The rebuild is queued: status stays "active" until the job starts, then shows "rebuilding", then "active" again, so poll GET /vms/{id} until its rebuild field is null rather than watching status. A new password is generated unless you send one.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Body parameters

NameTypeDescription
os_idrequired integer Target OS, from GET /vms/{id}/os-options.
confirmrequired string The server's exact hostname, as a safeguard — all data is lost.
passwordoptional string Root/Administrator password for the new install, 8–72 characters. Generated when omitted.

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d/rebuild" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "os_id": 4,
    "confirm": "web-01.client1042.in"
}'
Response202
{
    "data": {
        "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
        "queued": true,
        "os_id": 4,
        "password": "generated",
        "message": "Rebuild queued. Status stays \"active\" until the job starts, so poll GET /vms/{id} until \"rebuild\" is null. Then GET /vms/{id}/actions shows the outcome; read the new login from GET /vms/{id}/credentials only after a rebuild entry with status \"success\"."
    }
}
The account owner is also emailed the new login when the rebuild finishes. Once rebuild is null, the newest rebuild entry in GET /vms/{id}/actions tells you how it ended: success (read /credentials), failed (the server returns to its previous status; the message says why), or still the "pending" entry from queueing, which means the job was refused before it touched the server (for example because the server was suspended meanwhile) and the old install and login are unchanged.

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
404not_foundNo server with that id on your account.
409rebuild_in_progressA rebuild of this server is already queued.
409vm_suspendedThe server is suspended (also vm_busy, vm_terminated, vm_failed as for power actions).
422validation_failedconfirm does not match the hostname, the OS is not allowed, or the password length is wrong.

Reset the password

#
POST /api/v1/vms/{id}/password Key access: full

Sets a new root/Administrator password. Servers with the guest agent take it at once; others after their next reboot.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Body parameters

NameTypeDescription
passwordoptional string 8–72 characters. A strong one is generated when omitted.

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d/password" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "password": "N3w-Str0ng!Pass"
}'
Response200
{
    "data": {
        "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
        "username": "root",
        "password": "N3w-Str0ng!Pass",
        "applied": "immediately",
        "message": "The new password works now."
    }
}
applied is "immediately" or "after_reboot".

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
404not_foundNo server with that id on your account.
409vm_busyThe server is not active.
409rebuild_pendingA rebuild is queued for the server; the new install gets its own password.
502password_reset_failedThe hypervisor could not apply it.

Reconfigure IP

#
POST /api/v1/vms/{id}/network Key access: full

Sets the server's IP address, gateway and DNS inside it again, the way the panel set them up, through the guest agent. Use it when the network inside the server was changed or stopped working. The hostname and disk are left alone; the connection drops for a few seconds. The server must be running.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Body

No body.

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d/network" \
  -H "Authorization: Bearer $API_KEY"
Response202
{
    "data": {
        "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
        "queued": true,
        "message": "Reconfigure IP queued. It takes under a minute on Linux, a little longer on Windows; GET /vms/{id}/actions shows a \"network\" entry with status \"success\" or \"failed\" when it is done."
    }
}
The job runs in the background. Poll GET /vms/{id}/actions for the "network" entry; a failed one explains why (for example a stopped server or no guest agent).

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
404not_foundNo server with that id on your account.
409vm_busyThe server is not active.
409vm_suspendedThe server is suspended.
409rebuild_pendingA rebuild is queued for the server.
409network_pendingA Reconfigure IP of this server is already queued.

Open a VNC console

#
POST /api/v1/vms/{id}/console Key access: full

Creates a one-time console session for embedding noVNC in your own panel: connect noVNC to websocket_url and use vnc_password as the VNC password. Valid once, for 120 seconds.

Path parameters

NameTypeDescription
idrequired uuid The server's id (a UUID) from GET /vms.

Body

No body.

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/vms/6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d/console" \
  -H "Authorization: Bearer $API_KEY"
Response201
{
    "data": {
        "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
        "websocket_url": "wss://panel.example.com/console-ws?token=4be1c0…e9",
        "token": "4be1c0…e9",
        "vnc_password": "PVEVNC:6720A1F3::…",
        "expires_at": "2026-10-10T11:42:00Z"
    }
}

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
404not_foundNo server with that id on your account.
409vm_busyThe server is not active.
409rebuild_pendingA rebuild is queued for the server.
502console_failedThe hypervisor could not open a session.
503console_unavailableThe console bridge is not configured on this panel.

4 endpoints

Invoices & payments#

Invoice types: new (an order), renewal (a server's next month), topup (wallet deposit, no tax) and manual. Statuses: unpaid, paid, cancelled, refunded. Renewal invoices are raised automatically before the due date; pay them with POST /invoices/{id}/pay — the wallet is not charged automatically.

List invoices

#
GET /api/v1/invoices Key access: read

Query parameters

NameTypeDescription
statusoptional string unpaid, paid, cancelled or refunded.
typeoptional string new, renewal, topup or manual.
overdueoptional boolean Only unpaid invoices past their due date.
pageoptional integer Page number, from 1. Pages past the end return an empty list.
per_pageoptional integer Items per page, 1–100. Default 25.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/invoices" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 915,
            "invoice_number": "MTX-202610-0051",
            "type": "renewal",
            "status": "unpaid",
            "subtotal": 499.0,
            "discount": 0.0,
            "coupon_code": null,
            "tax": {
                "name": "GST",
                "percent": 18.0,
                "amount": 89.82
            },
            "total": 588.82,
            "amount_paid": 0.0,
            "amount_due": 588.82,
            "currency": "INR",
            "due_date": "2026-11-10",
            "overdue": false,
            "paid_at": null,
            "payment_method": null,
            "created_at": "2026-10-10T09:12:40Z",
            "view_url": "https://panel.example.com/billing/invoices/915"
        },
        {
            "id": 902,
            "invoice_number": "MTX-202610-0042",
            "type": "new",
            "status": "paid",
            "subtotal": 499.0,
            "discount": 0.0,
            "coupon_code": null,
            "tax": {
                "name": "GST",
                "percent": 18.0,
                "amount": 89.82
            },
            "total": 588.82,
            "amount_paid": 588.82,
            "amount_due": 0.0,
            "currency": "INR",
            "due_date": "2026-10-10",
            "overdue": false,
            "paid_at": "2026-10-10T09:12:41Z",
            "payment_method": "wallet",
            "created_at": "2026-10-10T09:12:40Z",
            "view_url": "https://panel.example.com/billing/invoices/902"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 2,
        "pages": 1
    }
}

Get an invoice

#
GET /api/v1/invoices/{id} Key access: read

With its line items and every payment attempt.

Path parameters

NameTypeDescription
idrequired integer|string Invoice id or invoice number (MTX-…).

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/invoices/915" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": 902,
        "invoice_number": "MTX-202610-0042",
        "type": "new",
        "status": "paid",
        "subtotal": 499.0,
        "discount": 0.0,
        "coupon_code": null,
        "tax": {
            "name": "GST",
            "percent": 18.0,
            "amount": 89.82
        },
        "total": 588.82,
        "amount_paid": 588.82,
        "amount_due": 0.0,
        "currency": "INR",
        "due_date": "2026-10-10",
        "overdue": false,
        "paid_at": "2026-10-10T09:12:41Z",
        "payment_method": "wallet",
        "created_at": "2026-10-10T09:12:40Z",
        "view_url": "https://panel.example.com/billing/invoices/902",
        "items": [
            {
                "description": "Linux Standard — web-01.client1042.in (monthly)",
                "quantity": 1,
                "unit_price": 499.0,
                "amount": 499.0,
                "period_start": "2026-10-10",
                "period_end": "2026-11-10",
                "vm_id": null
            }
        ],
        "payments": [
            {
                "id": 5521,
                "reference": "TXN261010091241A9F3C2",
                "invoice_id": 902,
                "invoice_number": "MTX-202610-0042",
                "gateway": "wallet",
                "type": "payment",
                "amount": 588.82,
                "fee": 0.0,
                "currency": "INR",
                "status": "success",
                "failure_reason": null,
                "created_at": "2026-10-10T09:12:41Z"
            }
        ]
    }
}
view_url opens the invoice in the panel (sign-in required).

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo such invoice on your account.

Pay an invoice

#
POST /api/v1/invoices/{id}/pay Key access: full

"wallet" settles the invoice at once from the wallet balance and runs its effects (builds ordered servers, extends a renewal, lifts a suspension). A gateway ("razorpay" or "cashfree") returns a payment_url for the account holder to complete in a browser signed in to the panel; the invoice is marked paid automatically when the gateway confirms.

Path parameters

NameTypeDescription
idrequired integer|string Invoice id or number.

Body parameters

NameTypeDescription
methodrequired string "wallet", or an enabled gateway name (see GET /wallet → topup.gateways).

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/invoices/915/pay" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c8e5e-2b8f-4f7e-9d0b-3e1a7c2d9f41" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "wallet"
}'
Response200
{
    "data": {
        "invoice": {
            "id": 915,
            "invoice_number": "MTX-202610-0051",
            "type": "renewal",
            "status": "paid",
            "subtotal": 499.0,
            "discount": 0.0,
            "coupon_code": null,
            "tax": {
                "name": "GST",
                "percent": 18.0,
                "amount": 89.82
            },
            "total": 588.82,
            "amount_paid": 588.82,
            "amount_due": 0.0,
            "currency": "INR",
            "due_date": "2026-10-10",
            "overdue": false,
            "paid_at": "2026-10-10T09:12:41Z",
            "payment_method": "wallet",
            "created_at": "2026-10-10T09:12:40Z",
            "view_url": "https://panel.example.com/billing/invoices/902",
            "items": [
                {
                    "description": "Linux Standard — web-01.client1042.in (monthly)",
                    "quantity": 1,
                    "unit_price": 499.0,
                    "amount": 499.0,
                    "period_start": "2026-10-10",
                    "period_end": "2026-11-10",
                    "vm_id": null
                }
            ],
            "payments": [
                {
                    "id": 5521,
                    "reference": "TXN261010091241A9F3C2",
                    "invoice_id": 902,
                    "invoice_number": "MTX-202610-0042",
                    "gateway": "wallet",
                    "type": "payment",
                    "amount": 588.82,
                    "fee": 0.0,
                    "currency": "INR",
                    "status": "success",
                    "failure_reason": null,
                    "created_at": "2026-10-10T09:12:41Z"
                }
            ]
        },
        "payment": {
            "method": "wallet",
            "status": "paid"
        },
        "wallet_balance": 14651.68
    }
}
Gateway response: {"data": {"invoice": {…}, "payment": {"method": "razorpay", "status": "pending", "payment_url": "https://panel.example.com/billing/checkout/915/razorpay", "message": "…"}}}. Send an Idempotency-Key when paying so a retry cannot pay twice (a repeat wallet payment of a paid invoice is refused with already_paid anyway).

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
402insufficient_balanceThe wallet does not cover the amount due.
409already_paidThe invoice is already paid.
409invoice_not_payableThe invoice is cancelled or refunded.
422invalid_methodA top-up invoice cannot be paid from the wallet.
422validation_failedmethod is missing or not available.

List payments

#
GET /api/v1/transactions Key access: read

Every payment and top-up attempt, newest first. gateway is razorpay, cashfree, wallet, manual or credit.

Query parameters

NameTypeDescription
statusoptional string pending, success, failed, cancelled or refunded.
pageoptional integer Page number, from 1. Pages past the end return an empty list.
per_pageoptional integer Items per page, 1–100. Default 25.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/transactions" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 5521,
            "reference": "TXN261010091241A9F3C2",
            "invoice_id": 902,
            "invoice_number": "MTX-202610-0042",
            "gateway": "wallet",
            "type": "payment",
            "amount": 588.82,
            "fee": 0.0,
            "currency": "INR",
            "status": "success",
            "failure_reason": null,
            "created_at": "2026-10-10T09:12:41Z"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 1,
        "pages": 1
    }
}

3 endpoints

Wallet#

A prepaid balance. Resellers usually keep it funded and order with "pay_with": "wallet", so servers are built without any manual step. Every movement is recorded in a double-entry ledger.

Get the wallet

#
GET /api/v1/wallet Key access: read

Balance, totals, renewals coming due in the next 30 days, and top-up limits.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/wallet" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "balance": 15240.5,
        "currency": "INR",
        "total_added": 50000.0,
        "total_spent": 34759.5,
        "spent_this_month": 1764.46,
        "renewals_next_30_days": {
            "servers": 11,
            "amount": 7289.0,
            "note": "Before tax. Pay each renewal invoice with POST /invoices/{id}/pay by its due date; the wallet is not charged automatically."
        },
        "topup": {
            "min": 100.0,
            "max": 200000.0,
            "gateways": [
                "razorpay",
                "cashfree"
            ]
        }
    }
}

List wallet movements

#
GET /api/v1/wallet/transactions Key access: read

Every credit and debit with the balance before and after, newest first.

Query parameters

NameTypeDescription
typeoptional string credit or debit.
pageoptional integer Page number, from 1. Pages past the end return an empty list.
per_pageoptional integer Items per page, 1–100. Default 25.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/wallet/transactions" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 1288,
            "type": "debit",
            "amount": 588.82,
            "balance_before": 15829.32,
            "balance_after": 15240.5,
            "description": "Payment for invoice MTX-202610-0042",
            "reference_type": "invoice",
            "reference_id": 902,
            "created_at": "2026-10-10T09:12:41Z"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 1,
        "pages": 1
    }
}

Start a top-up

#
POST /api/v1/wallet/topup Key access: full

Raises a top-up invoice (a deposit, so no tax) and returns the payment_url where the account holder pays by card, UPI or net banking in a browser signed in to the panel. The wallet is credited when the gateway confirms.

Body parameters

NameTypeDescription
amountrequired number Amount to add, within the min/max from GET /wallet.
gatewayrequired string An enabled gateway: razorpay or cashfree.

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/wallet/topup" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c8e5e-2b8f-4f7e-9d0b-3e1a7c2d9f41" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 10000,
    "gateway": "razorpay"
}'
Response201
{
    "data": {
        "invoice": {
            "id": 930,
            "invoice_number": "MTX-202610-0060",
            "type": "topup",
            "status": "unpaid",
            "subtotal": 10000.0,
            "discount": 0.0,
            "coupon_code": null,
            "tax": {
                "name": "GST",
                "percent": 0.0,
                "amount": 0.0
            },
            "total": 10000.0,
            "amount_paid": 0.0,
            "amount_due": 10000.0,
            "currency": "INR",
            "due_date": "2026-10-10",
            "overdue": false,
            "paid_at": null,
            "payment_method": null,
            "created_at": "2026-10-10T09:12:40Z",
            "view_url": "https://panel.example.com/billing/invoices/930"
        },
        "payment": {
            "method": "razorpay",
            "status": "pending",
            "payment_url": "https://panel.example.com/billing/checkout/930/razorpay",
            "message": "Open payment_url in a browser signed in to this account to pay. The wallet is credited as soon as the gateway confirms."
        }
    }
}

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
422validation_failedAmount outside the limits, or the gateway is not enabled.

5 endpoints

Support tickets#

Ticket statuses: open, answered (staff replied), customer_reply (you replied), on_hold, closed.

List tickets

#
GET /api/v1/tickets Key access: read

Query parameters

NameTypeDescription
statusoptional string open, answered, customer_reply, on_hold or closed.
pageoptional integer Page number, from 1. Pages past the end return an empty list.
per_pageoptional integer Items per page, 1–100. Default 25.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/tickets" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 77,
            "ticket_number": "TKT-9C1E44AB",
            "subject": "Reverse DNS for 103.20.10.11",
            "department": "support",
            "priority": "medium",
            "status": "open",
            "vm": {
                "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
                "hostname": "web-01.client1042.in"
            },
            "reply_count": 1,
            "last_reply_at": "2026-10-10T10:02:13Z",
            "created_at": "2026-10-10T10:02:13Z",
            "updated_at": "2026-10-10T10:02:13Z"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 1,
        "pages": 1
    }
}

Open a ticket

#
POST /api/v1/tickets Key access: full

Staff are notified by email.

Body parameters

NameTypeDescription
subjectrequired string 4–190 characters.
messagerequired string At least 10 characters.
departmentoptional string support (default), billing, abuse or sales.
priorityoptional string low, medium (default), high or urgent.
vm_idoptional uuid The server this is about.

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/tickets" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "Reverse DNS for 103.20.10.11",
    "department": "support",
    "priority": "medium",
    "vm_id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
    "message": "Please set the PTR record of 103.20.10.11 to web-01.client1042.in."
}'
Response201
{
    "data": {
        "id": 77,
        "ticket_number": "TKT-9C1E44AB",
        "subject": "Reverse DNS for 103.20.10.11",
        "department": "support",
        "priority": "medium",
        "status": "open",
        "vm": {
            "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
            "hostname": "web-01.client1042.in"
        },
        "reply_count": 1,
        "last_reply_at": "2026-10-10T10:02:13Z",
        "created_at": "2026-10-10T10:02:13Z",
        "updated_at": "2026-10-10T10:02:13Z",
        "replies": [
            {
                "id": 301,
                "from": "client",
                "author": "Asha Rao",
                "message": "Please set the PTR record of 103.20.10.11 to web-01.client1042.in.",
                "created_at": "2026-10-10T10:02:13Z"
            }
        ]
    }
}

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
422validation_failedA field is missing or invalid, or vm_id is not your server.

Get a ticket

#
GET /api/v1/tickets/{id} Key access: read

With the whole conversation, oldest message first.

Path parameters

NameTypeDescription
idrequired integer|string Ticket id or ticket number (TKT-…).

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/tickets/77" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": 77,
        "ticket_number": "TKT-9C1E44AB",
        "subject": "Reverse DNS for 103.20.10.11",
        "department": "support",
        "priority": "medium",
        "status": "answered",
        "vm": {
            "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
            "hostname": "web-01.client1042.in"
        },
        "reply_count": 2,
        "last_reply_at": "2026-10-10T10:02:13Z",
        "created_at": "2026-10-10T10:02:13Z",
        "updated_at": "2026-10-10T10:02:13Z",
        "replies": [
            {
                "id": 301,
                "from": "client",
                "author": "Asha Rao",
                "message": "Please set the PTR record of 103.20.10.11 to web-01.client1042.in.",
                "created_at": "2026-10-10T10:02:13Z"
            },
            {
                "id": 305,
                "from": "staff",
                "author": "Support Team",
                "message": "Done — the PTR now points to web-01.client1042.in.",
                "created_at": "2026-10-10T10:31:50Z"
            }
        ]
    }
}

Errors specific to this endpoint

StatusCodeWhen
404not_foundNo such ticket on your account.

Reply to a ticket

#
POST /api/v1/tickets/{id}/replies Key access: full

Path parameters

NameTypeDescription
idrequired integer|string Ticket id or number.

Body parameters

NameTypeDescription
messagerequired string At least 2 characters.

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/tickets/77/replies" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Thanks! Please do the same for web-02."
}'
Response201
{
    "data": {
        "id": 77,
        "ticket_number": "TKT-9C1E44AB",
        "subject": "Reverse DNS for 103.20.10.11",
        "department": "support",
        "priority": "medium",
        "status": "customer_reply",
        "vm": {
            "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
            "hostname": "web-01.client1042.in"
        },
        "reply_count": 3,
        "last_reply_at": "2026-10-10T10:02:13Z",
        "created_at": "2026-10-10T10:02:13Z",
        "updated_at": "2026-10-10T10:02:13Z",
        "replies": [
            {
                "id": 301,
                "from": "client",
                "author": "Asha Rao",
                "message": "Please set the PTR record of 103.20.10.11 to web-01.client1042.in.",
                "created_at": "2026-10-10T10:02:13Z"
            }
        ]
    }
}
The response is the full ticket (as GET /tickets/{id}) including your new reply.

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
409ticket_closedThe ticket is closed; open a new one.
422validation_failedmessage is missing or too short.

Close a ticket

#
POST /api/v1/tickets/{id}/close Key access: full

Path parameters

NameTypeDescription
idrequired integer|string Ticket id or number.

Body

No body.

Example

Request · curl
curl -X POST "https://my.matrixstreamline.com/api/v1/tickets/77/close" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": {
        "id": 77,
        "ticket_number": "TKT-9C1E44AB",
        "subject": "Reverse DNS for 103.20.10.11",
        "department": "support",
        "priority": "medium",
        "status": "closed",
        "vm": {
            "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
            "hostname": "web-01.client1042.in"
        },
        "reply_count": 1,
        "last_reply_at": "2026-10-10T10:02:13Z",
        "created_at": "2026-10-10T10:02:13Z",
        "updated_at": "2026-10-10T10:02:13Z",
        "replies": [
            {
                "id": 301,
                "from": "client",
                "author": "Asha Rao",
                "message": "Please set the PTR record of 103.20.10.11 to web-01.client1042.in.",
                "created_at": "2026-10-10T10:02:13Z"
            }
        ]
    }
}

Errors specific to this endpoint

StatusCodeWhen
403read_only_keyThe key is read-only.
404not_foundNo such ticket on your account.

2 endpoints

Logs#

Your own logs, for audits and debugging integrations. API calls are kept 30 days; account activity and server actions 180 days. The account audit trail is GET /account/activity.

List API calls

#
GET /api/v1/api-logs Key access: read

Every request made with this account's keys, newest first — including refused ones (wrong IP, read-only key, rate limit) so you can see why an integration failed.

Query parameters

NameTypeDescription
key_idoptional integer Only calls made with this key.
methodoptional string GET, POST, PUT, PATCH or DELETE.
statusoptional string An exact status such as 403, or a class: 2xx, 4xx, 5xx.
errors_onlyoptional boolean Only responses 400 and above.
pathoptional string Text in the path, e.g. /orders.
fromoptional date From this day (UTC), YYYY-MM-DD.
tooptional date Up to and including this day (UTC).
pageoptional integer Page number, from 1. Pages past the end return an empty list.
per_pageoptional integer Items per page, 1–100. Default 25.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/api-logs" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "request_id": "req_51c0d2e3f4a5b6c7",
            "method": "POST",
            "path": "/api/v1/orders",
            "status": 201,
            "error_code": null,
            "key": {
                "id": 7,
                "name": "Billing system",
                "prefix": "mlk_3f9a2c1d"
            },
            "ip_address": "203.0.113.10",
            "duration_ms": 184,
            "created_at": "2026-10-10T09:12:41Z"
        },
        {
            "request_id": "req_9f2c4b1a7d3e5f60",
            "method": "GET",
            "path": "/api/v1/vms",
            "status": 403,
            "error_code": "ip_not_whitelisted",
            "key": {
                "id": 7,
                "name": "Billing system",
                "prefix": "mlk_3f9a2c1d"
            },
            "ip_address": "192.0.2.77",
            "duration_ms": 6,
            "created_at": "2026-10-10T08:58:03Z"
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 2,
        "pages": 1
    }
}
request_id matches the X-Request-Id header of the response. Calls with a missing or unknown key are not logged (they belong to no account).

Errors specific to this endpoint

StatusCodeWhen
422validation_failedA filter value is malformed.

List server actions

#
GET /api/v1/vm-actions Key access: read

Power actions, builds, rebuilds, password resets, console sessions, suspensions and terminations on all your servers, newest first. For one server you can also use GET /vms/{id}/actions.

Query parameters

NameTypeDescription
vm_idoptional uuid Only this server.
actionoptional string e.g. start, stop, shutdown, reboot, reset, create, rebuild, password_reset, console, suspend, terminate.
statusoptional string pending, success or failed.
fromoptional date From this day (UTC), YYYY-MM-DD.
tooptional date Up to and including this day (UTC).
pageoptional integer Page number, from 1. Pages past the end return an empty list.
per_pageoptional integer Items per page, 1–100. Default 25.

Example

Request · curl
curl "https://my.matrixstreamline.com/api/v1/vm-actions" \
  -H "Authorization: Bearer $API_KEY"
Response200
{
    "data": [
        {
            "id": 9921,
            "action": "reboot",
            "status": "success",
            "message": "Requested via API",
            "by": "Asha Rao",
            "created_at": "2026-10-10T11:40:00Z",
            "vm": {
                "id": "6f1c2a9e-3b7d-4c8a-9e21-5d4f3a2b1c0d",
                "hostname": "web-01.client1042.in"
            }
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 1,
        "pages": 1
    }
}

Errors specific to this endpoint

StatusCodeWhen
422validation_failedstatus is not pending, success or failed, or a date is malformed.