# Change nameservers

`PUT /v1/domain/@id/ns` · scope `domains:write`

Change the domain's nameservers; leave `nameservers` empty to use the default nameservers.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/domain/@id/ns` |
| Method | `PUT` |
| Scope | `domains: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 | string | yes | Domain ID |
| `nameservers` | body | array | no | List of nameservers to use |

## Example request

```bash
curl -X PUT "https://api.tino.vn/v1/domain/200001/ns" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "nameservers": "<nameservers>"
}'
```

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

SDK ([SDK & examples](/en/docs/sdk)): Python `client.domains.update_nameservers(id, id=...)`, Node.js `await client.domains.updateNameservers(id, { id: ... });`, PHP `$client->domains->updateNameservers($id, ['id' => ...]);`.

## Example response

```json
{
 "success": true,
 "info": [
  "success_changes_save"
 ]
}
```

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