Balance increase
Enter summ:   р.
 

REG.API

REG.RU domain registration interface

Table of Contents

  1. Introduction
  2. HTTP-Post Gateway Systems
  3. Submitting HTTP-Post Requests
    3.1.  Operations
  4. Domain operations
  5. DNS zone management
  6. User management Operations
  7. Miscellaneous operations
  8. Service operations
  9. Examples
  10. Best practices of usage Reg.API

1. Intoduction

This reference describes HTTP-Post Interface to REG.RU Shared Registry System (RegRuSRS), version 1.
The HTTP-Post gateway is a synchronous interface to RegRuSRS which allows you to perform operations with domains, services and folders.

There is a newer version of the interface — REG.API v2 which is under active development. API v1 is considered an olv version and it is not developed any more: all new operations appears only in REG.API v2.

2. HTTP-Post Gateway Systems

In order to offer a one-step process for each operation, all information must be presented to the gateway in a single HTTP-Post request. The gateway has no notion of state and every request to the URL is expected to be independent of other requests. The HTTP-Post interface supports operations such as domain name Registration, Redelegation, Check availability of a domain name, Modifying contact details, Transfers. Registrar / Management rights of a domain name and so on. The operations described later in this document.

Domain name registrar REG.RU offers two HTTP-Post Gateways that enable Post requests to be processed; these are a Test system and a Live System.

2.1. Live System

To use the live system, HTTP-Post operations must target the URL

https://api.reg.ru/api/regru
or
http://api.reg.ru/api/regru (for testing only)

Typical response times under normal load conditions should be in the order of five to ten seconds.

Warning:
Do not set up a web form for your customers that contain your login details, i.e. your user name and password, as end users can read them. To be secure, the login details must be appended with a server side process.

All posts must adhere to the HTTP/1.0 specifications, as defined in RFC 1945 at the URL:

2.2. Test System

REG.RU offers a gateway that interfaces with our test registration system. The test system is identical to the live system with the following exceptions:

  • Resellers are not billed.
  • Domain names are not actually registered.
  • The test system does not contain the domain names and name servers that exist in the live registry.

To use the test system, HTTP-Post operations must target the same URL as live system. To access the test system use these login details:

username: test
password: test

2.3. Gateway usage limitations

There are some limitations that should be take into account while communicating with RegRuSRS gateway.

  1. Request count via gateway should not exceed 1200 queries per hour from one IP address. If you exceed this limit all requests will be ignored until the end of current hour.
  2. Parallel (simultaneous) requests from the same user are disabled.
  3. In case of excessive overload of Registrar servers because of actions of client — client account will be closed. In case of any loss or damages of equipment or software caused by excessive overload of Registrar servers, Registrar should proceed with legal prosecution of person responsible for excessive overload of equipment.

See Best practices of usage Reg.API

3. Submitting HTTP-Post Requests

3.1. HTTP-Post Operations

The HTTP-Post system allows many operations to be performed. The following tables detail the operations that can be performed using the HTTP-Post Gateway. Each operation has different field requirements; these have been detailed further on in this document.

Operation
(action Value)
Description Examples Permissions
Domain operations (refer to topic 4)
domain_create Submit domain registration request gtld, ru_org, ru_pp Reseller
domain_trans_in Submit domain transfer request gtld, ru, ru (Perl) Reseller
domain_check Domain Availability Check Example, Php Reseller
domain_whois Obtain WHOIS Data of Domain Example Reseller
domain_renew Domain Renewal Example Reseller
domain_update_nss Change domain DNS Servers. Set/unset domain delegation. Example Reseller
domain_update_contacts Update Contact Details for an Existing Domain Name gtld, ru_org, ru_pp Reseller
domain_delete Cancel a domain name Not implemented Reseller
domain_owner_change Change domain name owner Not implemented Reseller
domain_partcontrol_grant Grant domain name managament priviledges to another user Example Reseller
domain_partcontrol_revoke Revoke domain name management priviledges from another user Example Reseller
domain_get_info Obtain Domain Information Example; Perl User
domain_get_contacts Obtain Domain Owner's Details Example User
domain_get_nss Obtain list of DNS servers Example User
domain_list List registered domains Example User
domain_update_private_person_flag Change domain owner name to 'Private person' Example Reseller
domain_ns_register Register DNS server in NSI-registry (for .com, .net, .org) Not implemented Reseller
domain_ns_unregister Удалить регистрацию DNS-сервера из NSI-registry (для .com, .net, .org) Not implemented Reseller
domain_move_to_another_account Move domain to another account Example Reseller
 
Zone Operations (refer to topic 5)
zone_add_rr Add Resource Record A, CNAME, MX, NS, TXT Reseller
zone_rm_rr Delete Resource Record Example Reseller
zone_update Update zone Example Reseller
zone_get_info Obtain Zone Information Example Reseller
 
User Operations (refer to topic 6)
user_create Create user Example VIP-reseller
user_update_details Update user details ru_org, ru_pp VIP-reseller
 
Miscellaneous Operations (refer to topic 7)
nop NOP (no-operation) pass.auth sign.auth All
balance_get Check User's Balance Example User
balance_refill Request Bill for Balance Refill Example Reseller
change_pay_type Change bill payment method Example Reseller
delete_bill Delete bill Example Reseller
folder_create Folder creation Example User
tld_price_get Getting prices for TLDs Example User
 
Miscellaneous Operations (refer to topic 8)
service_create Order new service Пример отсутствует All

Permissions legend:

All
Any user, including test account username
User
Any registered user
Test
'test' user (test mode)
Reseller
Official reseller
VIP-reseller
Official reseller signed an additional contract
Own.
Domain owner (owner of account, where domain is registered and action is performed)
URDM
User with restricted access to domain managament

Important! If user with "User" permissions will use function requiring "Reseller" premissions then system will return generic response instead of real data.

3.2. Input Format

The input format is a standard HTTP/1.0 POST packet. The following rules apply:

  • All field values, unless otherwise specified, are free format strings.
  • Field values should be encoded in windows-1251 encoding.
  • All required must be present, and contain at least one non-white space character.
  • Fields must not exceed the maximum length.
  • Parameters of HTTP request should conform corresponding fields including case.
  • Some fields can be "multiline" (string with tailing "new-line" character). In examples "new-line" character is represented by "\n" string.

3.3. Common response messages

The following table outlines the Mandatory fields. Every HTTP-Post request you send can contain these fields.

Field Name Max Length Field Description
action 80 Specifies the operation to be performed. e.g., domain_check
username 80 Specify the exact user name assigned by REG.RU for your login to the registration system.
password 80 Specify the exact password assigned by REG.RU for your login to the registration system.
Fields password and signature are mutual exclusive and can't appear in the same request. See topic 3.6.
signature 32 Request signature. Used as an alternative authentication method instead of password.
Fields password and signature are mutual exclusive and can't appear in the same request. See topic 3.6.
timestamp 32 Operation time stamp. Any string with maximum length of 32 characters. Optional field for guaranteeing uniue transactions. In case if it is specified, all subsequent operations with same timestamp will be rejected.
domain_name 67 Specify the fully qualified domain name to be registered, e.g. example.com. The maximum length is 67 characters (63 + 4). Alphanumeric characters and hyphens are allowed. The domain name cannot start or end with a hyphen. Domain names containing russian characters ("russian domains") must be specified in windows-1251 (CP1251) encoding.
extended_message_lang 2 Extended error description language ('ru', 'en' or not set). See topic 3.5
fail_if_no_money 1 Return error if not enough funds to complete the operation. By default (unless this flag is not set) requested operation is stored in the system, however it will be processed after submitting "change payment method" request via web interface.
no_bill_notify 1 Do not send order confirmation by email.
By default for any new order (domain registration, transfer or renewal is a separate order in the system) email confirmation is sent to email, specified in account settings. If flag no_bill_notify is set then confirmation email is not sent.
point_of_sale 80 Any string that identifies the system / website, through which the buyer placed an order for this domain. Optional. Example: "regpanel.ru" . Optional.

