## Update domain `client.Registrar.Domains.Update(ctx, domainName, params) (*DomainUpdateResponse, error)` **put** `/accounts/{account_id}/registrar/domains/{domain_name}` Update individual domain. ### Parameters - `domainName string` Domain name. - `params DomainUpdateParams` - `AccountID param.Field[string]` Path param: Identifier - `AutoRenew param.Field[bool]` Body param: Auto-renew controls whether subscription is automatically renewed upon domain expiration. - `Locked param.Field[bool]` Body param: Shows whether a registrar lock is in place for a domain. - `Privacy param.Field[bool]` Body param: Privacy option controls redacting WHOIS information. ### Returns - `type DomainUpdateResponse interface{…}` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/registrar" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) domain, err := client.Registrar.Domains.Update( context.TODO(), "cloudflare.com", registrar.DomainUpdateParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", domain) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": {}, "success": true } ```