Skip to main content
POST
/
domains
/
register
PHP
declare(strict_types=1);

require 'vendor/autoload.php';

use Dub;
use Dub\Models\Operations;

$sdk = Dub\Dub::builder()
    ->setSecurity(
        'DUB_API_KEY'
    )
    ->build();

$request = new Operations\RegisterDomainRequestBody(
    domain: 'acme.link',
);

$response = $sdk->domains->register(
    request: $request
);

if ($response->object !== null) {
    // handle response
}
{
  "domain": "<string>",
  "status": "<string>",
  "expiration": 123
}
Domain registration is only available for certain Enterprise customers. Please contact us to get access.

Authorizations

Authorization
string
header
required

Default authentication mechanism

Body

application/json
domain
string
required

The domain to claim. We only support .link domains for now.

Minimum string length: 1
Pattern: .*\.link$
Example:

"acme.link"

Response

The domain was registered.

domain
string
required

The domain name.

status
string
required

The status of the domain registration.

expiration
number | null
required

The expiration timestamp of the domain (Unix timestamp in milliseconds).