Docs

API tokens

Updated 10 Nov 2026 · 1 min read · Also in Հայերեն, Русский

The Himk API lets you do from code what you do in the panel. Every request is authenticated with an API token sent in the Authorization header.

1. Create a token

  1. Open Settings → API tokens in the panel.
  2. Click Create token and give it a name that says where it will be used, for example ci-deploy.
  3. Copy the token. It is shown only once.

2. Use the token

Store the token in an environment variable and send it as a bearer token:

bash
export HIMK_TOKEN="paste-your-token-here"

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": 300}'

3. Keep tokens safe

  • Treat a token like a password: don’t commit it to a repository or paste it into chats.
  • Create a separate token for each script or service, so you can revoke one without breaking the others.
  • If a token leaks, delete it in the panel right away and create a new one.

Next steps