3.4. Common error messages

The HTTP-Post system will return the following error messages:

Response Message Description
Authentication errors
Error: No username given The "username" field is empty.
Error: Username/password Incorrect The "username" and "password" fields are either not completed or the data input does not match a valid user.
Error: Signature authentication failed Authentication using request signature fauled. Signature does not match query content.
Error: No authorization mechanism selected No authentication data found in the request. I. e. neither password nor signature used.
Domain name errors
Error: domain_name is invalid The "domain_name" field is either empty or invalid: i.e. domain contains invalid characters, exceeds maximum length etc.
Error: <domain name> not found Domain name does not exist or WHOIS data for this domain is unavailable.
Error: Domain name <domain name> not found or not owned by you Domain not found or owned by another user.
Mescellaneous errors
Error: No action given The "action" field is empty.
Error: Unknown action: <action> Invalid / non-existing operation or function code.
Error: The following fields are invalid: <fields list> The data entered in the indicated field is invalid. Enter the correct data in the field and repost the request.
Error: Timestamp is not unique Transaction ID (operation timestamp) is not unique. Action will not be executed.
Error: System Unavailable The RegRuSRS Post gateway is unavailable. The operation has not been processed and should be resubmitted.
Error: Internal error\n<error msg> Internal error in the RegRuSRS. Please, contact REG.RU (support[at]reg[dot]ru) immediately and report the problem.

3.5. Extended system responses

If field "extended_message_lang" is set then system returns extended description of error or successful operation. Field "extended_message_lang" can be either 'ru' or 'en'. If field "extended_message_lang" is not set then system does not return extended response.

More information about extended system responses:
In this mode system returns multiline response describing error or successful operation. First line has strict format desribed above in "Response Message" topic. Next optional lines may contain detailed description of error or successful operation. There is no strict format for this description. It just represents response in human-readable form. Exteded response language is controlled by "extended_message_lang" field which can be either 'ru' or 'en'.

3.6. Auth methods

There are two methods of authentication enabled in RegRuSRS system at the moment: login/password authentication and operation signature authentication.

3.6.1 Password authentication

Аутентификация осуществляется с использованием полей запроса username и password. Пользователь с указанным логином и паролем должен существовать в системе регистрации RegRuSRS для успешного прохождения аутентификации.

3.6.2 Operation signature authentication

Аутентификация осуществляется с использованием поля запроса signature (при этом поле password не используется!).

Значение поля signature формируется следующим образом:

secretkey_hash = SHA1_HEX( secretkey )
message_digest = "value1:value2:value2:value3:secretkey_hash"
signature = SHA1_HEX( message_digest )
Функции и значения переменных, участвующих в формуле:
SHA1_HEX
Хэш-функция SHA1, выдающая результат в шестнадцатиричном представлении
secretkey_hash
Захешированный пароль / секретный ключ
message_digest
Строка, содержащая дайджест сообщения — значения полей запроса (исключая поле signature, разделённые двоеточием).
secretkey
Строка с «секретным включом» пользователя (основной пароль пользователя в системе либо специальный пароль пользователя для API, если он задан)
value1, value2 ... valueX
Значение полей запроса, отсортированных по имени.

Пример задания значения полей запроса (на языке Perl):

my %query_fields = (
	action => 'nop',
	domain_name => 'testdom.ru',
	timestamp => 12345,
	username => 'test',
	signature => Digest::SHA1::sha1_hex('nop:testdom.ru:12345:test:'.Digest::SHA1::sha1_hex('test')),
);

Пример кода для генерации подписи для любого запроса (на языке Perl):

my @fields_to_sign =
	map { $query_fields{$_} }
	grep { $_ ne 'signature' && $_ !~ /^_/ }
	sort keys %query_fields;

push @fields_to_sign, $secretkey_hash;

my $string_to_sign = join ':', @fields_to_sign;
my $signature = Digest::SHA1::sha1_hex( $string_to_sign );

4. Domain operations

4.1. Domain Registration and Transfer

Common parameters for all requests.

Field Name Min Length Max Length Field Description
folder 0 255 Folder name, in which domain will be added. Required is full folder name.
enduser_ip 11 15 IP-address of enduser (user that made an order). Optional field before 01.06.2009. After 01.06.2009 it is mandatory field.

4.1.1. Registration in .ru and .su zones

This operation allows you to register .RU and .SU domain names. Following are the field requirements you will need to use in your HTTP-post script. The action field to perform this operation must be set to domain_create.
There are two mulual exclusive sets of contact fields - for organizations and for private persons.
Some fields can be "multiline": lines are separated by "\n" sequence. Example: "+7 3432 811221\n+7 3432 811222\n+7 3432 811223".

Field Name Min Length Max Length Field Description
period 1 2 This is the registration period and is mandatory. The only possible value for .ru and .su domains: 1
descr 5 255 Domain description in English. Optional.
Organization contacts (only for organizations, do not use for private persons)
org 6 255
multi-
line
Organization name in latin letters - domain administrator.
Will be used as WHOIS data of domain. Could be multiline. Example: Karla-Marla Uryupinsk State University Example2: "ROGA I KOPYTA", LTD.
org_r 10 255
multi-
line
Full organization name in russian language - domain administrator, according to ????. For non-residents filled in native or english language.Could be multiline.
Example: Общество с ограниченной ответственностью "Рога и Копыта" Example2: Общество с ограниченной ответственностью "Рога и Копыта"
code 10 10 Organization INN code (for Russian organizations) - domain administrator.
Could be empty, if domain administrator is non-resident of Russia and have no INN code. Example: 7701107259
kpp 9 9 Organization KPP code (for Russian organizations). Optional field.
Example: 632946014
country 2 2 2-letter ISO-code of country where company is registered.
Example: RU
address_r 15 255
multi-
line
The legal address of organization in russian language. Could be multiline.
Example: 101000, Москва, УЛ.Пупкина, 1, стр. 2
p_addr 15 255
multi-
line
The postal address of domain administrator in russian language. Could be multiline.
Example: 101000, Москва, ул.Пупкина, 1, стр. 2, отдел мебели, офис 433 (для В. Лоханкина)
phone 8 255
multi-
line
The phone numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 495 8102233\n+7 3432 811221
fax 8 255
multi-
line
The fax numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 3432 811221
e_mail 6 255
multi-
line
The email addresses of domain administrator according to RFC-822. Could be multiline. Example: ncc@test.ru\ntest@test.ru
Private persons contacts (only for private persons, do not use for organizations)
person 8 64 First name, first letter of patronymic (without point) and last name of domain administrator. Will be used as WHOIS data of domain. For non-residents this field contains name in native language or in english transliteration.
Example: Vassily N Pupkin
private_person_flag 1 1 Show/Hide domain administrator name is WHOIS data.
Set to '1' - to hide domain owner name.
Set to '0' - to show domain owner name.
person_r 9 64 First name, first letter of patronymic (without point) and last name of domain administrator in russian language, according to passport.
For non-residents this field contains name in native language or in english transliteration. Example: Василий Николаевич Пупкин Example2: John Smith
passport 20 255
multi-
line
The serie, number, issuer and issue date of passport.
Date format: DD.MM.YYYY
For non-residents its possible to use another document, drivers' licence for example. In this case document type should be stated in the first line. Field could be multiline. Example: 32 02 651241 выдан 48 о/м г.Москвы 26.12.1990 Example2: driver's licence\n AA 1234 BB John Smith
birth_date 10 10 The birth date of domain administrator in DD.MM.YYYY format.
Example: 07.11.1917
country 2 2 2-letter ISO-code of country.
Example: RU
p_addr 15 255
multi-
line
The postal address of domain administrator in russian language.
Field could be multiline. Example: 101000, Москва, ул.Пупкина, 1, стр. 2, отдел мебели, офис 433
phone 8 255
multi-
line
The phone numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 495 8102233\n+7 3432 811221
fax 8 255
multi-
line
The fax numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 3432 811221
e_mail 6 255
multi-
line
The email addresses of domain administrator according to RFC-822. Could be multiline. Example: ncc@test.ru\ntest@test.ru
code 12 12 INN code of domain administrator - private businessmen.
Only for private businessmen.
Example: 789012345678
Domain DNS servers (required at least 2 DNS servers)
ns0 6 80 Primary DNS server.
ns1 6 80 Secondary DNS server.
ns2 6 80 Third DNS server.
ns3 6 80 Fourth DNS server.
ns0ip 8 15 Specify the IP-address of Primary name server hostname (only if hostname is based on the domain name). Optional.
ns1ip 8 15 Specify the IP-address of Secondary name server hostname (only if hostname is based on the domain name). Optional.
ns2ip 8 15 Specify the IP-address of Third name server hostname (only if hostname is based on the domain name). Optional.
ns3ip 8 15 Specify the IP-address of Fourth name server hostname (only if hostname is based on the domain name). Optional.

