Create a Domain

The Create a Domain method is used to create a new Domain.

 POST /api/vendor/v1/domains.json?api_token={api_token}

Arguments

Name

Parameter Type

Data type

Required/Optional

Description

api_tokenquerystringRequiredAPI token of the manager who perform the operation (see API Token Authentication).

account_id

form

integer

Required

An account ID that owns the domain

nameformstringRequiredA domain name.

Response model

Name

Data type

Description

id

integer

A domain ID.
namestringA domain name.

account_id

integer

An account ID, to whom relates the domain.

created_at

dateA date of domain registration (is displayed to the internal domains).

updated_at

date

A date and time of the last updating of the domain information.

expires_at

date

An expiration date of the domain registration (is displayed to external domains).

dns_server_domain_id

integer

A domain ID, which is created in DNS server.

management

bool

DNS management:

  • true - a DNS hosting is turned on;
  • false - external servers are used, DNS management is not available.

ns1

string

An addresses of the domain name server.

ns2

stringAn addresses of the domain name server.

ns3

stringAn addresses of the domain name server.

ns4

stringAn addresses of the domain name server.

ns1_ip

stringAn IP addresses of the domain name server.

ns2_ip

stringAn IP addresses of the domain name server.

ns3_ip

stringAn IP addresses of the domain name server.

ns4_ip

stringAn IP addresses of the domain name server.

allow_subdomain_creation

bool

Allow to create subdomains:

  • true - you can create subdomains for domains;
  • false - you cannot create subdomains for domains.

registrar_lock

bool

Locing domains in the registry (only for domains that were registered via OpenSRS):

  • true - domains cannot be deleted, changed or transferred;
  • false - domains can be deleted, changed or transferred.

Request example

http://billing.activeplatform.com:80/api/vendor/v1/domains.json?api_token=654321
{
  "account_id": "2000532",
  "name": "activeplatfrom7.com"
}

Response example

{
  "id": 2164,
  "name": "activeplatfrom.com",
  "account_id": 2000532,
  "created_at": "2016-10-04T08:17:21.931+03:00",
  "updated_at": "2016-10-04T08:17:21.931+03:00",
  "expires_at": "external",
  "dns_server_domain_id": 2495,
  "management": true,
  "ns1": null,
  "ns2": null,
  "ns3": null,
  "ns4": null,
  "ns1_ip": null,
  "ns2_ip": null,
  "ns3_ip": null,
  "ns4_ip": null,
  "allow_subdomain_creation": false,
  "registrar_lock": false
}