WHOIS Profiles

7 views Markdown

The six endpoints that manage the registrant profiles a client uses on domain orders.

Overview

A WHOIS profile is the registrant data a client reuses across domain orders. A client can hold several profiles but only one default.

The fields are snake_case and carry the same names as the domain WHOIS contact endpoints. Storage uses a different shape, but the API converts it, so that is not your concern.

Reference

Listing the Profiles

get/api/v1/admin/clients/{id}/whois-profiles
Clients/GetClientWhoisProfiles admin default first

Returns every WHOIS profile the client has. The default one comes first.

Response fields data[] — 6
idintProfile id.
namestringProfile name.
is_defaultboolWhether it is the client's default.
contactobjectThe contact fields.
first_namestringThe registrant's first name.
last_namestringThe registrant's last name.
companystringCompany name.
emailstringE-mail address.
phonestringPhone number without the country code.
phone_ccstringCountry code for the phone.
faxstringFax number.
fax_ccstringCountry code for the fax.
address_line1stringFirst line of the address.
address_line2stringSecond line of the address.
citystringCity.
statestringState or province.
zipcodestringPostal code.
countrystringCountry code. The numeric code, not the two-letter one: 840.
created_atstringWhen it was created.
updated_atstringWhen it was last changed.
Errors 2
not_found404No such client or profile.
insufficient_scope403The key lacks the required scope.
Request
curl 'https://panel.example.com/api/v1/admin/clients/42/whois-profiles' \
  -H "Authorization: Bearer $API_KEY"
const res  = await fetch('https://panel.example.com/api/v1/admin/clients/42/whois-profiles', {
  headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();
$ch = curl_init('https://panel.example.com/api/v1/admin/clients/42/whois-profiles');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['Authorization: Bearer ' . $apiKey],
]);

$body = json_decode(curl_exec($ch), true);
curl_close($ch);
$response = Api::Clients()->GetClientWhoisProfiles(['id' => 42]);

// The default is first, but be ready for an empty list.
$default = $response['data'][0] ?? null;
Response
{
  "data": [
    {
      "id": 13,
      "name": "Primary",
      "is_default": true,
      "contact": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "[email protected]",
        "phone": "5550100",
        "phone_cc": "1",
        "address_line1": "123 Market Street",
        "city": "San Francisco",
        "state": "California",
        "zipcode": "94105",
        "country": "840"
      },
      "created_at": "2026-06-21 18:00:00",
      "updated_at": "2026-06-21 18:05:00"
    }
  ]
}

Creating a Profile

post/api/v1/admin/clients/{id}/whois-profiles
Clients/CreateClientWhoisProfile admin 201

Adds a new WHOIS profile to the client.

Body 3
namestringrequiredThe profile name.
contactobjectThe contact fields.
first_namestringThe registrant's first name.
last_namestringThe registrant's last name.
companystringCompany name.
emailstringE-mail address.
phonestringPhone number without the country code.
phone_ccstringCountry code for the phone.
faxstringFax number.
fax_ccstringCountry code for the fax.
address_line1stringFirst line of the address.
address_line2stringSecond line of the address.
citystringCity.
statestringState or province.
zipcodestringPostal code.
countrystringCountry code. The numeric code, not the two-letter one: 840.
defaultboolMakes the profile the client's default.
Response fields data — 6
dataobjectThe profile created. Same shape as the detail endpoint.
Errors 4
not_found404No such client or profile.
name_required422The profile name was empty.
create_failed500The profile could not be created.
insufficient_scope403The key lacks the required scope.
Request
curl -X POST 'https://panel.example.com/api/v1/admin/clients/42/whois-profiles' \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Primary",
    "default": true,
    "contact": {
      "first_name": "John",
      "last_name": "Doe",
      "email": "[email protected]",
      "country": "840"
    }
  }'