Note:
You can use DNS servers of REG.RU at no cost. Just set ns1.reg.ru and ns2.reg.ru as Primary and Secondary DNS servers
and manage you zone records using REG.RU web interface.

Registration of Other (gTLD) Domains

This operation allows you to register .COM .NET .ORG .BIZ .INFO .BE .CC .TV .РУ .КОМ .НЕТ .ОРГ domain names. Following are the field requirements you will need to use in your HTTP-post script. The action field to perform this operation must be set to domain_create.

Field Name Min Length Max Length Field Description
period 1 2 This is the registration period in years and is mandatory. Specify as follows: 1 - 10
Domain owner contacts
o_company 5 80 Domain organisation contacts. Set to "Private person" (without parenthises) if domain owner is Private person.
o_first_name 2 40 First name
o_last_name 2 40 Last name
o_email 6 90 The email address of domain owner.
o_phone 8 20 The phone numbers of domain owner.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
o_fax 8 20 The phone numbers of domain owner.
Format: international code (including +) and phone number. Optional.
(Example: +7.4952171179).
o_addr 8 80 Address of domain owner: street, building, apartment (office)
o_city 2 80 Address of domain owner: city
o_state 2 40 Address of domain owner: region/state
o_postcode 3 10 Postal code of domain owner
o_country_code 2 2 2-letter ISO-code of country. List of coutry ISO code can be found here
Domain administrator contacts
a_company 5 80 Domain organisation contacts. Set to "Private person" if domain owner is Private person.
a_first_name 2 40 First name
a_last_name 2 40 Last name
a_email 6 80 The email address of domain contact person.
a_phone 8 20 The phone numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
a_fax 8 20 The fax numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
a_addr 8 80 Address of contact person: street, building, apartment (office)
a_city 2 80 Address of contact person: city
a_state 2 40 Address of contact person: region/state
a_postcode 3 10 Postal code of contact person
a_country_code 2 2 2-letter ISO-code of country. List of coutry ISO code can be found here
Domain technical contacts
t_company 5 80 Specify the name of the Organization to which the technical contact belongs.
t_first_name 2 40 First name
t_last_name 2 40 Last name
t_email 6 80 The email address of domain contact person.
t_phone 8 20 The phone numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
t_fax 8 20 The fax numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
t_addr 8 80 Address of contact person: street, building, apartment (office)
t_city 2 80 Address of contact person: city
t_state 2 40 Address of contact person: region/state
t_postcode 3 10 Postal code of contact person
t_country_code 2 2 2-letter ISO-code of country. List of coutry ISO code can be found here
Domain billing contacts
b_company 5 80 Specify the name of the Organization to which the billing contact belongs.
b_first_name 2 40 First name
b_last_name 2 40 Last name
b_email 6 80 The email address of domain contact person.
b_phone 8 20 The phone numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
b_fax 8 20 The fax numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
b_addr 8 80 Address of contact person: street, building, apartment (office)
b_city 2 80 Address of contact person: city
b_state 2 40 Address of contact person: region/state
b_postcode 3 10 Postal code of contact person
b_country_code 2 2 2-letter ISO-code of country. List of coutry ISO code can be found here
Additional fields for .US zone
RselnexusAppPurpose 2 2 Domain usage area Allowed options:
P1 - Commercial purpose
P2 - Non commercial purpose
P3 - Personal usage
P4 - Educational purpose
P5 - Government purpose
RselnexusCategory 3 3 Domain owner: Allowed options:
C11 - Private individual, USA citizen
C12 - Private individual, resident of USA
C21 - A legal person or organization, incorporated in any US state
C31 - A legal person or organization, legally operating in US
C32 - A legal person or organization who ownes office or other real estate in US
Domain DNS servers (required at least 2 DNS servers)
ns0 6 80 Primary DNS server.
ns1 6 80 Secondary DNS server.
ns2 6 80 Third DNS server.
ns3 6 80 Fourth DNS server.
ns0ip 8 15 Specify the IP-address of Primary name server hostname (only if hostname is based on the domain name). Optional.
ns1ip 8 15 Specify the IP-address of Secondary name server hostname (only if hostname is based on the domain name). Optional.
ns2ip 8 15 Specify the IP-address of Third name server hostname (only if hostname is based on the domain name). Optional.
ns3ip 8 15 Specify the IP-address of Fourth name server hostname (only if hostname is based on the domain name). Optional.

Note:
You can use DNS servers of REG.RU at no cost. Just set ns1.reg.ru and ns2.reg.ru as Primary and Secondary DNS servers
and manage you zone records using REG.RU web interface.

4.1.3. Transfer Domain from another registrar

This operation allows you to submit transfer requests for .COM .NET .ORG .BIZ .INFO .US .RU and .SU domain names from another registrar to REG.RU The action field to perform this operation must be set to domain_create.

For gTLD domains you should specify authinfo field. All other fields are the same as for domain registration operations (see section 4.1.2). The only exception: for .ru and .su domains "period" field can accept value "0" (transfer without renewal).

Field Name Min Length Max Length Field Description
authinfo 6 32 Domain auth info. You should know this information from previous registrar.

4.1.4. Response Message

Additionally to common error messages HTTP gateway can return next messages:

