# Turn DNS zone DNSSEC on or off

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

Turn DNSSEC on or off for the DNS zone; choose the operation with `widgetdo`.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/service/@service_id/dns/@zone_id/dnssec` |
| 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 | integer | yes | DNS service ID |
| `zone_id` | path | integer | yes | DNS zone ID |
| `widgetdo` | body | string | yes | widgetdo action |

## Example request

```bash
curl -X PUT "https://api.tino.vn/v1/service/100003/dns/500001/dnssec" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "widgetdo": "<widgetdo>"
}'
```

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

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