Nanelo provides a powerful API which allows you to build 3rd-party integrations which can automatically add and delete DNS Records.
The API has only two endpoints so far, but we are planning on adding more in the future.
To make API Calls, you'll need to perform a GET
or POST
request to api.nanelo.com
. All requests should be performed with SSL (HTTPS).
The URL always consist of the following structure:
https://api.nanelo.com/version/apikey/endpoint
The current API Version is v1
, so an example request could look like this:
https://api.nanelo.com/v1/APIKEY-ABC-123/endpoint
All API requests must be authenticated with a valid API Key. API Keys are bound to a specific Domain. Visit your Nanelo Account Settings to manage your API Keys.
There are two ways you can authenticate your API Requests:
The simplest way to authenticate your API calls is by putting your API Key in each Request URL, after the API Version, like this:
https://api.nanelo.com/v1/SECRET-APIKEY-ABC-123/endpoint
Another way to authenticate your API calls is by putting your API Key in a header called X-API-KEY
and replacing the part in the URL where your API Key would normally be with "header". Here's how such an API call would look like with cURL:
curl -H "X-API-KEY:SECRET-APIKEY-ABC-123" https://api.nanelo.com/v1/header/endpoint
Most API Endpoints require one or more parameters. You can either set those parameters as GET
parameters in the URL or by sending them as POST
parameters in the body.
Please make sure that all your data is properly urlencoded
and UTF-8
encoded to avoid issues with special characters.
All API responses will be in JSON format.
Every response will have an ok
key, which will be either true
or false
, depending on the state of the API call. If the API call failed, ok
will be false
and there will be an error
key which contains details on why the API call failed.
Example of a failed API call:
{
"ok": false,
"error": "Invalid Feed URL"
}
Example of a successful API call:
{
"ok": true,
"result": {
"abc": "some data"
}
}
This API Endpoint allows you to add a new DNS Record to your DNS Zone.
Parameters:
name
requiredsubdomain.example.org
type
requiredA
value
required192.168.10.8
ttl
3600
priority
MX
Records. For example: 5
This API Endpoint allows you to all DNS Records matching your query. You need to specify a name, type and value of DNS Records to delete.
Parameters:
name
requiredsubdomain.example.org
type
requiredA
value
required192.168.10.8