Update a domain for the authenticated workspace.
package main import( "context" dubgo "github.com/dubinc/dub-go" "github.com/dubinc/dub-go/models/operations" "log" ) func main() { ctx := context.Background() s := dubgo.New( dubgo.WithSecurity("DUB_API_KEY"), ) res, err := s.Domains.Update(ctx, "acme.com", &operations.UpdateDomainRequestBody{ Slug: dubgo.String("acme.com"), ExpiredURL: dubgo.String("https://acme.com/expired"), NotFoundURL: dubgo.String("https://acme.com/not-found"), Placeholder: dubgo.String("https://dub.co/help/article/what-is-dub"), }) if err != nil { log.Fatal(err) } if res != nil { // 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?