Skip to content

REST API · MCP server · OAuth

Automate your infrastructure from code, scripts and AI

Domains, DNS, servers, monitors, incidents and status pages through one API. Every endpoint documented, every answer recorded from the real thing.

New here? Try it on a free Sandbox with sample data — nothing you do there touches anything real. Start
  • 277 endpoints
  • 21 MCP tools
  • Code in cURL, PowerShell, PHP, Python, JavaScript, Go
GET /api/organizations/42/status
sh
curl "https://api.infranest.io/api/organizations/42/status" \
  -H "Authorization: Bearer $INFRANEST_TOKEN" \
  -H "Accept: application/json"
powershell
$headers = @{
  Authorization = "Bearer $env:INFRANEST_TOKEN"
  Accept = "application/json"
}
Invoke-RestMethod -Method Get -Uri "https://api.infranest.io/api/organizations/42/status" -Headers $headers
python
import os

import requests

response = requests.get(
    "https://api.infranest.io/api/organizations/42/status",
    headers={
        "Authorization": f"Bearer {os.environ['INFRANEST_TOKEN']}",
        "Accept": "application/json",
    },
)
response.raise_for_status()
print(response.json())
200 OKRecorded from the APIGet the current status of everything
json
{
  "generated_at": "2026-01-15T12:00:00Z",
  "tag": null,
  "summary": {
    "monitors": {
      "total": 13,
      "up": 10,
      "down": 1,
      "degraded": 1,
      "paused": 1,
      "unknown": 0
    },
    "servers": {
      "total": 14,
      "running": 12,
      "agent_not_reporting": 0,
      "breaching": 0
    },
    "open_incidents": 1,
    "active_maintenance": 0
  },
  "monitors": [
    {
      "id": 3,
      "name": "API health",
      "type": "http",
      "status": "up",
      "enabled": true,
      "silenced": false,
      "last_checked_at": "2026-01-15T11:58:00Z",
      "uptime_24h": 0
    },
    {
      "id": 2,
      "name": "App — northwind-app.dev",
      "type": "http",
      "status": "up",
      "enabled": true,
      "silenced": false,
      "last_checked_at": "2026-01-15T11:58:00Z",
      "uptime_24h": 0
    }
  ],
  "servers": [
    {
      "id": 13,
      "name": "analytics-01",
      "status": "stopped",
      "monitoring_enabled": false,
      "agent_reporting": null,
      "breaching_alerts": 0
    },
    {
      "id": 3,
      "name": "api-01",
      "status": "running",
      "monitoring_enabled": true,
      "agent_reporting": true,
      "breaching_alerts": 0
    }
  ],
  "incidents": [
    {
      "id": 1,
      "title": "Checkout returning 503",
      "status": "investigating",
      "impact": "major",
      "started_at": "2026-01-15T11:20:00Z",
      "acknowledged_at": null,
      "monitoring_check_id": 4,
      "server_id": null
    }
  ],
  "maintenance": []
}

Pick how you connect

REST API

A token for your scripts, CI and tools, scoped to exactly what they need and bound to one organization.

  • A read and a write scope per area: DNS, monitoring, cloud, domains
  • Dry runs and undo for DNS changes, and an Idempotency-Key for every POST
  • Every limit published, a fix with every error code, test tokens on the Sandbox
sh
curl -s -X POST "https://api.infranest.io/api/organizations/$ORG/dns-zones/$ZONE/dns-records?dry_run=1" \
  -H "Authorization: Bearer $INFRANEST_TOKEN" -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"type": "A", "name": "quickstart", "value": "192.0.2.50", "ttl": 3600}'
powershell
$record = @{ type = 'A'; name = 'quickstart'; value = '192.0.2.50'; ttl = 3600 } | ConvertTo-Json
Invoke-RestMethod -Method Post -Uri "https://api.infranest.io/api/organizations/$env:ORG/dns-zones/$env:ZONE/dns-records?dry_run=1" `
  -Headers $headers -ContentType 'application/json' -Body $record
python
zone = 1  # the ID of sandbox-….example
record = {"type": "A", "name": "quickstart", "value": "192.0.2.50", "ttl": 3600}
dry = requests.post(f"{API}/organizations/{org}/dns-zones/{zone}/dns-records", params={"dry_run": 1}, headers=HEADERS, json=record)
print(dry.json())

From the quickstart: try a change as a dry run. The API answers with the change it would make, and makes none.

AI assistants

AI agent ready

Connect Claude or ChatGPT in one click, or point Cursor and VS Code at the MCP server. The assistant reads what you can read, and changes nothing.

Connect your assistant

You ask: Find every DNS record pointing at web-01 and show me a dry run of moving them to web-02.

  1. GET /organizations/{organization}/cloud-servers · list_servers

    Finds web-01 and web-02 and their IDs.

  2. GET /organizations/{organization}/dns/search · search_dns

    Finds every record in every zone that names web-01’s address.

  3. GET /organizations/{organization}/dns/address-move · read_api

    The dry run: each record with its new value, the ones left out and why, and the monitors that follow. Changes nothing.

Build an integration

Let people connect your product to their InfraNest account with one click: no token to copy, and they can remove it any time.

  1. 01Connect with InfraNest

    Your app sends them to authorize, with PKCE.

  2. 02They approve

    One organization, and only the scopes you asked for.

  3. 03You get a token

    An access token for an hour, and a refresh token that rotates.

Scripts people automate first

  1. Let's Encrypt with InfraNest DNSGet certificates for any domain whose DNS is in InfraNest, including wildcards, without opening a port. Example code (opens GitHub)
  2. Open a maintenance window from your deploy pipelineSilence alerts while a deploy runs, show the work on your status page, and close the window when the deploy is done. Example code (opens GitHub)
  3. Create a monitor when you deploy a new serviceWhen a new service goes live, add a monitor for it in the same pipeline, so nothing reaches production without being watched. Example code (opens GitHub)
  4. Update DNS from a script when your IP changesKeep a record such as home.example.com pointing at a connection whose address changes. Example code (opens GitHub)
All 7 recipes
  1. Copy the audit log into your SIEMSend every change made in your organization, in the app or with a token, to your log platform once a day. Example code (opens GitHub)
  2. Status, uptime and historyThree questions a dashboard, a chat bot or a weekly report asks, each answered in one call. Example code (opens GitHub)
  3. Start watching a new serverAfter you create a server at your cloud provider, InfraNest finds it at its next sync. Example code (opens GitHub)