Response Message Description
Success: Registration request accepted for <domain name> for <period> years This response indicates a successful registration. If "extended_message_lang" is set then additional response is returned with payment status: "Amount successfully charged", "Order not payed - not enough money at account".
Also the system returns invoice number for this operation.
You can find its details in 'my bills' section of REG.RU web interface.
The message has such format: Bill #<bill number> is created for this operation
Example:  "Bill #12345 is created for this operation"
Success: Transfer request accepted for <domain name> This response indicates a successful transfer operation. If "extended_message_lang" is set then additional response is returned with payment status: "No charge required", "Amount successfully charged", "Order not payed - not enough money at account".
Also the system returns invoice number for this operation.
You can find its details in 'my bills' section of REG.RU web interface.
The message has such format: Bill #<bill number> is created for this operation
Example:  "Bill #12345 is created for this operation"
Error: Unavailable Domain Name: <domain_name> This response results from a registration request. The domain name is already registered, or it fails to meet the criteria for a legitimate domain name.
Error: Registraion via the system unavailable in this TLD Registraion via REG.RU system unavailable in this TLD
Error: Invalid name servers Name servers are not specified or they are invalid (only Primary DNS server is specified or DNS servers are not registered in NSI-registry).
Error: Domain is already ordered by you There is existing order for this domain. Duplicate orders for the same domain is not allowed.
Error: Not enough money for operation Not enough funds on accout to complete operation. If "extended_message_lang" is set then additional response is returned with payment status: "<XXX> RUR needed".

4.2. Domain Renewal

This operation allows you order domain renewal. The action field to perform this operation must be set to domain_renew.
The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
period 1 2 This is the renewal period in years and is mandatory. Specify as follows: 1 - for .ru and .su zones, 1-10 for other TLDs. Renewal request is submitted not earlier than 60 days before domain expiration.

Response Message

Additionally to common error messages HTTP gateway can return next messages:

Response Message Description
Success: Renewed <domain name> for <years> years This response indicates a successful domain renewal operation. If "extended_message_lang" is set then additional response is returned with payment status: "Amount successfully charged", "Order not payed - not enough money at account".
Also the system returns invoices numbers ordered by creation date in descending order for this operation.
You can find their details in 'my bills' section of REG.RU web interface.
The message has such format:
Bill #<bill number> with payment option <pay_type> is created for this operation
Example: 
"Bill #12349 with payment option 'prepay' is created for this operation"
"Bill #12345 with payment option 'prepay' is created for this operation"
Error: Cannot renew domain <domain name>. Domain is not active Domain is either inactive or not payed or deleted or transferring to another registrar.
Error: Domain <domain name> can't be renewed yet Domains .RU, .SU and .TJ can't be prolonged earlier than 2 months before their expiration date.

4.3. Domain Availability Check

This operation allows you to check domain availability The action field to perform this operation must be set to domain_check. No additional fields required.

Response Message

Additionally to common error messages HTTP gateway can return next messages:

Response Message Description
Success: <domain name> is Available Domain is available for registration.
Success: <domain name> is Unavailable Domain is UNavailable for registration.

4.4. Obtain WHOIS Data of Domain

This operation allows you to obtain whois data of domain. The action field to perform this operation must be set to domain_whois. No additional fields required.

But we recommend to obtain whois information by yourselves: Perl, PHP.

Response Message

Additionally to common error messages HTTP gateway can return next messages:

Response Message Description
Error: <domain name> not found The domain name is either not existing or it's WHOIS data is not at the WHOIS database yet.
<raw whois data> Whois information returned in human-readable form in HTML format. This data can be directly embedded to any web page without risk of page layout corruption.

4.5. Change domain DNS Servers

This operation allows you to redelegate domain name to new name servers. It is to be noted that only domain names under your account can be redelegated.
The action field to perform this operation must be set to domain_update_nss.

IMPORTANT: A minimum of 2 name servers must be specified. The maximum is 4. The name server and its IP address must be specified for each name server that does not exist at the registry. This will enable the name server to be created at the registry.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
ns0 6 80 Primary DNS server.
ns1 6 80 Secondary DNS server.
ns2 6 80 Third DNS server.
ns3 6 80 Fourth DNS server.
ns0ip 8 15 Specify the IP-address of Primary name server hostname (only if hostname is based on the domain name). Optional.
ns1ip 8 15 Specify the IP-address of Secondary name server hostname (only if hostname is based on the domain name). Optional.
ns2ip 8 15 Specify the IP-address of Third name server hostname (only if hostname is based on the domain name). Optional.
ns3ip 8 15 Specify the IP-address of Fourth name server hostname (only if hostname is based on the domain name). Optional.
undelegate 1 1 Флаг снятия домена с делегирования. Необязательное поле.
0 - Делегировать
1 - Снять делегирование

Note:
You can use DNS servers of REG.RU at no cost. Just set ns1.reg.ru and ns2.reg.ru as Primary and Secondary DNS servers
and manage you zone records using REG.RU web interface.

Response Message

Кроме общих сообщений об ошибках HTTP-шлюз может возвращать один из следующих ответов:

Response Message Description
Success: Redelegated <domain name> to <name server list> This indicates a successful redelegation
Success: Redelegated <domain name> to <name server list> Status set to <status> This indicates a successful redelegation and change delegation status flag
Error: Invalid name servers Name servers are not specified or they are invalid.

4.6. Update Contact Details for an Existing Domain Name

This operation allows you to update contact details for domain name. The action field to perform this operation must be set to domain_update_contacts.

4.6.1. Update Contact Details for .ru and .su domains

After manual check of registrant data any changes of "org", "org_r", "code", "address_r", "person", "person_r", "passport", "birth_date" fields will be disabled. All changes made by this operation for given fields will be ignored.

Field Name Min Length Max Length Field Description
descr 5 255 Domain description in English. Optional.
Organization contacts (only for organizations, do not use for private persons)
org 6 255
multi-
line
Organization name in latin letters - domain administrator.
Will be used as WHOIS data of domain. Could be multiline. Example: Karla-Marla Uryupinsk State University Example2: "ROGA I KOPYTA", LTD.
org_r 10 255
multi-
line
Full organization name in russian language - domain administrator, according to ????. For non-residents filled in native or english language.Could be multiline.
Example: Общество с ограниченной ответственностью "Рога и Копыта" Example2: Общество с ограниченной ответственностью "Рога и Копыта"
code 10 10 Organization INN code (for Russian organizations) - domain administrator.
Could be empty, if domain administrator is non-resident of Russia and have no INN code. Example: 7701107259
kpp 9 9 Organization KPP code (for Russian organizations). Optional field.
Example: 632946014
country 2 2 2-letter ISO-code of country where company is registered.
Example: RU
address_r 15 255
multi-
line
The legal address of organization in russian language. Could be multiline.
Example: 101000, Москва, УЛ.Пупкина, 1, стр. 2
p_addr 15 255
multi-
line
The postal address of domain administrator in russian language. Could be multiline.
Example: 101000, Москва, ул.Пупкина, 1, стр. 2, отдел мебели, офис 433 (для В. Лоханкина)
phone 8 255
multi-
line
The phone numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 495 8102233\n+7 3432 811221
fax 8 255
multi-
line
The fax numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 3432 811221
e_mail 6 255
multi-
line
The email addresses of domain administrator according to RFC-822. Could be multiline. Example: ncc@test.ru\ntest@test.ru
Private persons contacts (only for private persons, do not use for organizations)
person 8 64 First name, first letter of patronymic (without point) and last name of domain administrator. Will be used as WHOIS data of domain. For non-residents this field contains name in native language or in english transliteration.
Example: Vassily N Pupkin
private_person_flag 1 1 Show/Hide domain administrator name is WHOIS data.
Set to '1' - to hide domain owner name.
Set to '0' - to show domain owner name.
person_r 9 64 First name, first letter of patronymic (without point) and last name of domain administrator in russian language, according to passport.
For non-residents this field contains name in native language or in english transliteration. Example: Василий Николаевич Пупкин Example2: John Smith
passport 20 255
multi-
line
The serie, number, issuer and issue date of passport.
Date format: DD.MM.YYYY
For non-residents its possible to use another document, drivers' licence for example. In this case document type should be stated in the first line. Field could be multiline. Example: 32 02 651241 выдан 48 о/м г.Москвы 26.12.1990 Example2: driver's licence\n AA 1234 BB John Smith
birth_date 10 10 The birth date of domain administrator in DD.MM.YYYY format.
Example: 07.11.1917
country 2 2 2-letter ISO-code of country.
Example: RU
p_addr 15 255
multi-
line
The postal address of domain administrator in russian language.
Field could be multiline. Example: 101000, Москва, ул.Пупкина, 1, стр. 2, отдел мебели, офис 433
phone 8 255
multi-
line
The phone numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 495 8102233\n+7 3432 811221
fax 8 255
multi-
line
The fax numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 3432 811221
e_mail 6 255
multi-
line
The email addresses of domain administrator according to RFC-822. Could be multiline. Example: ncc@test.ru\ntest@test.ru
code 12 12 INN code of domain administrator - private businessmen.
Only for private businessmen.
Example: 789012345678

