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

Where can I find example requests for the OpusDNS API?

Quickstart curl requests and code samples for every endpoint

The quickest way to ready-to-run examples is the API Quickstart in the documentation. It shows curl requests against the sandbox for common tasks:

  • list your domains
  • check whether a domain is available
  • register a domain

A request with an API key looks like this:

curl https://sandbox.opusdns.com/v1/domains --header "X-Api-Key: YOUR_API_KEY"

Registrations in the sandbox are simulated, no real domains are created. If you set nameservers in the sandbox, use the sandbox nameservers ns1.sandbox.opusdns.com and ns2.sandbox.opusdns.com. Production and sandbox nameservers are not interchangeable.

 

Examples for every endpoint

Every endpoint in the API Reference has a code sample in Shell, Ruby, Node.js, PHP, Python and more. Some endpoints offer several request examples in a drop-down below the code. Select the server (production or sandbox) and, if you use an API key, the authentication type APIKeyHeader. Otherwise the samples show an Authorization: Bearer placeholder.

API reference endpoint List all domains with a curl code sample using the X-Api-Key header and an example response

More about the documentation: Where can I find the OpusDNS API reference / documentation? You need an API key first: How do I generate an API key for the sandbox?

Banner An API developers actually love with the button Test the Sandbox