const res = await fetch('https://panel.example.com/api/v1/admin/clients/42/whois-profiles', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Primary',
    default: true,
    contact: {
      first_name: 'John',
      last_name: 'Doe',
      email: '[email protected]',
      phone: '5550100',
      phone_cc: '1',
      address_line1: '123 Market Street',
      city: 'San Francisco',
      state: 'California',
      zipcode: '94105',
      country: '840',
    },
  }),
});

const body = await res.json();
$ch = curl_init('https://panel.example.com/api/v1/admin/clients/42/whois-profiles');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'name'    => 'Primary',
        'default' => true,
        'contact' => [
            'first_name'    => 'John',
            'last_name'     => 'Doe',
            'email'         => '[email protected]',
            'phone'         => '5550100',
            'phone_cc'      => '1',
            'address_line1' => '123 Market Street',
            'city'          => 'San Francisco',
            'state'         => 'California',
            'zipcode'       => '94105',
            'country'       => '840',
        ],
    ]),
]);

$body = json_decode(curl_exec($ch), true);
curl_close($ch);
$response = Api::Clients()->CreateClientWhoisProfile([
    'id'      => 42,
    'name'    => 'Primary',
    'default' => true,
    'contact' => [
        'first_name'    => 'John',
        'last_name'     => 'Doe',
        'email'         => '[email protected]',
        'phone'         => '5550100',
        'phone_cc'      => '1',
        'address_line1' => '123 Market Street',
        'city'          => 'San Francisco',
        'state'         => 'California',
        'zipcode'       => '94105',
        'country'       => '840',
    ],
]);

$profileId = $response['data']['id'];
Response
{
  "data": {
    "id": 14,
    "name": "Primary",
    "is_default": true,
    "contact": { "first_name": "John", "last_name": "Doe", "country": "840" },
    "created_at": "2026-06-21 18:00:00",
    "updated_at": "2026-06-21 18:00:00"
  }
}
{
  "error": {
    "code": "name_required",
    "message": "Profile name is required."
  }
}

Profile Detail

get/api/v1/admin/clients/{id}/whois-profiles/{pid}
Clients/GetClientWhoisProfile admin

Returns one profile. The schema is the same as a list item.

Response fields data — 6
idintProfile id.
namestringProfile name.
is_defaultboolWhether it is the client's default.
contactobjectThe contact fields.
first_namestringThe registrant's first name.
last_namestringThe registrant's last name.
companystringCompany name.
emailstringE-mail address.
phonestringPhone number without the country code.
phone_ccstringCountry code for the phone.
faxstringFax number.
fax_ccstringCountry code for the fax.
address_line1stringFirst line of the address.
address_line2stringSecond line of the address.
citystringCity.
statestringState or province.
zipcodestringPostal code.
countrystringCountry code. The numeric code, not the two-letter one: 840.
created_atstringWhen it was created.
updated_atstringWhen it was last changed.
Errors 2
not_found404No such client or profile.
insufficient_scope403The key lacks the required scope.
Request
curl 'https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13' \
  -H "Authorization: Bearer $API_KEY"
const res  = await fetch('https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13', {
  headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();
$ch = curl_init('https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['Authorization: Bearer ' . $apiKey],
]);

$body = json_decode(curl_exec($ch), true);
curl_close($ch);
$response = Api::Clients()->GetClientWhoisProfile(['id' => 42, 'pid' => 13]);

Updating a Profile

put/api/v1/admin/clients/{id}/whois-profiles/{pid}
Clients/UpdateClientWhoisProfile admin contact is written whole

Updates the profile. A top-level field you leave out stays as it was.

Body 3
namestringThe profile name. Leave it out and the current name is kept.
contactobjectThe contact fields. If you send it, the block is written whole, so a missing field is emptied.
first_namestringThe registrant's first name.
last_namestringThe registrant's last name.
companystringCompany name.
emailstringE-mail address.
phonestringPhone number without the country code.
phone_ccstringCountry code for the phone.
faxstringFax number.
fax_ccstringCountry code for the fax.
address_line1stringFirst line of the address.
address_line2stringSecond line of the address.
citystringCity.
statestringState or province.
zipcodestringPostal code.
countrystringCountry code. The numeric code, not the two-letter one: 840.
defaultbooltrue makes it the default, false takes that away.
Response fields data — 6
dataobjectThe profile as it now stands. Same shape as the detail endpoint.
Errors 3
not_found404No such client or profile.
name_required422The profile name you sent was empty.
insufficient_scope403The key lacks the required scope.
Request
curl -X PUT 'https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13' \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"name":"Billing Contact"}'
const res = await fetch('https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Billing Contact' }),
});

