API Reference
Links
Conversions
Customers
Domains
Update a domain
Update a domain for the authenticated workspace.
PATCH
/
domains
/
{slug}
Copy
from dub import Dub
with Dub(
token="DUB_API_KEY",
) as d_client:
res = d_client.domains.update(slug="acme.com", request_body={
"slug": "acme.com",
"expired_url": "https://acme.com/expired",
"not_found_url": "https://acme.com/not-found",
"placeholder": "https://dub.co/help/article/what-is-dub",
})
assert res is not None
# Handle response
print(res)
Copy
{
"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
Default authentication mechanism
Path Parameters
The domain name.
Example:
"acme.com"
Body
application/json
Response
200
application/json
The domain was updated.
The response is of type object
.
Copy
from dub import Dub
with Dub(
token="DUB_API_KEY",
) as d_client:
res = d_client.domains.update(slug="acme.com", request_body={
"slug": "acme.com",
"expired_url": "https://acme.com/expired",
"not_found_url": "https://acme.com/not-found",
"placeholder": "https://dub.co/help/article/what-is-dub",
})
assert res is not None
# Handle response
print(res)
Copy
{
"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>"
}
}
Assistant
Responses are generated using AI and may contain mistakes.