Domains - API Documentation

With the /domains resource of our API, you can list your active domains, as well as modifying and reading your DNS entries. The GET method to the /v1/domains route will show all active domains that the customer owns.

Request:

curl -X GET -H 'X-Verosent-Token: HWsYIoW0YMwJdGaWNEsbudnHoUQuUlRxpB9L82Sc3DixhJxw7wW36j/nzCmajb46TBQ11RIZh2+X98+KpnpF+w==' https://api.verosent.com/v1/domains
Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "domains": [
    {
      "id": 3,
      "name": "verosent.com",
      "tld": "com",
      "expires_on": "2025-05-10"
    },
    {
      "id": 4,
      "name": "verosent.net",
      "tld": "net",
      "expires_on": "2025-05-11"
    }
  ]
}

Requirements:

The scope domains.list needs to be active.
To show all active DNS Records for a domain, send a GET request to the route /v1/domains/:id/dns-records. Please make sure the token has the sufficient permissions as described in the requirements section below.

Request:

curl -X GET -H 'X-Verosent-Token: HWsYIoW0YMwJdGaWNEsbudnHoUQuUlRxpB9L82Sc3DixhJxw7wW36j/nzCmajb46TBQ11RIZh2+X98+KpnpF+w==' https://api.verosent.com/v1/domains/3/dns-records
Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
   "domain":{
      "id":3,
      "name":"verosent.com"
   },
   "dns_records":[
      {
         "id":55,
         "prefix":"",
         "value":"54.36.5.99",
         "record_type":"A",
         "priority":null,
         "weight":null,
         "protocol":null,
         "service":null,
         "port":null,
         "created_at":"2019-08-02T06:57:39.000+02:00",
         "updated_at":"2019-08-02T06:57:39.000+02:00"
      },
      {
         "id":56,
         "prefix":"www",
         "value":"54.36.5.99",
         "record_type":"A",
         "priority":null,
         "weight":null,
         "protocol":null,
         "service":null,
         "port":null,
         "created_at":"2019-08-02T06:57:44.000+02:00",
         "updated_at":"2019-08-02T06:57:44.000+02:00"
      },
      {
         "id":57,
         "prefix":"mail",
         "value":"54.36.5.99",
         "record_type":"A",
         "priority":null,
         "weight":null,
         "protocol":null,
         "service":null,
         "port":null,
         "created_at":"2019-08-02T06:57:58.000+02:00",
         "updated_at":"2019-08-02T06:57:58.000+02:00"
      },
      {
         "id":58,
         "prefix":"mx0",
         "value":"mail.verosent.com",
         "record_type":"MX",
         "priority":50,
         "weight":null,
         "protocol":null,
         "service":null,
         "port":null,
         "created_at":"2019-08-02T06:58:11.000+02:00",
         "updated_at":"2019-08-02T06:58:11.000+02:00"
      },
      {
         "id":59,
         "prefix":"secret-txt-record",
         "value":"my TXT record value",
         "record_type":"TXT",
         "priority":null,
         "weight":null,
         "protocol":null,
         "service":null,
         "port":null,
         "created_at":"2019-08-02T06:58:28.000+02:00",
         "updated_at":"2019-08-02T06:58:28.000+02:00"
      },
      {
         "id":61,
         "prefix":"_minecraft._tcp",
         "value":"54.36.5.99",
         "record_type":"SRV",
         "priority":100,
         "weight":200,
         "protocol":null,
         "service":"minecraft",
         "port":25565,
         "created_at":"2019-07-27T10:08:24.000+02:00",
         "updated_at":"2019-07-27T10:08:24.000+02:00"
      }
   ]
}

Requirements:

The scope domains.dns_records_list needs to be active and the token needs to have access on that product.

This API endpoint allows you to create new DNS records for a domain. It accepts a application/json content body. Please see below for all available parameters for this API endpoint. The HTTP request type needs to be set to POST.

Request:

curl -X POST -H 'Content-Type: application/json' -H 'X-Verosent-Token: HWsYIoW0YMwJdGaWNEsbudnHoUQuUlRxpB9L82Sc3DixhJxw7wW36j/nzCmajb46TBQ11RIZh2+X98+KpnpF+w==' https://api.verosent.com/v1/domains/:id/dns-records --data '$JSON_CONTENT_BODY'
Request Body (application/json):

