# Edit domain DNS record

`PUT /v1/domain/@id/dns/@index` · scope `dns:write`

Edit DNS record number `@index` of the domain.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/domain/@id/dns/@index` |
| 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 |
| --- | --- | --- | --- | --- |
| `id` | path | int | yes | Domain ID |
| `index` | path | string | yes | Position of the record in the domain's DNS record list |
| `record_id` | body | int | — | Recod index |
| `name` | body | string | — | Record name |
| `type` | body | string | — | Record type |
| `priority` | body | string | — | Record priority |
| `content` | body | string | — | Record content eg. IP address for A records |

## Example request

```bash
curl -X PUT "https://api.tino.vn/v1/domain/200001/dns/0" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "record_id": "<record_id>",
  "name": "<name>",
  "type": "<type>",
  "priority": "<priority>",
  "content": "<content>"
}'
```

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

SDK ([SDK & examples](/en/docs/sdk)): no dedicated function yet, use `client.request("PUT", "/domain/@id/dns/@index")`.

## Example response

No live sample: the route changes real data or the test account has no data for it. The answer is a JSON object; errors follow the common shape in [Calling the Tino API](/en/docs/api#errors).
