A clean REST/JSON API to register, renew, transfer and fully manage domains — plus DNS & DNSSEC, SSL certificates, email forwarding, the aftermarket, static site hosting, and signed webhooks. Machine-readable errors, idempotency keys, an OpenAPI spec, a first-party MCP server, and a free sandbox make it a great fit for automation and autonomous agents.
https://api.porkbun.com/api/json/v3Everything in the Porkbun dashboard, over the API.
Check availability & pricing, register, renew, transfer-in, and list/manage every domain in the account.
Full CRUD over records (A, AAAA, CNAME, MX, TXT, SRV, CAA, ALIAS, …) and DNSSEC DS records.
Retrieve the free Porkbun-issued SSL bundle for any domain in the account.
Read/replace nameservers and manage glue (host) records at the registry.
Read and edit registrant/admin/tech/billing contacts, with per-TLD validation.
Create and manage 301/302/masked URL forwards for a domain.
Route mail on your domains to existing inboxes.
Browse the Porkbun aftermarket with server-side filters.
Provision hosting and deploy a static site end-to-end — no dashboard.
Get signed, real-time events (registrations, renewals, transfers, DNS changes) instead of polling.
A pk1_sb_ key runs the whole API in an isolated environment with fake credit — no real actions or charges, and signed webhooks are delivered too.
Schema-accurate example responses for any endpoint at /mock/<path> — no credentials, nothing to install.
Per-account monthly limits, low-balance alerts, and auto top-up on API spend.
Simple, predictable, and safe to automate.
X-API-Key/X-Secret-API-Key headers, or apikey/secretapikey in the JSON body. Keys work whether or not account 2FA is enabled.status.Idempotency-Key on any write; retries within 24h replay the original response — no double-charging.dryRun: true to rehearse a billable or destructive write (price, funds, eligibility) without performing it.X-API-Version (currently 3.15). The path stays /v3; minor bumps are backward-compatible.X-Request-Id header + requestId body field (UUIDv7) on every response for retries, logs, and support.Agent-safety features so autonomous callers can act confidently.
code plus a next_action object telling an agent how to recover (re-quote, add funds, enable a setting, …).GET /domain/getRegistrationRequirements/{tld} returns the create payload and registry eligibility fields upfront.X-RateLimit-* headers on rate-limited endpoints.Link: rel="describedby" pointer to the OpenAPI spec.pk1_sb_ key runs the full lifecycle against an isolated sandbox with fake credit — responses include "sandbox": true.The fastest way to give an AI agent Porkbun superpowers.
Porkbun ships a first-party Model Context Protocol server exposing the whole API as native tools for Claude Desktop, Cursor, Cline, and other MCP clients. Write tools auto-attach an idempotency key, and the same server also grounds an agent in these docs (search_docs, read_doc, list_doc_topics) — no separate docs server needed.
npx -y @porkbunllc/mcp-server · GitHub · paste-to-install agent setup prompt
Pick the format that fits your client — all kept in sync from one spec.
Link: rel="describedby".GET /domain/getRegistrationRequirements/{tld} returns whether a TLD is API-registerable and the create payload as JSON Schema — including registry eligibility fields like .us nexus or .ca legal type. Validate a registration before sending it.Create keys, then make your first call.
pk1_sb_ key exercises the full API in an isolated environment — same base URL, no real actions or charges.