Skip to main content

13 Domains API: How to create a domain

This is a series of articles dedicated to demonstrating how to get get acquainted with Openprovider Domains API methods.

This is a first article in a series in which we are going to cover basic domain management operations. To get more information about our API in general, please use our documentation portal as your reference.

You must have an active Openprovider account for this command to complete successfully. Please keep in mind that you will be automatically charged the registration fee upon successful registration.

Entering Geo Fence iconEntering Geo Fence iconUse endpoint path below. Base URL is determined by both the target environment and API version.
POST {base_url}/domains/
REQUEST VALUES
Name Type Description name string Required. period integer Required. auth_code varchar Optional. owner_handle varchar Required. admin_handle varchar Required. tech_handle varchar Required. billing_handle varchar Optional. reseller_handle varchar Optional. ns_group string Required only if name_servers field is empty ns_template_name string Optional. Name of the template to use to automatically create DNS zone for the domain; only applicable if nsGroup is dns-openprovider name_servers Array of objects (Array containing name server information) Required  only if nsGroup field is empty autorenew custom on | off | default is_dnssec_enabled boolean 0 (default) or 1 - Only accepted when nameservers of Openprovider are used dnssec_keys varchar when using your own nameservers use_domicile boolean 0 or 1 accept_premium_fee int or double Required in case when domain is premium, value is the price returned in the response for createDomainRequest without acceptPremiumFee is_private_whois_enabled boolean default value is 0 promo_code string comments string additional_data custom mandatory for some TLDs application_mode custom required for new gTLDs

NB The owner, admin and tech handles can be retrieved via the customers endpoint and will be the registered contacts for this domain.

REQUEST EXAMPLE
curl -X POST \
 'http://api.openprovider.eu/v1beta/domains' \
 -H 'Accept: */*' \
 -H 'Authorization: ,Bearer 2f4c1c3a9******15d22b378a64' \
 -H 'Connection: keep-alive' \
 -H 'Content-Type: application/json' \
 -d '{
 "owner_handle": "XX000001-XX",
 "admin_handle": "XX000001-XX",
 "tech_handle": "XX000001-XX",
 "billing_handle": "XX000001-XX",
 "domain": {
 "extension": "com",
 "name": "example"
 },
 "period": 1,
 "ns_group": "dns-openprovider"
}
RESPONSE EXAMPLE
{
 "code": 0,
 "data": {
 "activation_date": "2019-04-29 17:15:19",
 "auth_code": "C8$#wgG#25tQ",
 "expiration_date": "2020-04-29 17:15:19",
 "id": 10592139,
 "renewal_date": "2020-04-29 17:15:19",
 "status": "ACT"
 },
 "desc": ""
}
RESPONSE VALUES
Name Type Description
status ACT - active or REQ - requested
auth_code only in case if TLD supports it
activation_date available only in case of a succeeded realtime domain registration