---
title: "REST API"
description: "Manage every Edge resource over HTTPS with the same REST API that powers the Edge console and CLI: base URL, API key authentication, errors and rate limits."
url: "https://edge.network/docs/api"
section: "REST API"
---

# REST API

Everything you can do in the Edge console, you can do over HTTPS. The REST API is the same API that powers the console and the Edge CLI. There is no separate, cut-down surface for programmatic access.

The REST API is also what the [Edge CLI](/docs/cli) uses under the hood.

## Base URL

```text
https://edge.network/api
```

All requests use HTTPS. Request and response bodies are JSON. Send `Content-Type: application/json` on `POST`, `PUT` and `PATCH` requests.

## Authentication

Authenticate with an API key passed as a Bearer token. Keys are created in the console and start with `ek_live_`.

```bash
curl https://edge.network/api/compute/vms \
  -H "Authorization: Bearer ek_live_..."
```

See [Authentication](/docs/api/authentication) for creating and managing keys.

## Quick start: create a VM

```bash
curl -X POST https://edge.network/api/compute/vms \
  -H "Authorization: Bearer ek_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "web-01",
    "osTemplate": "ubuntu-24.04",
    "vcpu": 2,
    "ram": 4,
    "disk": 80,
    "region": "london"
  }'
```

The response includes the new VM object and, if no SSH key was attached, a generated root password. Full request and response details are on the [Compute API](/docs/api/compute) page.

## API reference

| Product | Base path | Covers |
|---|---|---|
| [Compute](/docs/api/compute) | `/api/compute` | VMs, SSH keys, firewall, startup scripts, backups |
| [CDN](/docs/api/cdn) | `/api/cdn` | Deployments, domains, cache purging, analytics |
| [DNS](/docs/api/dns) | `/api/dns` | Zones, records, nameservers |
| [Storage](/docs/api/storage) | `/api/storage` | Buckets, S3 access keys, objects, presigned URLs |
| [Shield](/docs/api/shield) | `/api/shield` | Widget management and stats |

## Errors

Errors return an appropriate HTTP status code and a JSON body with a message and a stable machine-readable code:

```json
{
  "error": "VM not found",
  "code": "NOT_FOUND"
}
```

See [Errors](/docs/api/errors) for the full list of codes and rate-limit behaviour.

## Rate limits

Requests are rate limited to **600 requests per minute per IP** across the API. Every response includes `X-RateLimit-Limit` and `X-RateLimit-Remaining` headers; exceeding the limit returns `429` with a `Retry-After` header.

## Other ways to integrate

- [Edge CLI](/docs/cli): A command-line client for this API. Ideal for scripts and CI pipelines.
- [Agent API](/docs/agent): A self-describing API for AI agents, with scoped tokens, budgets and dry-run support.

## In this section

- [Authentication](/docs/api/authentication) — Authenticate with the Edge REST API using API keys: create and revoke keys, send them as Bearer tokens, manage them via the API, and when to use agent codes.
- [Errors](/docs/api/errors) — Error format, HTTP status codes, machine-readable error codes and rate-limit behaviour and headers for the Edge REST API, with example responses.
- [Versioning & deprecation](/docs/api/versioning) — Edge Network API versioning and deprecation policy: what counts as a breaking change, how deprecations are signalled, and how much notice integrations get.
- [Compute API](/docs/api/compute) — Create and manage VMs, SSH keys, security groups, snapshots, backups, private networks and startup scripts over the Edge REST API.
- [CDN API](/docs/api/cdn) — Manage CDN deployments, domains, SSL, cache purging and analytics over the Edge REST API, with endpoint reference tables and curl examples.
- [DNS API](/docs/api/dns) — Manage DNS zones, records, zone backups and development domains over the Edge REST API, with endpoint reference tables and curl examples.
- [Storage API](/docs/api/storage) — Manage storage buckets, S3 access keys, objects, presigned URLs and bucket metrics over the Edge REST API, with endpoint tables and curl examples.
- [Shield API](/docs/api/shield) — Create and manage Edge Shield bot-protection widgets and view protection stats over the Edge REST API. Token verification runs on shield.edge.network.