const body = await res.json();
$ch = curl_init('https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'PUT',
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode(['name' => 'Billing Contact']),
]);

$body = json_decode(curl_exec($ch), true);
curl_close($ch);
// To change one contact field, read the current block first.
$current = Api::Clients()->GetClientWhoisProfile(['id' => 42, 'pid' => 13])['data']['contact'];
$current['email'] = '[email protected]';

$response = Api::Clients()->UpdateClientWhoisProfile([
    'id'      => 42,
    'pid'     => 13,
    'contact' => $current,
]);

Setting the Default

put/api/v1/admin/clients/{id}/whois-profiles/{pid}/default
Clients/SetClientWhoisProfileDefault admin one default only

Makes the profile the client's default. The previous default is cleared in the same operation.

Body
No body is needed; send an empty one. Both the client and the profile come from the path.
Response fields data — 2
idintId of the profile that became the default.
defaultboolAlways comes back as true.
Errors 2
not_found404No such client or profile.
insufficient_scope403The key lacks the required scope.
Request
curl -X PUT 'https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13/default' \
  -H "Authorization: Bearer $API_KEY"
const res = await fetch('https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13/default', {
  method: 'PUT',
  headers: { Authorization: `Bearer ${apiKey}` },
});

const body = await res.json();
$ch = curl_init('https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13/default');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'PUT',
    CURLOPT_HTTPHEADER     => ['Authorization: Bearer ' . $apiKey],
]);

$body = json_decode(curl_exec($ch), true);
curl_close($ch);
$response = Api::Clients()->SetClientWhoisProfileDefault(['id' => 42, 'pid' => 13]);

Deleting a Profile

delete/api/v1/admin/clients/{id}/whois-profiles/{pid}
Clients/DeleteClientWhoisProfile admin

Deletes the profile. Contact data already registered on domains is not affected.

Response fields data — 2
deletedboolWhether the delete succeeded.
idintId of the deleted profile.
Errors 2
not_found404No such client or profile.
insufficient_scope403The key lacks the required scope.
Request
curl -X DELETE 'https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13' \
  -H "Authorization: Bearer $API_KEY"
const res = await fetch('https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13', {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${apiKey}` },
});

const body = await res.json();
$ch = curl_init('https://panel.example.com/api/v1/admin/clients/42/whois-profiles/13');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'DELETE',
    CURLOPT_HTTPHEADER     => ['Authorization: Bearer ' . $apiKey],
]);

$body = json_decode(curl_exec($ch), true);
curl_close($ch);
$response = Api::Clients()->DeleteClientWhoisProfile(['id' => 42, 'pid' => 13]);

Pitfalls

The contact block is written whole

Sending contact on an update replaces the entire block, and the fields you left out are emptied. To change one field, read the current block, edit it, and send all of it back. This differs from the top-level fields: leave out name and it is kept.

The country goes in as a numeric code

The country field wants the numeric code, not the two-letter one: 840 for the United States. Sending the abbreviation leaves the profile without a country and the domain registration can fail at the registrar.

Moving the default is quiet

Making a profile the default clears the client's previous default in the same operation. There is no separate confirmation or warning, so read the list back to check the outcome.

Was this helpful?

Thanks for your feedback!

Still Need Help?

Our support team is here around the clock for anything you can't find above.