# Add DNS zone

`POST /v1/service/@service_id/dns` · scope `dns:write`

Create a new DNS zone in the DNS service.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/service/@service_id/dns` |
| Method | `POST` |
| 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 |
| `name` | body | string | no | Zone name |

## Example request

```bash
curl -X POST "https://api.tino.vn/v1/service/100003/dns" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "example.com"
}'
```

`$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.create_zone(service_id, service_id=...)`, Node.js `await client.dns.createZone(serviceId, { service_id: ... });`, PHP `$client->dns->createZone($serviceId, ['service_id' => ...]);`.

## 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).