4.6.2. Update Contact Details for other (gTLD) domains

You will not be able to change the organization name (o_company) through this operation. Changing the organization name - domain owner is performed with domain_owner_change operation.

Field Name Min Length Max Length Field Description
Domain owner contacts
o_company 5 80 Domain organisation contacts. Set to "Private person" (without parenthises) if domain owner is Private person.
o_first_name 2 40 First name
o_last_name 2 40 Last name
o_email 6 90 The email address of domain owner.
o_phone 8 20 The phone numbers of domain owner.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
o_fax 8 20 The phone numbers of domain owner.
Format: international code (including +) and phone number. Optional.
(Example: +7.4952171179).
o_addr 8 80 Address of domain owner: street, building, apartment (office)
o_city 2 80 Address of domain owner: city
o_state 2 40 Address of domain owner: region/state
o_postcode 3 10 Postal code of domain owner
o_country_code 2 2 2-letter ISO-code of country. List of coutry ISO code can be found here
Domain administrator contacts
a_company 5 80 Domain organisation contacts. Set to "Private person" if domain owner is Private person.
a_first_name 2 40 First name
a_last_name 2 40 Last name
a_email 6 80 The email address of domain contact person.
a_phone 8 20 The phone numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
a_fax 8 20 The fax numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
a_addr 8 80 Address of contact person: street, building, apartment (office)
a_city 2 80 Address of contact person: city
a_state 2 40 Address of contact person: region/state
a_postcode 3 10 Postal code of contact person
a_country_code 2 2 2-letter ISO-code of country. List of coutry ISO code can be found here
Domain technical contacts
t_company 5 80 Specify the name of the Organization to which the technical contact belongs.
t_first_name 2 40 First name
t_last_name 2 40 Last name
t_email 6 80 The email address of domain contact person.
t_phone 8 20 The phone numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
t_fax 8 20 The fax numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
t_addr 8 80 Address of contact person: street, building, apartment (office)
t_city 2 80 Address of contact person: city
t_state 2 40 Address of contact person: region/state
t_postcode 3 10 Postal code of contact person
t_country_code 2 2 2-letter ISO-code of country. List of coutry ISO code can be found here
Domain billing contacts
b_company 5 80 Specify the name of the Organization to which the billing contact belongs.
b_first_name 2 40 First name
b_last_name 2 40 Last name
b_email 6 80 The email address of domain contact person.
b_phone 8 20 The phone numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
b_fax 8 20 The fax numbers of contact person.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
b_addr 8 80 Address of contact person: street, building, apartment (office)
b_city 2 80 Address of contact person: city
b_state 2 40 Address of contact person: region/state
b_postcode 3 10 Postal code of contact person
b_country_code 2 2 2-letter ISO-code of country. List of coutry ISO code can be found here
Additional fields for .US zone
RselnexusAppPurpose 2 2 Domain usage area Allowed options:
P1 - Commercial purpose
P2 - Non commercial purpose
P3 - Personal usage
P4 - Educational purpose
P5 - Government purpose
RselnexusCategory 3 3 Domain owner: Allowed options:
C11 - Private individual, USA citizen
C12 - Private individual, resident of USA
C21 - A legal person or organization, incorporated in any US state
C31 - A legal person or organization, legally operating in US
C32 - A legal person or organization who ownes office or other real estate in US

4.6.3. Response Message

Additionally to common error messages HTTP gateway can return next messages:

Response Message Description
Success: Modified contact details for <domain name> This indicates a successful update

4.8. Redelegate an existing domain

This operation allows you to redelegate an existing domain to another user in REG.RU system. The action field to perform this operation must be set to domain_partcontrol_grant.
The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
newlogin 4 32 Login of another user in system who will get permission to manage domain.

Response Message

Additionally to common error messages HTTP gateway can return next messages:

Response Message Description
Success: Domain's management rights successfully granted to '<account>' Domain's management rights successfully granted to '<account>'
Error: no newlogin given Field newlogin is empty
Error: login '<newlogin>' not found No such username found

4.9. Revoke domain name management priviledges from another user

This operation allows you to revoke permission to manage domain from another user in REG.RU system. The action field to perform this operation must be set to domain_partcontrol_revoke.

Response Message

Additionally to common error messages HTTP gateway can return next messages:

Response Message Description
Success: Domain management rights successfully revoked from another user Domain management rights successfully revoked from another user

4.10. Obtain Domain Information

This operation allows you to obtain domain information (status, registration date, expiry date, estimated renewal date).
The action field to perform this operation must be set to domain_get_info

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
show_folder_names 1 1 Show domain folders. Available options: "1"

Response Message

Additionally to common error messages HTTP gateway can return next messages:

Response Message Description
   state: <state>
   creation_date: <YYYY-MM-DD>
   expiration_date: <YYYY-MM-DD>
   future_periods: <years>;
   
Domain status
  • "N" – inactive (not registered / not transferred in);
  • "A" – active;
  • "S" – suspended;
  • "D" – deleted;
  • "O" – transferred to another registrar;
folder_names: folder_name1, folder_name2 List of domain folders.

4.11. Obtain Domain Owner's Details

This operation allows you to obtain domain owner contact information.
The action field to perform this operation must be set to domain_get_contacts

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
do_not_translate_newlines_to_spaces 1 1 By default all CR characters are translated to spaces. If this flag is set, CR characters will be translated to "\n".

Response Message

Additionally to common error messages HTTP gateway can return next messages:

Response Message Description
<field1>: <value1>;
<field2>: <value2>;
.....
<fieldN>: <valueN>;
Contacts fields in format: field : value

4.12. Obtain list of DNS servers

This operation allows you to obtain list of dns servers of your domain.
The action field to perform this operation must be set to domain_get_nss
The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
showip 1 1 Show IP addresses of DNS servers

Response Message

Additionally to common error messages HTTP gateway can return next messages:

Response Message Description
Success: <ns1.hostname>, <ns2.hostname>, ...
List of DNS servers, separated by commas
Success: <ns1.hostname> <NS1 IP>, <ns2.hostname> <NS2 IP>, ...
List of DNS servers, separated by commas with its IPs if requested

4.13. List registered domains

