Lock, privacy and authorisation code
POST /api/v1/domains/lock · POST /api/v1/domains/unlock
Section titled “POST /api/v1/domains/lock · POST /api/v1/domains/unlock”Turns the registrar transfer lock on or off. The lock prevents the domain being transferred away — leave it on unless the customer is actively moving the domain.
Request — same body for both
{ "domainName": "apiname.com"}Response — 204, no body
Confirm the new state with GET /api/v1/domains/info and read lockStatus.
Errors
| Code | Meaning and fix |
|---|---|
DnaValidationError |
domainName missing. |
Dna.DomainService:Domain:10007 |
Domain not found or not yours. |
Dna.DomainService:Domain:10016 |
The domain’s status does not permit the change. |
Dna.DomainService:Domain:10032 |
Unlock only. Refused because an ownership change is pending. Finish that first. |
Dna.DomainService:Epp:10001 |
The registry rejected it. |
POST /api/v1/domains/privacy
Section titled “POST /api/v1/domains/privacy”Turns WHOIS privacy protection on or off. With privacy on, the registrant’s personal data is replaced by a proxy in public records.
Request
{ "domainName": "apiname.com", "privacyStatus": true}| Field | Required | Notes |
|---|---|---|
domainName |
required | Must be a whole domain, not a subdomain. |
privacyStatus |
required | true enables, false disables. It must be present — omitting it is an error, not a default. |
Response — 204, no body
Errors
| Code | Meaning and fix |
|---|---|
DnaValidationError |
privacyStatus omitted or not a boolean, or domainName missing. |
Dna.DomainService:Domain:10046 |
You sent a subdomain. Send the registrable domain. |
Dna.DomainService:Domain:1021 |
Domain unknown or not yours. |
Dna.DomainService:Tld:10001 |
This extension does not support WHOIS privacy. |
PUT /api/v1/domains/auth
Section titled “PUT /api/v1/domains/auth”Generates a new transfer authorisation code and returns it.
Request
{ "domainName": "apiname.com"}Response — 200
{ "domainName": "apiname.com", "authCode": "mQ7#vR2-pL9xK4"}Errors
| Code | Meaning and fix |
|---|---|
Dna.DomainService:Domain:10007 |
Domain not found or not yours. |
Dna.DomainService:Domain:10040 |
The registry refused to change the code. |
Dna.DomainService:Domain:10035 |
The generated code does not satisfy this TLD’s length policy. Open a ticket. |
Dna.DomainService:Domain:10016 |
The domain’s status does not permit the change. |