Table of Contents

Class EditUserRequest

Namespace
Cloudflare.NET.User.Models
Assembly
Cloudflare.NET.dll

Request to edit the authenticated user's profile.

Only the fields that are set (non-null) will be updated. All fields are optional for partial updates.

public record EditUserRequest : IEquatable<EditUserRequest>
Inheritance
EditUserRequest
Implements
Inherited Members

Examples

// Update only first name
var request = new EditUserRequest(FirstName: "John");

// Update multiple fields
var request = new EditUserRequest(
  FirstName: "John",
  LastName: "Doe",
  Country: "US");

Remarks

Note: Email address, 2FA settings, and suspension status cannot be changed via this API. Those are managed through separate Cloudflare flows.

Constructors

EditUserRequest(string?, string?, string?, string?, string?)

Request to edit the authenticated user's profile.

Only the fields that are set (non-null) will be updated. All fields are optional for partial updates.

public EditUserRequest(string? FirstName = null, string? LastName = null, string? Country = null, string? Telephone = null, string? Zipcode = null)

Parameters

FirstName string

Updated first name.

LastName string

Updated last name.

Country string

Updated country (ISO 3166-1 alpha-2 code, e.g., "US", "GB", "DE").

Telephone string

Updated telephone number (international format, e.g., "+1-555-555-5555").

Zipcode string

Updated postal/zip code.

Examples

// Update only first name
var request = new EditUserRequest(FirstName: "John");

// Update multiple fields
var request = new EditUserRequest(
  FirstName: "John",
  LastName: "Doe",
  Country: "US");

Remarks

Note: Email address, 2FA settings, and suspension status cannot be changed via this API. Those are managed through separate Cloudflare flows.

See Also

Properties

Country

Updated country (ISO 3166-1 alpha-2 code, e.g., "US", "GB", "DE").

[JsonPropertyName("country")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Country { get; init; }

Property Value

string

FirstName

Updated first name.

[JsonPropertyName("first_name")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? FirstName { get; init; }

Property Value

string

LastName

Updated last name.

[JsonPropertyName("last_name")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? LastName { get; init; }

Property Value

string

Telephone

Updated telephone number (international format, e.g., "+1-555-555-5555").

[JsonPropertyName("telephone")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Telephone { get; init; }

Property Value

string

Zipcode

Updated postal/zip code.

[JsonPropertyName("zipcode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Zipcode { get; init; }

Property Value

string

See Also