API Reference
Everything you can do in the console is backed by Subnetly's REST API. The same API powers the web app, so any resource you manage in the UI can be automated.
- Open the interactive API reference → — every endpoint, generated from the OpenAPI spec (raw spec at
/openapi.yaml). - Authentication — call the API with an Auth0 JWT or a long-lived API token.
- Terraform provider — manage DNS, DHCP and IPAM as code.
This page is a conventions-and-orientation reference; the interactive reference above is the complete, generated endpoint list.
Base URL
https://api.subnetly.com
All endpoints are versioned under /v1.
Authentication
The API uses API tokens. Create one under Settings → API Tokens and send it as a bearer token:
Authorization: Bearer sbnt_your_token_here
A token is bound to one tenant, so there's nothing else you have to send. You can also send your tenant ID in an X-Tenant-ID header as a safety check: the request is refused if the token belongs to a different tenant. Requests without a valid token return 401. Full details and curl examples: Authentication.
Request and response format
- Requests and responses are JSON (
Content-Type: application/json), except bulk imports which accepttext/csv. - Large lists (zones, records, subnets, addresses, audit events) are paginated with
limitandoffsetquery parameters and return atotalcount. Smaller lists (sites, DHCP scopes, agents) come back whole. Each endpoint in the interactive reference says which it is. - Requests are rate limited to a sustained 200 per second (bursts of 400) per IP address and per API token. A request over the limit gets
429with aRetry-Afterheader and is safe to retry. - Standard HTTP status codes:
2xxsuccess,400validation error,401unauthenticated,402not included in your plan or quota reached,403forbidden,404not found,409conflict,429rate limited. Errors are JSON:{"error": "what went wrong"}.
Example
curl https://api.subnetly.com/v1/dns/zones \
-H "Authorization: Bearer sbnt_your_token_here"
Resource map
The API mirrors the product areas in this documentation:
| Area | Representative endpoints | Docs |
|---|---|---|
| DNS zones & records | /v1/dns/zones, .../zones/{id}/records | DNS |
| Public DNS | /v1/public-dns, .../{id}/records, .../{id}/sync, .../{id}/validate-delegation | Public DNS |
| DNS firewall (RPZ) | /v1/dns/rpz zones and rules | DNS firewall |
| DHCP scopes | /v1/dhcp/scopes, scope options, reservations, leases | DHCP |
| DHCP HA groups | /v1/dhcp/ha-groups, .../{id}/members | HA groups |
| IPAM | /v1/ipam/subnets, split/merge/allocate, options, export | IPAM |
| Agents | /v1/agents, events, role, cert-rotate, reissue | Agents |
| Zone/scope deployments | /v1/agents/{id}/zone-deployments, .../scope-deployments, .../dns-config, .../dhcp-config, .../dns-views | Configuration & roles |
| Encrypted DNS | /v1/agents/{id}/encrypted-dns, /v1/dns/encrypted-dns/ca | Encrypted DNS |
| Windows migration | /v1/agents/{id}/migration-preview, .../migrate, .../sync-windows-inventory | Windows migration |
| Sites | /v1/sites, .../{id} | Sites |
| Intelligence | /v1/advisor, /v1/risk-score, .../scan-delta-summary | Network Intelligence |
| Import / export | /v1/ipam/subnets/import, /v1/import/ip-subnets, /v1/import/ip-records, /v1/admin/export | Import & Export |
| API tokens | /v1/api-tokens | API Tokens |
| Administration | /v1/admin/audit, /v1/admin/members, member permissions | Settings |
| Webhooks | /v1/webhooks, .../{id}/test, .../{id}/deliveries | Settings |
| Notifications | /v1/notifications, unread count, /v1/notification-preferences | Settings |
| MSP | /api/msp/dashboard and per-client resources | MSP Guide |
Common patterns
- Create —
POSTto the collection (e.g.POST /v1/dns/zones). - List —
GETthe collection withlimit/offset. - Update —
PUT(or a dedicated action sub-path) on the resource. - Delete —
DELETEthe resource, or a.../deleteaction endpoint where used. - Actions — operations like
sync,validate-delegation,cert-rotate,migrate, andreissuearePOSTsub-paths on a resource.
Webhooks
Subnetly can call your endpoints when events occur. Outbound webhooks are signed with an X-Subnetly-Signature header so you can verify authenticity. Configure them in Settings → Webhooks. The payload, the event filter and the events API (GET /v1/events) are described in Webhooks, Slack, Teams and syslog; every event type is listed in the events reference.