## Update Account `client.Accounts.Update(ctx, params) (*Account, error)` **put** `/accounts/{account_id}` Update an existing account. ### Parameters - `params AccountUpdateParams` - `AccountID param.Field[string]` Path param: Account identifier tag. - `Account param.Field[Account]` Body param ### Returns - `type Account struct{…}` - `ID string` Identifier - `Name string` Account name - `Type AccountType` - `const AccountTypeStandard AccountType = "standard"` - `const AccountTypeEnterprise AccountType = "enterprise"` - `CreatedOn Time` Timestamp for the creation of the account - `ManagedBy AccountManagedBy` Parent container details - `ParentOrgID string` ID of the parent Organization, if one exists - `ParentOrgName string` Name of the parent Organization, if one exists - `Settings AccountSettings` Account settings - `AbuseContactEmail string` Sets an abuse contact email to notify for abuse reports. - `EnforceTwofactor bool` Indicates whether membership in this account requires that Two-Factor Authentication is enabled ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/accounts" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), option.WithAPIEmail("user@example.com"), ) account, err := client.Accounts.Update(context.TODO(), accounts.AccountUpdateParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Account: accounts.AccountParam{ ID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Name: cloudflare.F("Demo Account"), Type: cloudflare.F(accounts.AccountTypeStandard), }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", account.ID) } ``` #### 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" } } ], "success": true, "result": { "id": "023e105f4ecef8ad9ca31a8372d0c353", "name": "Demo Account", "type": "standard", "created_on": "2014-03-01T12:21:02.0000Z", "managed_by": { "parent_org_id": "4536bcfad5faccb111b47003c79917fa", "parent_org_name": "Demo Parent Organization" }, "settings": { "abuse_contact_email": "abuse_contact_email", "enforce_twofactor": true } } } ```