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
FirstNamestringUpdated first name.
LastNamestringUpdated last name.
CountrystringUpdated country (ISO 3166-1 alpha-2 code, e.g., "US", "GB", "DE").
TelephonestringUpdated telephone number (international format, e.g., "+1-555-555-5555").
ZipcodestringUpdated 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
FirstName
Updated first name.
[JsonPropertyName("first_name")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? FirstName { get; init; }
Property Value
LastName
Updated last name.
[JsonPropertyName("last_name")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? LastName { get; init; }
Property Value
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
Zipcode
Updated postal/zip code.
[JsonPropertyName("zipcode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Zipcode { get; init; }