Automate Azure DNS record changes through Blesta

Skip to main content
Print

Automate Azure DNS record changes through Blesta

Use PD Azure DNS API access for a backend integration that reads or updates records without opening the admin interface. The integration token is separate from the Azure app secret and from a customer’s portal login.

Create the scoped integration

  1. Open Azure DNS → Maintenance → API access.
  2. Name the integration and choose read or write scope as needed.
  3. Restrict caller source IPs when it has a fixed outbound address.
  4. Create the token and store its one-time value privately.
  5. Copy this installation’s endpoint URL from the panel.

Use one token per integration for attribution and rotation. Do not expose it in browser JavaScript or assume an administrative token is restricted to a single customer’s zone. Platform endpoints differ, so copy the actual displayed endpoint.

Authenticate and inspect first

Use HTTPS with Authorization: Bearer authentication. X-Api-Token is the documented alternative when the server strips the standard header. Keep credentials out of logs and support screenshots.

Use GET with action=zones for tracked zones, then action=records with the selected zone for live records. Identify the full name/type before preparing a write. The zones response is capped at 1,000 tracked entries, so an absent row is not proof Azure has no such zone. Record operations use the first tracked match for the requested DNS name without a subscription/group/provider selector. If a domain is tracked under multiple connections, have your hosting team establish the intended mapping before API writes.

Write and verify

Use POST with addrecord, editrecord or delrecord. Edits/deletes need recid from a live records result; deletion also confirms the intended type and name. Include priority, weight and port where required by the record type.

Read back the result. Azure groups values of the same name/type with a shared TTL, so review the whole affected set rather than just one row. Reconcile an uncertain response before retrying because a write may already have succeeded.

The API honours relevant locks, policies and managed-record protection. Review 401, 403, 404 and 429 separately and back off when rate limited. For rotation, create the replacement, switch and verify the integration, then revoke the old token. Check Maintenance and Activity for the original result.

See the PD Azure DNS Blesta guide for related tasks, or explore the module.

Table of Contents

Get your website online with PD Hosting

UK hosting, domains and support from a real team. From a first site to a full server.

Terms and Conditions  ·  Privacy Policy

PD Hosting is the trading name of Projektif Digital Ltd, registered in England and Wales, company number 12482555.

PD Hosting
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.