Read and set the registrar lock on a domain. A locked domain rejects unauthorized transfer requests at the registry.

Get registrar lock

Return the current lock state of a domain. GET /domains/{domain}/lock

Parameters

text
required
The domain to read, for example example.com.

Request

Response

The value is "locked" or "unlocked".

Save registrar lock

Set the lock state of a domain. POST /domains/{domain}/lock

Parameters

text
required
The domain to update, for example example.com.
text
required
The lock state to apply: locked or unlocked.

Request

The Go save snippet reuses the token() helper from the get example and also needs the net/url and strings imports.

Response

string
success when the lock state is applied.
string
Mirrors status.
string
Empty on success, or an error description on failure.