# Turn domain lock on or off

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

Turn the domain's transfer lock (registrar lock) on or off.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/domain/@id/reglock` |
| 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/reglock" \
  -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_registrar_lock(id, switch=...)`, Node.js `await client.domains.updateRegistrarLock(id, { switch: ... });`, PHP `$client->domains->updateRegistrarLock($id, ['switch' => ...]);`.

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