Skip to content
English
  • There are no suggestions because the search field is empty.

Go (Golang) Client Integration for OpusDNS

Manage DNS zones, domains and forwards from Go code with the official client

What is Go?

Go, also known as Golang, is a programming language for building fast, reliable and scalable software. It is popular for cloud infrastructure, backend services, DevOps tooling, automation and networking.

Many infrastructure teams already use Go to build internal tools, APIs, command line tools and automation services, so a Go client makes it easy to connect them with OpusDNS.

 

What is an API client?

An API client is a software library that makes it easier to talk to an API. Instead of building HTTP requests, handling authentication, parsing responses and managing errors yourself, you use ready-made functions and typed models.

 

What does the OpusDNS Go client do?

The OpusDNS Go client is the official Go library for the OpusDNS API: github.com/OpusDNS/opusdns-go-client. With it, you manage DNS and domain resources from your Go applications.

The client covers, among other things:

  • DNS zones and records, including DNSSEC
  • Domains: availability checks, registration, transfer, renewal, updates
  • Contacts
  • Email forwards and domain forwards
  • TLD information
  • Organizations, users and roles
  • Vanity nameservers and host objects
  • Events and audit logs
  • Jobs (asynchronous batch operations)
  • Reports
  • Tags
  • Whitelabel branding

It also includes type-safe models, automatic pagination, retries for temporary errors, handling of rate limits and support for context.Context. The full and current list is in the README of the repository.

 

Getting started

  1. Create an API key in the dashboard under Developer > API Credentials, see Creating API Credentials. Copy the API key right away; it is shown only once.
  2. Install the client (Go 1.21 or later):
    go get github.com/opusdns/opusdns-go-client
  3. Set the API key as the environment variable OPUSDNS_API_KEY, or pass it with opusdns.WithAPIKey(...) when you create the client.

Example: list all DNS zones.

client, err := opusdns.NewClient(
    opusdns.WithAPIKey("opk_your_api_key_here"),
)
if err != nil {
    log.Fatal(err)
}
zones, err := client.DNS.ListZones(context.Background(), nil)

More examples for domains, forwards, jobs and reports are in the README of the repository.

 

Where the Go client helps in practice

  • Infrastructure automation: create or update DNS zones and records during a deployment.
  • SaaS platforms: manage customer domains from your backend, for example when onboarding a new tenant.
  • Hosting providers: set up DNS automatically when customers create websites, email services or forwards.
  • Internal developer platforms: offer domain and DNS workflows to developers without manual configuration.
  • CI/CD pipelines: update DNS records, check domain availability or configure forwards as part of a release.

With the Go client, DNS and domain operations become part of your programmable infrastructure. The result is faster automation, fewer manual errors and a cleaner developer experience.

OpusDNS GitHub banner: Deploy faster with our official tools on GitHub, with the button View Our GitHub