Update a domain for the authenticated workspace.
PHP
declare(strict_types=1); require 'vendor/autoload.php'; use Dub; use Dub\Models\Operations; $sdk = Dub\Dub::builder() ->setSecurity( 'DUB_API_KEY' ) ->build(); $requestBody = new Operations\UpdateDomainRequestBody( slug: 'acme.com', expiredUrl: 'https://acme.com/expired', notFoundUrl: 'https://acme.com/not-found', placeholder: 'https://dub.co/help/article/what-is-dub', ); $response = $sdk->domains->update( slug: 'acme.com', requestBody: $requestBody ); if ($response->domainSchema !== null) { // handle response }
{ "id": "<string>", "slug": "acme.com", "verified": false, "primary": false, "archived": false, "placeholder": "https://dub.co/help/article/what-is-dub", "expiredUrl": "https://acme.com/expired", "notFoundUrl": "https://acme.com/not-found", "assetLinks": null, "appleAppSiteAssociation": null, "logo": "<string>", "createdAt": "<string>", "updatedAt": "<string>", "registeredDomain": { "id": "<string>", "createdAt": "<string>", "expiresAt": "<string>" } }
Default authentication mechanism
The domain name.
"acme.com"
The domain was updated.
The response is of type object.
object
Was this page helpful?