| Verb | URI | Description | |||
| PUT | /domains/domainId/records/recordId |
Modify the configuration of a record in the domain. | |||
| PUT | /domains/domainId/records |
Modify the configuration of records in the domain. | |||
![]() | Note |
|---|---|
This call returns an asynchronous response, as described in Section 3.5, “Synchronous and Asynchronous Responses”. |
Normal Response Code(s): 204, 202
Error Response Code(s): dnsFault (400, 500), serviceUnavailable (503), unauthorized (401), badRequest (400), itemNotFound (404), overLimit (413)
These calls modify the configuration of a specified record or multiple records in the specified domain.
![]() | Note |
|---|---|
When the domain and/or record TTL is supplied by the user, either via a create or update call, the TTL values must be 300 seconds or more. |
The only attributes that you can modify on a
record (during a PUT) are the data,
priority (for MX and SRV
records), ttl, and
comment attributes.
| Name | Description | Required | ||
| id | For modifying multiple records, the id for each record must be specified as an attribute. Note that for modifying a single record, the record id is a required parameter at the end of the API call URI. | Yes | ||
| name |
For record types other than SRV records, this specifies the name for the domain or subdomain and must be a valid domain name. If the record name attribute is not specified, it is assumed that the record name is the same as the domain name to which the record belongs.The name attribute cannot be modified. For SRV records, this specifies the entire service name, which is made up of the service, protocol, and domain name to which the record belongs. The service and protocol fields of the service name can be modified but not the domain name field. The record name attribute must be specified for SRV records. |
Yes | ||
| data | The data field is required for PTR records and must be a valid IPv4 or IPv6 IP address. | For PTR records only | ||
| priority | Can be included for MX and SRV records, but forbidden for other record types. If specified, must be an integer from 0 to 65535. | No | ||
| ttl | If specified, must be greater than 300. Defaults to the domain TTL if available, or 3600 if no TTL is specified. | No | ||
| comment | If included, its length must be less than or equal to 160 characters. | No | ||
Example 4.96. Modify Record Configuration Request: XML
PUT https://dns.api.rackspacecloud.com/v1.0/1234/domains/2725233/records/MX-3151218 Accept: application/xml X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812 Content-Type: application/xml Content-Length: 279 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <record name="example.com" data="mail.example.com" ttl="3600" xmlns:ns2="http://www.w3.org/2005/Atom" xmlns="http://docs.rackspacecloud.com/dns/api/v1.0" xmlns:ns3="http://docs.rackspacecloud.com/dns/api/management/v1.0"/>
Example 4.97. Modify Record Configuration Request: JSON
PUT https://dns.api.rackspacecloud.com/v1.0/1234/domains/2725233/records/MX-3151218
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 75
{
"ttl" : 3600,
"name" : "example.com",
"data" : "mail.example.com"
}
Example 4.98. Modify Records Configuration Request: XML
PUT https://dns.api.rackspacecloud.com/v1.0/1234/domains/2725233/records
Accept: application/xml
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/xml
Content-Length: 432
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recordsList xmlns:ns2="http://www.w3.org/2005/Atom" xmlns="http://docs.rackspacecloud.com/dns/api/v1.0" xmlns:ns3="http://docs.rackspacecloud.com/dns/api/management/v1.0">
<record id="MX-3151218" name="example.com" data="mail.example.com" ttl="3600"/>
<record id="CNAME-9778009" name="www.example.com" comment="This is a comment on the CNAME record"/>
</recordsList>
Example 4.99. Modify Records Configuration Request: JSON
PUT https://dns.api.rackspacecloud.com/v1.0/1234/domains/2725233/records
Accept: application/json
X-Auth-Token: ea85e6ac-baff-4a6c-bf43-848020ea3812
Content-Type: application/json
Content-Length: 253
{
"records" : [ {
"ttl" : 3600,
"name" : "example.com",
"id" : "MX-3151218",
"data" : "mail.example.com"
}, {
"name" : "www.example.com",
"id" : "CNAME-9778009",
"comment" : "This is a comment on the CNAME record"
} ]
}

![[Note]](/cdns-v1.0-cdns-devguide/common/images/admon/note.png)
