API Documentation - Version 1

Overview
Domain Pricing
Authentication
Domain Check Initialization
Domain Check Results

Overview

The Porkbun API uses JSON content sent to URI endpoints via HTTP POST. Functionality is currently limited but as more functionality is added it will be documented here. Any questions regarding the API should be sent to tech@porkbun.com.

Domain Pricing

Check default domain pricing information for all supported TLDs. This command does not require authentication.

Example

URI Endpoint: https://porkbun.com/api/json/v1/pricing/get

Posted JSON
None
JSON Response
{ "status": "SUCCESS", "pricing": { "design": { "registration": "35.58", "renewal": "35.58", "transfer": "35.58" }, "com": { "registration": "9.68", "renewal": "9.68", "transfer": "9.68" }, ... } }

Authentication

Authentication is done by passing an API secret key in the JSON content posted to the URI endpoint. All API calls must include a valid API secret key. You can test communication with the API using the ping endpoint.

Get API Key

Example

URI Endpoint: https://porkbun.com/api/json/v1/ping

Posted JSON
{ "apikey": "YOURAPISECRETKEY" }
JSON Response
{ "status": "SUCCESS" }

Domain Check Initialization

Checking domains requires two steps: 1) initializing the checks and then 2) polling the API for results. You can specifiy the TLDs you wish to check by passing an array of supported TLDs as part of the posted JSON. To check all supported TLDs you can pass an empty array or simply not provide one. The API will respond with a unique ID that you will then use while polling for results.

Example

URI Endpoint: https://porkbun.com/api/json/v1/domain/initializecheck

Posted JSON
{ "apikey": "YOURAPISECRETKEY", "sld": "domainsld", "tlds": [ "design", "ink", "wiki", "com" ] }
JSON Response
{ "status": "SUCCESS", "checkId": "CHECKID" }

Domain Check Results

You poll the check results by passing the unique check ID returned during the initialization step. Once each domain's "result" element is no longer set to "PENDING" polling should stop, as this means all domains have been checked. You should poll no more than once per second.

Response Element Descriptions

Example

URI Endpoint: https://porkbun.com/api/json/v1/domain/getcheck

Posted JSON
{ "apikey": "YOURAPISECRETKEY", "checkid": "CHECKID" }
JSON Response
{ "status": "SUCCESS", "results": { "domainsld.design": { "domain": "domainsld.design", "type": "registration", "result": "UNAVAILABLE", "premium": "NO" }, "domainsld.ink": { "domain": "domainsld.ink", "type": "registration", "result": "AVAILABLE", "premium": "NO" }, "domainsld.wiki": { "domain": "domainsld.wiki", "type": "registration", "result": "PENDING", "premium": "NO" }, "domainsld.com": { "domain": "domainsld.com", "type": "registration", "result": "ERROR", "premium": "NO" } } }
Copyright © Porkbun LLC. All rights reserved.
Porkbun is a Top Level Design Company