## Edit User `client.User.Edit(ctx, body) (*UserEditResponse, error)` **patch** `/user` Edit part of your user details. ### Parameters - `body UserEditParams` - `Country param.Field[string]` The country in which the user lives. - `FirstName param.Field[string]` User's first name - `LastName param.Field[string]` User's last name - `Telephone param.Field[string]` User's telephone number - `Zipcode param.Field[string]` The zipcode or postal code where the user lives. ### Returns - `type UserEditResponse struct{…}` - `ID string` Identifier of the user. - `Betas []string` Lists the betas that the user is participating in. - `Country string` The country in which the user lives. - `FirstName string` User's first name - `HasBusinessZones bool` Indicates whether user has any business zones - `HasEnterpriseZones bool` Indicates whether user has any enterprise zones - `HasProZones bool` Indicates whether user has any pro zones - `LastName string` User's last name - `Organizations []Organization` - `ID string` Identifier - `Name string` Organization name. - `Permissions []Permission` Access permissions for this User. - `Roles []string` List of roles that a user has within an organization. - `Status Status` Whether the user is a member of the organization or has an invitation pending. - `const StatusMember Status = "member"` - `const StatusInvited Status = "invited"` - `Suspended bool` Indicates whether user has been suspended - `Telephone string` User's telephone number - `TwoFactorAuthenticationEnabled bool` Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication. - `TwoFactorAuthenticationLocked bool` Indicates whether two-factor authentication is required by one of the accounts that the user is a member of. - `Zipcode string` The zipcode or postal code where the user lives. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/user" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.User.Edit(context.TODO(), user.UserEditParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.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": "6d7f2f5f5b1d4a0e9081fdc98d432fd1", "betas": [ "zone_level_access_beta" ], "country": "US", "first_name": "John", "has_business_zones": true, "has_enterprise_zones": true, "has_pro_zones": true, "last_name": "Appleseed", "organizations": [ { "id": "023e105f4ecef8ad9ca31a8372d0c353", "name": "Cloudflare, Inc.", "permissions": [ "#zones:read" ], "roles": [ "All Privileges - Super Administrator" ], "status": "member" } ], "suspended": true, "telephone": "+1 123-123-1234", "two_factor_authentication_enabled": true, "two_factor_authentication_locked": true, "zipcode": "12345" } } ```