# Edit DNS record

`PUT /v1/service/@service_id/dns/@zone_id/records/@record_id` · scope `dns:write`

Edit a record of the DNS zone.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/service/@service_id/dns/@zone_id/records/@record_id` |
| Method | `PUT` |
| Scope | `dns:write` |
| Header | `Authorization: Bearer <token>` |
| Content-Type | `application/json` |
| Tokens that can call it | app tokens (`tinoat_`), personal API tokens (`tinopat_`) |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `service_id` | path | string | yes | DNS service ID |
| `zone_id` | path | string | yes | DNS zone ID |
| `record_id` | path | string | yes | DNS record ID |
| `name` | body | string | no | Record name |
| `ttl` | body | integer | no | Record ttl |
| `priority` | body | integer | no | Priority of the record |
| `type` | body | string | no | Record type |
| `content` | body | string | no | Contents of the record |

## Example request

```bash
curl -X PUT "https://api.tino.vn/v1/service/100003/dns/500001/records/910001" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "example.com",
  "ttl": 3600,
  "priority": 10,
  "type": "A",
  "content": "203.0.113.10"
}'
```

`$TINO_TOKEN` is a token with the scope `dns:write`. Path parameters in the example are sample values.

SDK ([SDK & examples](/en/docs/sdk)): Python `client.dns.update_record(service_id, zone_id, record_id, service_id=...)`, Node.js `await client.dns.updateRecord(serviceId, zoneId, recordId, { service_id: ... });`, PHP `$client->dns->updateRecord($serviceId, $zoneId, $recordId, ['service_id' => ...]);`.

## Example response

```json
{
 "success": true,
 "record": {
  "id": "419192",
  "type": "TXT",
  "ttl": 3600,
  "name": "tino-sdk-capture",
  "priority": 0,
  "content": "<redacted>"
 },
 "info": [
  "dnsrecordupdated"
 ]
}
```

Live sample from a test account with personal data masked; long arrays and strings are trimmed (`… N more item(s)`, `… N more line(s)`).
