# Turn registrant privacy on or off

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

Turn the domain's registrant information protection (ID Protection) on or off.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/domain/@id/idprotection` |
| 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 | integer | yes | Domain ID |
| `switch` | body | boolean | no | true\|false |

## Example request

```bash
curl -X PUT "https://api.tino.vn/v1/domain/200001/idprotection" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "switch": "true|false"
}'
```

`$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_id_protection(id, switch=...)`, Node.js `await client.domains.updateIdProtection(id, { switch: ... });`, PHP `$client->domains->updateIdProtection($id, ['switch' => ...]);`.

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