API
Domain Records
Update domain record

Update a Domain Record

  • Name
    put
    Type
    /v1/domains/:name/records
    Description

    Send a PUT request to Update a domain record.

Required Attributes

  • Name
    type
    Type
    string
    Description

    Type of the DNS record

  • Name
    data
    Type
    string
    Description

    Associated data for each DNS type: A: Host address; AAAA: IPv6 host address; ALIAS: Auto resolved alias; CNAME: Canonical name for an alias; MX: Mail eXchange; NS: Name Server; PTR: Pointer; SOA: Start Of Authority; SRV: location of service; TXT: Descriptive text.

    Required for A, AAAA, CNAME, MX, TXT, SRV, NS type of records.

  • Name
    name
    Type
    string
    Description

    Domain Record name which defines: service name, alias or host name.

    Required for A, AAAA, CNAME, TXT, SRV type of records.

  • Name
    port
    Type
    integer
    Description

    Port number for SRV record only, other record types return null.

    Required for SRV type of records.

  • Name
    weight
    Type
    integer
    Description

    Weight of SRV record only, other record types return null.

    Required for SRV type of records.

  • Name
    priority
    Type
    integer
    Description

    The priority level for MX and SRV records only, other record types return null.

    Required for MX, SRV type of records.

Example

curl -X PUT "https://api.simplystack.com/v1/domains/example.com/records" \
  -H "Content-Type: application/json" \
  -H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0" \
  -d '{"name": "www", "type": "A", "data": "192.168.1.1"}'

Response

JSON object with key named record with the following attributes about the domain record:

Attributes

See domain record model.

Example

json
{
  "record": {
    "id": 4,
    "name": "www",
    "data": "192.168.1.10",
    "port": null,
    "priority": null,
    "ttl": 1800,
    "type": "A",
    "weight": null
  }
}