Table of Contents

Struct UpdateUserRequest

Namespace
Vonage.Users.UpdateUser
Assembly
Vonage.dll

Represents a request to update an existing user's profile information and communication channels in the Vonage platform.

public readonly struct UpdateUserRequest : IVonageRequest
Implements
Inherited Members

Properties

Channels

The communication channels configured for the user. This replaces all existing channels with the new configuration.

[JsonPropertyOrder(4)]
public UserChannels Channels { get; }

Property Value

UserChannels

DisplayName

A human-readable display name for the user. Unlike the Name property, this does not need to be unique.

[JsonConverter(typeof(MaybeJsonConverter<string>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyOrder(1)]
public Maybe<string> DisplayName { get; }

Property Value

Maybe<string>

Id

The unique identifier of the user to update (e.g., "USR-12345678-1234-1234-1234-123456789012").

[JsonIgnore]
public string Id { get; }

Property Value

string

ImageUrl

A URL pointing to an image associated with the user's profile, such as an avatar or profile picture.

[JsonConverter(typeof(MaybeJsonConverter<Uri>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyOrder(2)]
public Maybe<Uri> ImageUrl { get; }

Property Value

Maybe<Uri>

Name

A unique name for identifying the user within the Vonage platform. Must not be empty if provided.

[JsonConverter(typeof(MaybeJsonConverter<string>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyOrder(0)]
public Maybe<string> Name { get; }

Property Value

Maybe<string>

Properties

Custom properties associated with the user, stored as key-value pairs for application-specific data.

[JsonPropertyOrder(3)]
public UserProperty Properties { get; }

Property Value

UserProperty

Methods

Build()

Initializes a builder for creating an UpdateUserRequest. The user ID is required.

public static IBuilderForId Build()

Returns

IBuilderForId

A builder instance that requires the user ID to be set first.

BuildRequestMessage()

Converts the request to a HttpRequest.

public HttpRequestMessage BuildRequestMessage()

Returns

HttpRequestMessage

The Http request.