POST api/Zone/{zone_handle}/Record?user={user}
Create a new record on a zone
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
zone_handle |
Handle of zone |
string |
Required |
user |
Optional user handle - if empty logged in user will be used |
string |
None. |
Body Parameters
New record details
RecordName | Description | Type | Additional information |
---|---|---|---|
Id |
Record id |
integer |
None. |
ZoneId |
Zone id |
integer |
None. |
Host |
Host |
string |
Required String length: inclusive between 1 and 200 |
Data |
Data |
string |
Required String length: inclusive between 1 and 4096 |
Type |
Record type |
string |
Required String length: inclusive between 1 and 8 |
Weight |
Weight for MX records |
integer |
None. |
DateCreated |
Date created |
date |
None. |
NaptrPreference | string |
None. |
|
NaptrFlag | string |
None. |
|
NaptrRegExp | string |
None. |
Request Formats
application/json, text/json
{ "Id": 1, "ZoneId": 2, "Host": "sample string 3", "Data": "sample string 4", "Type": "sample string 5", "Weight": 1, "DateCreated": "2025-04-04T00:18:25.6804409+02:00", "NaptrPreference": "sample string 7", "NaptrFlag": "sample string 8", "NaptrRegExp": "sample string 9" }
application/xml, text/xml
<Record xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Zone"> <Data>sample string 4</Data> <DateCreated>2025-04-04T00:18:25.6804409+02:00</DateCreated> <Host>sample string 3</Host> <Id>1</Id> <NaptrFlag>sample string 8</NaptrFlag> <NaptrPreference>sample string 7</NaptrPreference> <NaptrRegExp>sample string 9</NaptrRegExp> <Type>sample string 5</Type> <Weight>1</Weight> <ZoneId>2</ZoneId> </Record>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
record object on success
Collection of errors on failure
Return codes
200 - ok
300 - ambiguous
401 - unauthorized
404 - not found
500 - internal server error
552 - object name and object handle mismatch
697 - Record has conflict
698 - Invalid Data
699 - Invalid Host
702 - Zone not found
703 - Zone is inactive
704 - Record malformed (type unknown)
705 - Record not added to zone
706 - Unexpected error
707 - Record already exists
712 - You're neither Owner, Tech, Admin nor Reseller of the domain
713 - You don't have Advanced DNS Management active for the domain
716 - The record is invalid for the zone
Name | Description | Type | Additional information |
---|---|---|---|
Id |
Record id |
integer |
None. |
ZoneId |
Zone id |
integer |
None. |
Host |
Host |
string |
Required String length: inclusive between 1 and 200 |
Data |
Data |
string |
Required String length: inclusive between 1 and 4096 |
Type |
Record type |
string |
Required String length: inclusive between 1 and 8 |
Weight |
Weight for MX records |
integer |
None. |
DateCreated |
Date created |
date |
None. |
NaptrPreference | string |
None. |
|
NaptrFlag | string |
None. |
|
NaptrRegExp | string |
None. |
Response Formats
application/json, text/json
{ "Id": 1, "ZoneId": 2, "Host": "sample string 3", "Data": "sample string 4", "Type": "sample string 5", "Weight": 1, "DateCreated": "2025-04-04T00:18:25.6804409+02:00", "NaptrPreference": "sample string 7", "NaptrFlag": "sample string 8", "NaptrRegExp": "sample string 9" }
application/xml, text/xml
<Record xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Zone"> <Data>sample string 4</Data> <DateCreated>2025-04-04T00:18:25.6804409+02:00</DateCreated> <Host>sample string 3</Host> <Id>1</Id> <NaptrFlag>sample string 8</NaptrFlag> <NaptrPreference>sample string 7</NaptrPreference> <NaptrRegExp>sample string 9</NaptrRegExp> <Type>sample string 5</Type> <Weight>1</Weight> <ZoneId>2</ZoneId> </Record>