← Blog

The DNS API v1 is open to everyone

Every account can now create API tokens and manage zones and records over HTTPS.

[Author name]1 min read

The Himk DNS API v1 is now available to every account. Anything you do with zones and records in the panel, you can now do from a script, a CI pipeline or your own tools.

What you can do

  • Create and remove DNS zones.
  • List, add, change and delete records in a zone.
  • Automate changes that you would otherwise make by hand, such as adding verification records or pointing a new subdomain to a server.

The API works over HTTPS and speaks JSON. The base URL is https://api.himk.am/v1.

Create a token

Requests are authorized with an API token. Sign in at my.himk.am, create a token and copy it: it is shown only once. You can create several tokens, for example one per project, and revoke any of them at any time.

Keep your token secret A token acts on behalf of your account. Store it in an environment variable or a secrets manager, never in a repository. If a token leaks, revoke it in the panel and create a new one.

Your first request

This request adds an A record for www.example.am:

bash
export HIMK_TOKEN="your-token"

curl -X POST https://api.himk.am/v1/zones/example.am/records \
  -H "Authorization: Bearer $HIMK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"type": "A", "name": "www", "content": "203.0.113.10", "ttl": 3600}'

The record goes live on ns1.himk.am and ns2.himk.am just like a record created in the panel.

What’s next

Start with the API tokens guide, then see the DNS API reference for all endpoints and fields. If something is missing from the API, tell us.

Try HimkNew accounts get X XXX ֏ wallet credit.
Sign up

Related posts