PATCH
/
domains
/
{slug}
import { Dub } from "dub";

const dub = new Dub({
  token: "DUB_API_KEY",
});

async function run() {
  const result = await dub.domains.update("acme.com");

  // Handle the result
  console.log(result);
}

run();
{
  "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>"
  }
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

slug
string
required

The domain name.

Example:

"acme.com"

Body

application/json

Response

200
application/json
The domain was updated.

The response is of type object.