---
name: anycast
description: Register domains, check EUR TLD prices and availability, manage Anycast DNS zones and records, inspect contact handles and invoices via Anycast.io REST API v1 or MCP using ANYCAST_API_KEY.
---

# Anycast.io Domain & DNS Skill

Use the token-frugal REST API (`https://anycast.io/api/v1`) for `curl`, shell, and CLI agent workflows, or use Streamable HTTP MCP (`POST https://anycast.io/api/mcp`) for native MCP clients. Both interfaces use the same scoped bearer key (`ac_live_...`).

## Authentication

- Set `ANYCAST_API_KEY="ac_live_..."` in your environment.
- Send `Authorization: Bearer $ANYCAST_API_KEY` and `Content-Type: application/json` (for `POST`/`PATCH`).
- Manage keys, org isolation, scopes (`read`, `dns:write`, `domains:write`), and EUR spend caps at `https://anycast.io/app/users/api-keys` or `https://anycast.io/app/org/<org_slug>/api-keys`.

## Organization Scoping Rule

Always inspect accessible organizations first when using an account-wide key:

```bash
curl -sS -H "Authorization: Bearer $ANYCAST_API_KEY" \
  "https://anycast.io/api/v1/organizations"
```

If multiple organizations are returned, include `org_slug` (query parameter on `GET`/`DELETE` or JSON field on `POST`/`PATCH`) to disambiguate. Keys pinned to one organization automatically target that org.

## Guardrails

- Registration requires `domains:write` and organization admin/owner role.
- Optional per-key `max_domain_price_eur` blocks registrations whose first-period net EUR total (`setup + renewal`) exceeds the cap.
- Blocked permanently for agent keys: domain deletion, `AutoDelete` renewal mode, `SOA` record edits, and transfer-out auth codes.

## Common Workflows (curl)

Check domain availability and EUR net pricing (`read`):

```bash
curl -sS -H "Authorization: Bearer $ANYCAST_API_KEY" \
  "https://anycast.io/api/v1/domains/availability?domain=example.de"
```

Inspect a DNS zone and numeric record IDs (`read`):

```bash
curl -sS -H "Authorization: Bearer $ANYCAST_API_KEY" \
  "https://anycast.io/api/v1/dns/zones/example.de"
```

Create a DNS record (`dns:write`):

```bash
curl -sS -X POST "https://anycast.io/api/v1/dns/zones/example.de/records" \
  -H "Authorization: Bearer $ANYCAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"A","name":"api","content":"203.0.113.10","ttl":300}'
```

Update or delete a DNS record (`dns:write`):

```bash
curl -sS -X PATCH "https://anycast.io/api/v1/dns/zones/example.de/records/123" \
  -H "Authorization: Bearer $ANYCAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content":"203.0.113.20","ttl":300}'

curl -sS -X DELETE "https://anycast.io/api/v1/dns/zones/example.de/records/123" \
  -H "Authorization: Bearer $ANYCAST_API_KEY"
```

Register an available domain (`domains:write`):

```bash
curl -sS -X POST "https://anycast.io/api/v1/domains" \
  -H "Authorization: Bearer $ANYCAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain":"example.de","months":12,"org_slug":"acme"}'
```

## Endpoints Reference

| Scope | Method & Path | Purpose |
| --- | --- | --- |
| `read` | `GET /api/v1/organizations` | List accessible orgs, roles, spend cap |
| `read` | `GET /api/v1/tlds?q=&org_slug=` | Search TLD registration, renewal, transfer prices |
| `read` | `GET /api/v1/tlds/:tld` | Get term offers for one TLD |
| `read` | `GET /api/v1/domains/availability?domain=` | Check domain availability & EUR spend-cap fit |
| `read` | `GET /api/v1/domains?q=&org_slug=` | List accessible domains |
| `read` | `GET /api/v1/domains/:name` | Get domain status, NS, renewal mode, tags |
| `read` | `GET /api/v1/dns/zones?q=&org_slug=` | List DNS zones |
| `read` | `GET /api/v1/dns/zones/:zone` | Get zone metadata and all visible records |
| `read` | `GET /api/v1/handles?q=&org_slug=` | List contact handles |
| `read` | `GET /api/v1/handles/:identifier` | Get contact handle details |
| `read` | `GET /api/v1/invoices?q=&unpaid_only=true` | List invoices (optional unpaid filter) |
| `read` | `GET /api/v1/invoices/:name` | Get invoice totals and line items |
| `dns:write` | `POST /api/v1/dns/zones/:zone/records` | Create DNS record & bump zone SOA serial |
| `dns:write` | `PATCH /api/v1/dns/zones/:zone/records/:record_id` | Update non-SOA DNS record |
| `dns:write` | `DELETE /api/v1/dns/zones/:zone/records/:record_id` | Delete non-SOA DNS record |
| `domains:write` | `POST /api/v1/handles` | Create registry contact handle |
| `domains:write` | `POST /api/v1/domains` | Register domain within key spend cap |
| `domains:write` | `PATCH /api/v1/domains/:name` | Update nameservers, renewal_mode, lock, privacy, tags |

- OpenAPI spec: `GET https://anycast.io/api/openapi`
- MCP Streamable HTTP: `POST https://anycast.io/api/mcp`
