A clean REST/JSON API to register, renew, transfer and fully manage domains — plus DNS & DNSSEC, SSL certificates, email forwarding, the aftermarket, static and WordPress hosting, Cloudflare connect, 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 one at a time or 25 per call, 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 on Porkbun's nameservers — plus dated restore points, so a zone broken by a bad edit can be diffed against a previous version and put back.
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.
Forward mail on your domains to existing inboxes, or set up real mailboxes. Guides: forwarding, mailboxes.
Find taken names that are for sale: Afternic, Sedo, Atom, NameBright and DAX listings, plus Porkbun Marketplace, in one search, with price and a link to buy.
Search expired-domain closeouts and buy one outright. Filter by age, price, TLD and name length, and sort by registration date to find aged names in a single call.
Provision hosting and deploy a static site end-to-end — no dashboard.
Provision a managed Cloud for WordPress site, then edit its pages, posts and images through Porkbun (no WordPress password needed), or mint REST API credentials for your own code. Change PHP and WordPress versions, take and restore backups, and try changes on a staging copy before publishing them.
Turn on a free Link in Bio page on a domain or buy a paid plan, then set the profile, links, social icons and look. Guide.
Give an AI agent a verifiable name, identity certificate and public transparency-log entry, check its trust tier, and search the agent directory. Free. Guide.
Let someone else, and their AI agent, run one domain's website without your account: you approve, they get a one-time link, QR code and handoff prompt. Guide.
npx @porkbunllc/mcp-server — the whole API as tools for Claude, Cursor and any MCP client. Or connect ChatGPT and Claude to the hosted server with a sign-in, no install. See porkbun.com/mcp.
Manage domains and DNS from Terraform or OpenTofu with the community providers built on this API, or from DNSControl, octoDNS, external-dns and cert-manager. Setup, sandbox testing and the differences between providers: porkbun.com/terraform.
Move domains into the customer's own Cloudflare account — create the zone, copy the DNS across, repoint nameservers — then manage those Cloudflare records, the orange cloud, and zone settings from the same API.
Get signed, real-time events (registrations, renewals, transfers, expiring domains, DNS changes, Cloudflare moves, account verification) instead of polling. What each event sends.
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.
One monthly limit on what keys and agents buy and on the credit they add ($100 a month until the account holder sets their own), low-balance alerts, plus account credit funding from the API: read and set auto top-up, or charge the saved payment method now so an agent that runs out of credit does not have to stop and wait for a human. With no card saved, an agent can pay with the user's card from its Stripe Link wallet over MPP, or with USDC over x402. An agent with a USDC wallet can also pay for a single purchase directly ("payWith": "usdc", HTTP 402), with no credit at all; if the purchase fails, the payment stays on the account as credit. Or pay for it by card ("payWith": "card") with a real hold, charged only if the purchase succeeds.
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.84). 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. For the whole picture, from connecting a chat app to the guardrails, see Porkbun for AI agents.
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.
Hosted, no install: add https://mcp.porkbun.com/mcp as a connector in ChatGPT, Claude, Claude Code or any remote-MCP client, then sign in to Porkbun and approve. No API key to copy; each connection is its own key, listed under API access, bounded by your per-domain API access and spend limit. Connect guide.
npx -y @porkbunllc/mcp-server · Setup guide & tool list · 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.