This operation allows you to get list of registered domains with such details: domain status, registration date, expiry date.
The action field to perform this operation must be set to domain_list.
Attention! Mandatory field domain_name not needed for this operation!
Also you can get domain administrator contacts of domain with this operation.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
credate_start 9 9 Show domains FROM specified creation date. Date format: YYYY-MM-DD
credate_end 9 9 Show domains TILL specified creation date. Date format: YYYY-MM-DD
expdate_start 9 9 Show domains FROM specified expiry date. Date format: YYYY-MM-DD
expdate_end 9 9 Show domains TILL specified expiry date. Date format: YYYY-MM-DD
domain_searchstr 1 63 Show domains found by this search string (use "*" as "anything" mask).
searchstr 1 63 Find domain by domain details (name/email or all details like address and so on, use "*" as "anything" mask). Used with conjuction with strict_search_option
folder_name 1 255 Search by domain folder name
strict_search_option 1 1 Specifies search option when searching by name/email or all details.
Possible values: '1' - search by name/email
'0' - search by all details. Used with conjuction with searchstr
export_details_yaml 1 1 Specifies format of domain details AND contacts of domain administrator.
Possible values: '1' - use YAML format for domain details AND contacts of domain administrator.
'0' - DO NOT use YAML format. In this case you will get standart response WITHOUT contacts of domain administrator.

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: domain_name|status|create_date|expire_date|is_partcontrol Domain list. Example:
Success: aaa.com|A|2007-07-12|2008-07-12|partcontrol:NO
trans. transferred-domain.com|N|2001-01-01|2002-01-01|partcontrol:YES
Error: wrong date format for field '<date_filter>'\nCorrect date format: 'YYYY-MM-DD' Wrong date format for field '<date_filter>'
Example:
Error: wrong date format for field 'credate_start'\nCorrect date format: 'YYYY-MM-DD'

4.14. Change domain administrator name to 'Private person'

This operation allows you change domain administrator name to 'Private person'
This operation is allowed only for domains registered in .ru or .su zones. Domain should be registered on private person.
The action field to perform this operation must be set to domain_update_private_person_flag.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
private_flag 1 1 Show/Hide domain administrator name is WHOIS data.
Set to '1' - to hide domain administrator name.
Set to '0' - to show domain administrator name.

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: domain owner name set to "Private person" Changed domain administrator name in domain's WHOIS to 'Private person' (private_flag = 1).
Success: domain owner name set to your real name Domain administrator name set to your real name (private_flag = 0).
Error: can not set domain owner name to "Private person" Can not change domain administrator name to 'Private person'. If "extended_message_lang" is set then additional response is returned with detailed error description.
Possible error descriptions:
'Domain is not in .ru or .su zones' - Domain is not in .ru or .su zones.
'Domain is not registered on private person' - Domain is not registered on private person.

4.15. Move domain to another account

This operation allows you to move domain to another account in our system.
The action field to perform this operation must be set to domain_move_to_another_account.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
new_user_id 2 6 ID of user in our system.
If this field is filled then field new_user_login is ignored.
new_user_login 3 32 Login of user in our system.
If this field is filled then field new_user_id is ignored.

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: domain <domain_name> successfully moved to another account domain was successfully moved to another account.
Error: failed to move domain <domain_name> to another account failed to move domain to another account
Error: new_user_id or new_user_login required One of mandatory parameters is not provided (new_user_id or new_user_login).
Error: new user not found Invalid new account.

5. DNS Zone Management

The table below describes various dns zone operations (management, updating records etc) processed via HTTPS gateway.

5.1. Add Resource Record

This operation allows you to add resource record for your domain.
Available record types: A, MX, CNAME, NS, TXT, SRV.
The action field to perform this operation must be set to zone_add_rr

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
subname 2 50 Subdomain name. To update domain itself - set to "@"
rectype 1 5 Available record types: A, MX, NS, CNAME, TXT, SRV.
For 'A' type record
ipaddr 8 16 IP-address
For 'CNAME' type record
hostname 2 50 Canonical name
For 'MX' type record
hostname 2 50 Mail server
priority 1 2 Record priority
For 'NS' type record
nsnum 1 1 NS server number
hostname 2 50 DNS server
For 'TXT' type record
text 1 253 Text
For 'SRV' type record
subname 1 253 Service name
priority 1 2 Record priority
weight 1 2 Weight
port 1 6 Port
target 1 253 Target

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: Record added Record added
Error: Uninplemented rectype Incorrect or unimplemented record type
Error: Invalid subdomain Invalid subdomain name
Error: Incorrect IP Invalid IP-address is provided for 'A' record
Error: Conflict with CNAME record It is forbidden to specify CNAME record with records of other types for subdomain (except 'CNAME' record)
Error: Invalid hostname Invalid hostname (for CNAME, MX and NS records).
Error: CNAME conflict with other record It is forbidden to specify CNAME record with records of other types for subdomain (for 'CNAME' records)
Error: Incorrect text Incorrect text length (for TXT records)
Error: incorrect symbols in Service Incorrect data in 'service' field (for SRV records)
Error: Incorrect port Incorrect data in 'port' field (for SRV records)
Error: Incorrect target Incorrect data in 'target' field (for SRV records)
Error: Incorrect weight Incorrect data in 'target' field (for SRV records)

5.2. Delete Resource Record

This operation allows you to delete zone resource records. The action field to perform this operation must be set to zone_rm_rr.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
subname 2 50 Subdomain name
rectype 2 10 Record type
priority 1 6 Priority
content 1 255 Record content. Depends on record type.

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: Record removed Record deleted
Success: Record not found Record not found

5.3. Update zone

This operation allows you to update zone on DNS servers (update SOA record).
The action field to perform this operation must be set to zone_update.

No additional fields required.

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: Zone updated Zone updated successfully.
Error: Can't update zone Unable to update zone. Possibly, domain is inactive (unpaid or suspended).

5.4. Obtain Zone Information

This operation allows you to setup zone for hosting.
The action field to perform this operation must be set to zone_get_info.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
get_state 1 1 Return zone status

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success:
subname: <subname>; priority: <priority>; address: <address>; rectype: <rectype>;
subname: <subname>; priority: <priority>; address: <address>; rectype: <rectype>;
....
Zone resource records
Success:
subname: <subname>; priority: <priority>; address: <address>; rectype: <rectype>; state: <state>;
subname: <subname>; priority: <priority>; address: <address>; rectype: <rectype>; state: <state>;
....
Zone resource records with status
Success: No zone resource records

6. User Operations

The table below describes user operations processed via HTTPS gateway.

6.1. Create user

This operation allows you to create new user in our system.
The action field to perform this operation must be set to user_create.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
user_login 2 32 New user login in our system.
Allowed character in password: latin lowercase letters "a"-"z", characters "0" - "9", "-", "_".
user_password 4 32 New user password in our system.
Any latin character is allowed.
user_email 7 128 Email of new user in our system.
user_country_code 2 2 2-letter country code of new user. "RU" for example.
List of coutry ISO code can be found here.
user_first_name 2 40 First name
user_last_name 2 40 Last name
user_company 2 40 Company name of new user
user_icq 5 9 ICQ UIN of new user
user_phone 8 20 The phone numbers of new user.
Format: international code (including +) and phone number.
(Example: +7.4952171179).
user_fax 8 20 The phone numbers of new user.
Format: international code (including +) and phone number. Optional.
(Example: +7.4952171179).
user_addr 8 80 Address of new user: street, building, apartment (office)
user_city 2 80 Address of new user: city
user_state 2 40 Address of new user: region/state
user_postcode 3 10 Postal code of new user
user_wmid 12 12 Webmoney ID of new owner
user_language 7 7 Interface language of reg.ru website. Available options: "russian" or "english".
user_website 12 128 Website of new user
user_subsribe 1 1 Subscribe to newsletters from REG.RU (field value = "1").
user_mailnotify 1 1 Send confirmation email about registration on REG.RU (field value = "1").

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: new user is created. New user id: <user_id> User <user_id> is created
Error: USER_BAD_LOGIN Field <user_login> contain illegal characters.
Error: USER_ALREADY_EXISTS Login lt;user_login> already registered in our system.
Error: CONTACTS_CHECK_FAILED Some contacts fields are invalid. If "extended_message_lang" is set then additional response is returned with payment status:
"The following fields are invalid: <...>, <...>".