1
2
3
4
5
{
   "record_type": "A",
   "prefix": "www",
   "value": "54.36.5.99"
}
Depending on the DNS record type, the request body can take up to four parameters:
  • prefix (String): This value defines the prefix of a DNS record. (e.g. setting the prefix to "www", would make this record available at www.example.com)
  • value (String): This value will set the content of the DNS record. It would set the IPv4 address for an A record, the IPv6 address for an AAAA record, or the content of a TXT record for instance. This parameter is supported for every record type.
  • priority (Integer): Defines the priority of this DNS record. The lower the priority the better the chances are that this record gets picked if the target server is available. This parameter only works for the following record types: MX and SRV
  • weight (Integer): Sets the weight for a DNS record. The higher the value, the better the chances that this record gets picked over others. This applies to records with the same priority. It only works for SRV records.
  • port (Integer): This parameter is only used by SRV records and defines the port of the remote server which clients should try to connect to.
  • protocol (String): Sets the protocol type for a SRV record. Can either be "udp" or "tcp".
  • service (String): The service name that is being used for a SRV record. For example, for the game "Minecraft" it would be "minecraft". This value depends on the application you create the SRV record for. Please refer to the documentation of the application to get more information.

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
   "message":"ok",
   "dns_record":{
      "id":1,
      "prefix":"www",
      "value":"54.36.5.99",
      "record_type":"A",
      "priority":null,
      "weight":null,
      "protocol":null,
      "service":null,
      "port":null,
      "created_at":"2019-07-27T10:08:24.000+02:00",
      "updated_at":"2019-07-27T10:08:24.000+02:00"
   }
}

Requirements:

The scope domains.dns_records_create needs to be active and the token needs to have access on that product.

This API endpoint allows you to change the configuration of a DNS Record. It accepts a application/json content body. Please see below for all available parameters for this API endpoint. The HTTP request type needs to be set to PUT.

Request:

curl -X PUT -H 'Content-Type: application/json' -H 'X-Verosent-Token: HWsYIoW0YMwJdGaWNEsbudnHoUQuUlRxpB9L82Sc3DixhJxw7wW36j/nzCmajb46TBQ11RIZh2+X98+KpnpF+w==' https://api.verosent.com/v1/domains/dns-records/:id --data '$JSON_CONTENT_BODY'
Request Body (application/json):

1
2
3
{
  "value": "54.36.5.99"
}
Depending on the DNS record type, the request body can take up to four parameters:
  • value (String): This value will set the content of the DNS record. It would set the IPv4 address for an A record, the IPv6 address for an AAAA record, or the content of a TXT record for instance. This parameter is supported for every record type.
  • priority (Integer): Defines the priority of this DNS record. The lower the priority the better the chances are that this record gets picked if the target server is available. This parameter only works for the following record types: MX and SRV
  • weight (Integer): Sets the weight for a DNS record. The higher the value, the better the chances that this record gets picked over others. This applies to records with the same priority. It only works for SRV records.
  • port (Integer): This parameter is only used by SRV records and defines the port of the remote server which clients should try to connect to.

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
   "message":"ok",
   "dns_record":{
      "id":1,
      "prefix":"www",
      "value":"54.36.5.99",
      "record_type":"A",
      "priority":null,
      "weight":null,
      "protocol":null,
      "service":null,
      "port":null,
      "created_at":"2019-07-27T10:27:10.000+02:00",
      "updated_at":"2019-07-27T10:08:24.000+02:00"
   }
}

Requirements:

The scope domains.dns_records_update needs to be active and the token needs to have access on that product.

DNS Records can be deleted by initiating a DELETE request to the /v1/domains/dns-records/:id route. Please make sure the token has the sufficient permissions as described in the requirements section below. The ID parameter in the URL is the ID of the DNS record. It can be obtained as described in 2. List DNS Records of this documentation.

Request:

curl -X DELETE -H 'X-Verosent-Token: HWsYIoW0YMwJdGaWNEsbudnHoUQuUlRxpB9L82Sc3DixhJxw7wW36j/nzCmajb46TBQ11RIZh2+X98+KpnpF+w==' https://api.verosent.com/v1/domains/dns-records/:id
Response:

1
2
3
{
  "message": "ok"
}

Requirements:

The scope domains.dns_records_delete needs to be active and the token needs to have access on that product.