curl --request PUT \
--url https://console.perfgrid.com/api/v1/domains/{domain}/registrant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"registrant": {
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"region": "<string>",
"country": "<string>",
"vat_number": "<string>"
},
"contact_id": "<string>",
"citizenship": "<string>"
}
'import requests
url = "https://console.perfgrid.com/api/v1/domains/{domain}/registrant"
payload = {
"registrant": {
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"region": "<string>",
"country": "<string>",
"vat_number": "<string>"
},
"contact_id": "<string>",
"citizenship": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
registrant: {
first_name: '<string>',
last_name: '<string>',
company_name: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
address_line_1: '<string>',
address_line_2: '<string>',
postal_code: '<string>',
city: '<string>',
region: '<string>',
country: '<string>',
vat_number: '<string>'
},
contact_id: '<string>',
citizenship: '<string>'
})
};
fetch('https://console.perfgrid.com/api/v1/domains/{domain}/registrant', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.perfgrid.com/api/v1/domains/{domain}/registrant",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'registrant' => [
'first_name' => '<string>',
'last_name' => '<string>',
'company_name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'postal_code' => '<string>',
'city' => '<string>',
'region' => '<string>',
'country' => '<string>',
'vat_number' => '<string>'
],
'contact_id' => '<string>',
'citizenship' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.perfgrid.com/api/v1/domains/{domain}/registrant"
payload := strings.NewReader("{\n \"registrant\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\"\n },\n \"contact_id\": \"<string>\",\n \"citizenship\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://console.perfgrid.com/api/v1/domains/{domain}/registrant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"registrant\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\"\n },\n \"contact_id\": \"<string>\",\n \"citizenship\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.perfgrid.com/api/v1/domains/{domain}/registrant")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"registrant\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\"\n },\n \"contact_id\": \"<string>\",\n \"citizenship\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"ascii_name": "<string>",
"status": "pending_registration",
"registered_on": "<string>",
"expires_on": "<string>",
"next_due_date": "<string>",
"auto_renew": true,
"whois_privacy": true,
"is_locked": true,
"manageable": true,
"nameservers": [
"<string>"
],
"dnssec": [
"<unknown>"
],
"registrant": {}
}
}{
"message": "<string>",
"errors": {}
}Change the registrant
Registers the domain to someone else (registrant), to one of the
billing account’s domain contacts (contact_id, whose details are
copied), or back to the billing details (registrant: null).
registrant.phone is in E.164 (+4520123456) and must be a number
in use. Some registries only take registrants from some countries
(.eu, .fr, .it): anyone else is refused with a 422. On .eu,
citizenship (an ISO country code) lets a person living elsewhere
hold the domain; it replaces the answer the domain has, and leaving it
out removes that. Needs domains.manage. The answer has the domain’s
nameservers, DNSSEC records and registrant only for a token that also
has domains.view.
curl --request PUT \
--url https://console.perfgrid.com/api/v1/domains/{domain}/registrant \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"registrant": {
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"region": "<string>",
"country": "<string>",
"vat_number": "<string>"
},
"contact_id": "<string>",
"citizenship": "<string>"
}
'import requests
url = "https://console.perfgrid.com/api/v1/domains/{domain}/registrant"
payload = {
"registrant": {
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"region": "<string>",
"country": "<string>",
"vat_number": "<string>"
},
"contact_id": "<string>",
"citizenship": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
registrant: {
first_name: '<string>',
last_name: '<string>',
company_name: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
address_line_1: '<string>',
address_line_2: '<string>',
postal_code: '<string>',
city: '<string>',
region: '<string>',
country: '<string>',
vat_number: '<string>'
},
contact_id: '<string>',
citizenship: '<string>'
})
};
fetch('https://console.perfgrid.com/api/v1/domains/{domain}/registrant', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.perfgrid.com/api/v1/domains/{domain}/registrant",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'registrant' => [
'first_name' => '<string>',
'last_name' => '<string>',
'company_name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'postal_code' => '<string>',
'city' => '<string>',
'region' => '<string>',
'country' => '<string>',
'vat_number' => '<string>'
],
'contact_id' => '<string>',
'citizenship' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.perfgrid.com/api/v1/domains/{domain}/registrant"
payload := strings.NewReader("{\n \"registrant\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\"\n },\n \"contact_id\": \"<string>\",\n \"citizenship\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://console.perfgrid.com/api/v1/domains/{domain}/registrant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"registrant\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\"\n },\n \"contact_id\": \"<string>\",\n \"citizenship\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.perfgrid.com/api/v1/domains/{domain}/registrant")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"registrant\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"company_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"vat_number\": \"<string>\"\n },\n \"contact_id\": \"<string>\",\n \"citizenship\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"ascii_name": "<string>",
"status": "pending_registration",
"registered_on": "<string>",
"expires_on": "<string>",
"next_due_date": "<string>",
"auto_renew": true,
"whois_privacy": true,
"is_locked": true,
"manageable": true,
"nameservers": [
"<string>"
],
"dnssec": [
"<unknown>"
],
"registrant": {}
}
}{
"message": "<string>",
"errors": {}
}Authorizations
An API token from API tokens in the console, sent as Authorization: Bearer pgapi_.... It works for one billing account, and its permissions decide which endpoints it may call.
Path Parameters
Body
Response
DomainResource
Show child attributes
Show child attributes