6.2. Update user details

This operation allows you to update user's details in our system.
The action field to perform this operation must be set to user_update_details.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
user_id 2 6 ID of user in our system.
If this field is filled then field user_login is ignored.
user_login 3 32 Login of user in our system.
profile_type 5 6 Profile type. Available options: "gtld", "ru_org", "ru_pp"
Organization contacts (only for organizations, do not use for private persons)
org 6 255
multi-
line
Organization name in latin letters - domain administrator.
Will be used as WHOIS data of domain. Could be multiline. Example: Karla-Marla Uryupinsk State University Example2: "ROGA I KOPYTA", LTD.
org_r 10 255
multi-
line
Full organization name in russian language - domain administrator, according to ????. For non-residents filled in native or english language.Could be multiline.
Example: Общество с ограниченной ответственностью "Рога и Копыта" Example2: Общество с ограниченной ответственностью "Рога и Копыта"
code 10 10 Organization INN code (for Russian organizations) - domain administrator.
Could be empty, if domain administrator is non-resident of Russia and have no INN code. Example: 7701107259
kpp 9 9 Organization KPP code (for Russian organizations). Optional field.
Example: 632946014
country 2 2 2-letter ISO-code of country where company is registered.
Example: RU
address_r 15 255
multi-
line
The legal address of organization in russian language. Could be multiline.
Example: 101000, Москва, УЛ.Пупкина, 1, стр. 2
p_addr 15 255
multi-
line
The postal address of domain administrator in russian language. Could be multiline.
Example: 101000, Москва, ул.Пупкина, 1, стр. 2, отдел мебели, офис 433 (для В. Лоханкина)
phone 8 255
multi-
line
The phone numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 495 8102233\n+7 3432 811221
fax 8 255
multi-
line
The fax numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 3432 811221
e_mail 6 255
multi-
line
The email addresses of domain administrator according to RFC-822. Could be multiline. Example: ncc@test.ru\ntest@test.ru
Private persons contacts (only for private persons, do not use for organizations)
person 8 64 First name, first letter of patronymic (without point) and last name of domain administrator. Will be used as WHOIS data of domain. For non-residents this field contains name in native language or in english transliteration.
Example: Vassily N Pupkin
person_r 9 64 First name, first letter of patronymic (without point) and last name of domain administrator in russian language, according to passport.
For non-residents this field contains name in native language or in english transliteration. Example: Василий Николаевич Пупкин Example2: John Smith
passport 20 255
multi-
line
The serie, number, issuer and issue date of passport.
Date format: DD.MM.YYYY
For non-residents its possible to use another document, drivers' licence for example. In this case document type should be stated in the first line. Field could be multiline. Example: 32 02 651241 выдан 48 о/м г.Москвы 26.12.1990 Example2: driver's licence\n AA 1234 BB John Smith
birth_date 10 10 The birth date of domain administrator in DD.MM.YYYY format.
Example: 07.11.1917
country 2 2 2-letter ISO-code of country.
Example: RU
p_addr 15 255
multi-
line
The postal address of domain administrator in russian language.
Field could be multiline. Example: 101000, Москва, ул.Пупкина, 1, стр. 2, отдел мебели, офис 433
phone 8 255
multi-
line
The phone numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 495 8102233\n+7 3432 811221
fax 8 255
multi-
line
The fax numbers of domain administrator.
Format: international code (including +) and phone number.
International code, local code and phone number should be splitted by spaces. No parentheses and dashes allowed. Could be multiline.
Example: +7 3432 811221
e_mail 6 255
multi-
line
The email addresses of domain administrator according to RFC-822. Could be multiline. Example: ncc@test.ru\ntest@test.ru
code 12 12 INN code of domain administrator - private businessmen.
Only for private businessmen.
Example: 789012345678

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: profile <profile_type> succesfully updated for user id <user_id> Profile <profile_type> is updated. Field "user_id" was used.
Success: profile <profile_type> succesfully updated for user <user_login> Profile <profile_type> is updated. Field "user_login" was used.
Error: profile_type is missing or invalid Profile_type is missing or invalid.
Error: operation enabled only for users with special contract signed Operation enabled only for users with special contract signed.
Error: USER_ID_REQUIRED Field <user_id> is missing or invalid.
Error: CONTACTS_CHECK_FAILED Some contacts fields are invalid. If "extended_message_lang" is set then additional response is returned with payment status:
"The following fields are invalid: <...>, <...>".

7. Miscellaneous Operations

The table below describes miscellaneous domain operations processed via HTTPS gateway.

7.1. No-Operation

This operation does nothing. But anyway it may be useful for example for testing API / connection. The action field to perform this operation must be set to nop.

No additional fields required.

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success Operation finished successfully

7.2. Check User's Balance

This operation allows you to get information about user's balance.
The action field to perform this operation must be set to balance_get.

No additional fields required.

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: account balance is <balance> RUR User's Balance in RUR (includng VAT)

7.3. Request Bill for Balance Refill

This operation allows you to request a bill to refill user's balance.
The action field to perform this operation must be set to balance_refill. Currently only refill via Webmoney system is supported.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
pay_type 2 20 Payment option. Currently only Webmoney system is supported. (field value — "WM")
amount 1 6 Prepaid sum in RUR (w/o VAT)
currency 3 3 Currency of new bill. Available options: "RUR", "USD".
Fields for "WM" payment option.
wmid 12 12 Payer WMID to request a bill

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: New bill #<bill_id> drawn; wm_invid: <wm_inv_id> Bill request #<bill_id> is prepared. Number of WM-account (when paying via WebMoney) — <wm_inv_id>

7.4. Change bill payment method

This operation allows you to change bill pay type.
The action field to perform this operation must be set to change_pay_type.

Important! When you change bill pay type it is applied to all bill items as well.
If payment type is set to "prepay" the system tries to process this bill. If there are enough funds on account then bill sum is deducted from account and marks bill as payed.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
bill_id 1 9 Bill number. System returns bill number when domain is registered, renewed or transferred.
pay_type 2 9 Payment option. Currently available payment options: ("WM", "bank", "pbank", "prepay", "yamoney", "rapida", "moneymail", "robox", "assist", "paymer", "cash", "chronopay")
currency 3 3 Currency. Allowed values: 'RUR', 'USD'

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: changed pay_type of bill #<bill_id> to '<pay_type>' Bill #<bill_id> payment type is changed to <pay_type>
If "extended_message_lang" is set then additional response is returned with payment status. (only for 'prepay' payment type)
"Bill #bill_id processed successfully.
Amount of '<bill_cost>' in '<currency>' is deducted from your account"
Error: not enough funds to process bill #<bill_id> Not enough funds on account to process bill #<bill_id>
Only for "prepay" pay_type
Example: "Error: not enough funds to process bill #12345"
Error: invalid pay_type Invalid pay type
Error: invalid currency Invalid pay currency
Error: bill_id should contain digits only Field <bill_id> should contain digits only
Error: bill #<bill_id> not found Bill #<bill_id> not found
Error: bill #<bill_id> already payed Bill #<bill_id> already payed

