REST API

BEST-HOSTING DNS API

Automate SSL certificate issuance via acme.sh using the BEST-HOSTING DNS API for DNS-01 challenge validation.

API v1
Quick Start with acme.sh
1

Generate your API credentials

Log in to the BEST-HOSTING client portal and navigate to Profile / REST API to generate your BH_API_USER and BH_API_KEY.

2

Install acme.sh

If you don't have acme.sh installed yet:

curl https://get.acme.sh | sh -s email=your@email.com
3

Export your credentials

export BH_API_USER="your_api_user"
export BH_API_KEY="your_api_key"
4

Issue your certificate

acme.sh --issue --dns dns_bh -d example.com \
-d '*.example.com' --dnssleep 120
API Endpoints
GET
https://best-hosting.cz/api/v1/dns
Authenticated ping — returns API status, version and timestamp.
GET
https://best-hosting.cz/api/v1/dns/{id}
Returns details of a specific TXT DNS record by its ID.
POST
https://best-hosting.cz/api/v1/dns
Add a TXT DNS record for DNS-01 challenge validation.
DELETE
https://best-hosting.cz/api/v1/dns/{id}
Remove a TXT DNS record after certificate issuance.
Authentication

All API endpoints (except this page) require HTTP Basic Authentication:

Authorization: Basic base64(BH_API_USER:BH_API_KEY)

BH_API_USER — your unique account identifier issued by the portal.
BH_API_KEY — your secret API key. Treat it like a password and never share it.

Rate Limiting
60
Requests / minute
5
Failed auth attempts
15 min
Ban duration

When rate limited, the API returns 429 Too Many Requests with Retry-After, X-RateLimit-Limit and X-RateLimit-Remaining headers.