Skip to content

Domains

17 endpoints. Authentication, errors, paging and rate limits are described once, in the API overview.

Action Method Description
createorupdatetld POST Create or update a domain extension and its prices
domaingetlockingstatus GET Get the registrar lock status of a domain
domaingetnameservers GET Get the nameservers of a domain
domaingetwhoisinfo GET Get the contact details of a domain
domainregister POST Register a new domain
domainrelease POST Release a domain to another registrar
domainrenew POST Renew an existing domain
domainrequestepp GET Get the transfer (EPP) code of a domain
domaintoggleidprotect POST Turn ID protection on or off
domaintransfer POST Transfer a domain to this registrar
domainupdatelockingstatus POST Lock or unlock a domain at the registrar
domainupdatenameservers POST Change the nameservers of a domain
domainupdatewhoisinfo POST Change the contact details of a domain (not available)
domainwhois GET Check whether a domain is available to register
getclientsdomains GET List domains for a specific client
gettldpricing GET Get the prices of the enabled domain extensions
updateclientdomain POST Update a domain record

createorupdatetld

Create or update a domain extension and its prices.

POST /api/v1/createorupdatetld

Permission: manage_domains

Parameters

Name Type Required Description
extension string yes The extension, with or without the dot: .com or com.
register_price number no 0 or more.
transfer_price number no 0 or more.
renew_price number no 0 or more.
enabled boolean no Offered in the domain search.
sort_order integer no 0 or more.

Response

Field Description
result success
tldid integer

Example

curl -X POST https://example.com/api/v1/createorupdatetld \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "extension=.com"

domaingetlockingstatus

Get the registrar lock status of a domain.

GET /api/v1/domaingetlockingstatus

Permission: list_domains

Parameters

Name Type Required Description
domainid integer yes The domain.

Response

Field Description
result success
domainid integer
lockstatus the lock status the registrar reports

Errors

Status When
404 No such domain.
422 No registrar module is set on the domain.
502 The registrar could not be reached.

Example

curl -G https://example.com/api/v1/domaingetlockingstatus \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "domainid=1"

domaingetnameservers

Get the nameservers of a domain.

GET /api/v1/domaingetnameservers

Permission: list_domains

Parameters

Name Type Required Description
domainid integer yes The domain.

Response

Field Description
result success
domainid integer
ns1 string
ns2 string
ns3 string or null
ns4 string or null
ns5 string or null

Errors

Status When
404 No such domain.

Note

The nameservers PNLCS has on record.

Example

curl -G https://example.com/api/v1/domaingetnameservers \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "domainid=1"

domaingetwhoisinfo

Get the contact details of a domain.

GET /api/v1/domaingetwhoisinfo

Permission: list_domains

Parameters

Name Type Required Description
domainid integer yes The domain.

Response

Field Description
result success
domainid integer
whois object: Registrant

Errors

Status When
404 No such domain.

Note

Built from the client record in PNLCS, not read from the registrar.

Example

curl -G https://example.com/api/v1/domaingetwhoisinfo \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "domainid=1"

domainregister

Register a new domain.

POST /api/v1/domainregister

Permission: manage_domains

Parameters

Name Type Required Description
clientid integer yes The client.
domain string yes The domain name.
years integer no 1 to 10. Default 1.
registrar string no A registrar module installed here. Default manual.

Response

Field Description
result success
domainid integer
status string

Errors

Status When
422 The name is not a domain, or the registrar is unknown.

Example

curl -X POST https://example.com/api/v1/domainregister \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "clientid=1" \
  --data-urlencode "domain=example.com"

domainrelease

Release a domain to another registrar.

POST /api/v1/domainrelease

Permission: manage_domains

Not available

Always answers 501: no registrar module implements a release. Use domainrequestepp to get the transfer code.

domainrenew

Renew an existing domain.

POST /api/v1/domainrenew

Permission: manage_domains

Parameters

Name Type Required Description
domainid integer yes The domain.
years integer no 1 to 10. Default 1.

Response

Field Description
result success
domainid integer
expiry_date date

Example

curl -X POST https://example.com/api/v1/domainrenew \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "domainid=1"

domainrequestepp

Get the transfer (EPP) code of a domain.

GET /api/v1/domainrequestepp

Permission: list_domains

Parameters

Name Type Required Description
domainid integer yes The domain.

Response

Field Description
result success
domainid integer
eppcode string

Errors

Status When
404 No such domain.
422 No registrar module, or the registrar returned no code (its message is passed on).
502 The registrar could not be reached.

Example

curl -G https://example.com/api/v1/domainrequestepp \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "domainid=1"

domaintoggleidprotect

Turn ID protection on or off.

POST /api/v1/domaintoggleidprotect

Permission: manage_domains

Parameters