7.5. Delete bill

This operation allows you to delete bill by bill_id.
The action field to perform this operation must be set to delete_bill.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
bill_id 1 9 Bill number. System returns bill number when domain is registered, renewed or transferred.

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: bill #<bill_id> is deleted Bill #<bill_id> is deleted
Error: bill_id should contain digits only Field <bill_id> should contain digits only
Error: bill #<bill_id> not found Bill #<bill_id> not found

7.6. Folder creation

This operation allows you to create folder with specified name. The action field to perform this operation must be set to folder_create.

The following table outlines optional fields which should be used with the mandatory fields for this operation.

Field Name Min Length Max Length Field Description
folder_name 0 255 New folder name.

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: folder '<folder_name>' created #<folder_id> Folder <folder_name> created. Folder ID is <folder_id>.
Error: folder '<folder_name>' already exists Folder with that name already exists.
Error: empty folder name Empty folder name.

7.7. Getting prices for TLDs

This operation allows you to get registration and renewal prices for all available TLDs. Prices are returned using tariff for account from which you are making request. The action field to perform this operation must be set to tld_price_get.

Response Message

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success:
<tld1>:<reg_price1>:<renew_price2>
<tld2>:<reg_price1>:<renew_price2>
...
List of zones and registration / renewal prices (in RUR).

8. Service operations

8.1. Order service

Для заказа нового сервиса поле action принимает значение "service_create", далее передаются указанные ниже праметры, посредством которых можно указать требуемый сервис и его характеристики.
Field Name Min Length Max Length Field Description
servtype 10 17 Тип заказываемого сервиса, может принимать значения: srv_dns_both (поддержка DNS для доменов, зарегистрированных у других Регистраторов), srv_hosting_ispmgr (хостинг), srv_webfwd (форвардинг), srv_parking (парковка).
domain_name 4 67 Домен, для которого заказывается сервис, поле обязательно для всех сервисов.
period 1 2 Период заказа услуги (если не указано, то 1). Для хостинга измеряется в месяцах, для остальных услуг в годах
plan 6 13 Тарифный план, используется только при заказе услуги хостинг, может принимать значения: Host-Lite-0910, Host-0-0910, Host-1-1209, Host-2-1209, Host-3-1209, Host-CMS-1209.
fail_if_no_money 1 1 Управляет поведением системы, в случае отсутствия необходимой для заказа суммы на счету. Подробное описание приведено выше.
email 6 255 Задаёт электронный адрес для хостинга, если параметр не указан, то адрес берётся из профиля пользователя.
admin_comment 0 255 Задаёт контактные данные клиента, заказывающего хостинг. Будет использоваться при необходимости оперативной связи с клиентом. Доступен только администрации Reg.Hosting

Additionally to common error messages HTTPS gateway can return next messages:

Response Message Description
Success: service тип_сервиса is ordered for domain имя_домена" Сервис "тип_сервиса" был успешно заказан для домена "имя_домена"
Error: invalid service type Неизвестный тип сервиса, проверьте поле servtype
Error: plan field required Тарифный план хостинга либо не указан, либо неверен
Error: dname field required Не задано обязательное поле "домен"
Error: email address is incorrect Электронный адрес имеет некорректный формат

9. Examples

References to HTML forms using to send requests to gateway is listed in 3rd column of 'operations table' in section 3.1 (operations list).

Также для некоторых операций в данной таблице приведены примеры на Perl. There are some examples in Perl for several operations from the list.

Warning! Do not set up a web form for your customers that contain your login details, i.e. your user name and password, as end users can read them. To be secure, the login details must be appended with a server side process.

10. Best practices of usage Reg.API

Считаем своим долгом дать ряд практических советов, которые позволят, с одной стороны, уменьшить вероятность превышения допустимого количества запросов к Reg.API и следующего за этим временного блокирования операций партнёра, и, с другой стороны, снизить нагрузку на систему регистрации RegRuSRS.

  • Рекомендуем осуществлять WHOIS-запросы по доменам не через Reg.API, а обращаясь напрямую к WHOIS-серверам соответствующих доменных зон.

    При этом Вы получаете следующие преимущества:

    1. ответ на WHOIS-запрос будет получен Вами быстрее,
    2. предлагаемая схема более надёжна, поскольку исключаются лишние звенья,
    3. уменьшается вероятность блокировки при превышении лимита запросов к API за счёт сокращения общего количества API-запросов.

    Мы предлагаем готовые программные решения, которые могут облегчить Ваши трудозатраты перехода на правильную схему реализации функционала для осуществления WHOIS-запросов. А именно, мы предлагаем готовый код для осуществления WHOIS-запросов для языка Perl и для PHP:

    В случае возникновения вопросов по предоставляемому нами коду, Вы можете задать эти вопросы в специально созданном форуме для разработчиков.

  • Рекомендуем обращаться к API только для совершения заказов / изменения данных, но не для получения информации.

    Программное обеспечение некоторых наших партнёров либо не хранит, либо хранит неполную информацию о доменах в локальной базе данных. В результате эта информация очень часто динамически скачивается с нашей системы регистрации: через функции domain_list, domain_get_info, domain_get_contacts, domain_get_nss и т. п. Рекомендуем хранить полную информацию о доменах и услугах локально и обращаться к Reg.API только при необходимости изменения информации в реестре. В этом случае Ваша система будет работать быстрее и надёжнее, будет меньше зависеть от доступности нашей системы регистрации с Вашего сервера.

  • Рекомендуем выполнять все запросы на изменение данных асинхронно.

    Программное обеспечение некоторых наших партнёров осуществляет операции по регистрации доменов и услуг и изменению данных непосредственно в момент обработки HTTP-запроса от клиента. При этом, если API-запрос не выполняется по каким либо причинам сразу (отсутствие связи, превышение лимита запросов, блокировки параллельных запросов) то соответствующий запрос фактически теряется и клиент партнёра получает сообщение об ошибке.

    Подобная схема взаимодействия является крайне ненадёжной и в конечном итоге неудобной для Ваших клиентов.

    Рекомендуем осуществлять все запросы по заказу услуг / изменению данных асинхронно, через механизм очередей. В этом случае:

    1. исключаются блокировки API-запросов (параллельно выполняться только один API-запрос, поскольку очередь можно обрабатывать в один поток);
    2. в случае отсутствия связи запрос может повторяться, пока он не будет выполнен (таким образом существенно увеличивается надёжность системы);
    3. в случае ошибок при обработке запросов (если Reg.API вернул код ошибки) партнёр может решить проблему и повторить заявку, при этом клиент не получает лишних сообщений об ошибках: большинство проблем могут решаться партнёром самостоятельно, без ведома и участия клиента.

  • Рекомендуем выполнять на Вашей стороне логгирование всех API-запросов и ответов.

    При этом в случае возникновения любых проблем в процессе взаимодействия, наличие журнала позволит гораздо эффективнее диагностировать проблемы на Вашей стороне, а также более грамотно обращаться в нашу службу технической поддержки, приводя выдержки из журналов, описывающие проблему.

Надеемся, что данная информация может быть для Вас полезной и позволит улучшить качество нашего технического взаимодействия.