Name Type Required Description
domainid integer yes The domain.
idprotect boolean no The state you want. Left out, the current state is flipped.

Response

Field Description
result success
domainid integer
idprotection boolean

Errors

Status When
404 No such domain.

Example

curl -X POST https://example.com/api/v1/domaintoggleidprotect \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "domainid=1"

domaintransfer

Transfer a domain to this registrar.

POST /api/v1/domaintransfer

Permission: manage_domains

Parameters

Name Type Required Description
domainid integer yes The domain record.
eppcode string yes The transfer code from the current registrar.

Response

Field Description
result success
domainid integer
message string

Errors

Status When
422 No registrar module is set on the domain, or the registrar refused.

Example

curl -X POST https://example.com/api/v1/domaintransfer \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "domainid=1" \
  --data-urlencode "eppcode=example"

domainupdatelockingstatus

Lock or unlock a domain at the registrar.

POST /api/v1/domainupdatelockingstatus

Permission: manage_domains

Parameters

Name Type Required Description
domainid integer yes The domain.
lockstatus boolean yes 1 to lock, 0 to unlock.

Response

Field Description
result success
domainid integer
lockstatus boolean

Errors

Status When
404 No such domain.
422 No registrar module, or the registrar refused.
502 The registrar could not be reached.

Example

curl -X POST https://example.com/api/v1/domainupdatelockingstatus \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "domainid=1" \
  --data-urlencode "lockstatus=1"

domainupdatenameservers

Change the nameservers of a domain.

POST /api/v1/domainupdatenameservers

Permission: manage_domains

Parameters

Name Type Required Description
domainid integer yes The domain.
ns1 string yes First nameserver.
ns2 string no Second nameserver.
ns3 string no Third nameserver.
ns4 string no Fourth nameserver.
ns5 string no Fifth nameserver.

Response

Field Description
result success
domainid integer

Errors

Status When
404 No such domain.
502 The registrar did not accept them.

Note

Sent to the registrar, as from the client area.

Example

curl -X POST https://example.com/api/v1/domainupdatenameservers \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "domainid=1" \
  --data-urlencode "ns1=example"

domainupdatewhoisinfo

Change the contact details of a domain (not available).

POST /api/v1/domainupdatewhoisinfo

Permission: manage_domains

Not available

Always answers 501: no registrar module implements a contact update. Change the contacts at the registrar.

domainwhois

Check whether a domain is available to register.

GET /api/v1/domainwhois

Permission: list_domains

Parameters

Name Type Required Description
domain string yes The name to check.

Response

Field Description
result success
domain string
status available or unavailable

Errors

Status When
422 The name is not a domain.
503 No registrar or WHOIS server answered, so availability is unknown.

Note

The same check as the domain search in the shop.

Example

curl -G https://example.com/api/v1/domainwhois \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "domain=example.com"

getclientsdomains

List domains for a specific client.

GET /api/v1/getclientsdomains

Permission: list_domains

Parameters

Name Type Required Description
clientid integer no Only this client's domains. userid is accepted too.
domainid integer no One domain.
domain string no Domains whose name contains this.
status string no pending, active, grace, redemption, expired, cancelled, fraud or transferred_away.
limitstart integer no Where the page starts. Default 0.
limitnum integer no Page size, 1 to 250. Default 25.

Response

Field Description
result success
totalresults integer: rows matching the filters
startnumber integer: where this page starts
numreturned integer: rows on this page
data array: the rows

Example

curl -G https://example.com/api/v1/getclientsdomains \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET"

gettldpricing

Get the prices of the enabled domain extensions.

GET /api/v1/gettldpricing

Permission: list_domains

Parameters

None.

Response

Field Description
result success
pricing array of the enabled extensions and their register, transfer and renew prices

Example

curl -G https://example.com/api/v1/gettldpricing \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET"

updateclientdomain

Update a domain record.

POST /api/v1/updateclientdomain

Permission: manage_domains

Parameters

Name Type Required Description
domainid integer yes The domain.
status string no pending, active, grace, redemption, expired, cancelled, fraud or transferred_away.
expirydate date no Expiry date.
nextduedate date no Next due date.
regdate date no Registration date.
registrar string no A registrar module installed here.
paymentmethod string no A gateway installed here.
dns_management boolean no DNS management add-on.
email_forwarding boolean no Email forwarding add-on.
id_protection boolean no ID protection add-on.
notes string no Admin notes.

Response

Field Description
result success
domainid integer

Errors

Status When
404 No such domain.

Note

Changes the record only; nothing is sent to the registrar.

Example

curl -X POST https://example.com/api/v1/updateclientdomain \
  -H "X-API-Key: $PNLCS_IDENTIFIER" \
  -H "X-API-Secret: $PNLCS_SECRET" \
  --data-urlencode "domainid=1"