Struct CreateUserRequest
- Namespace
- Vonage.Users.CreateUser
- Assembly
- Vonage.dll
Represents a request to create a new user in the Vonage platform with optional profile information and communication channels.
public readonly struct CreateUserRequest : IVonageRequest
- Implements
- Inherited Members
Properties
Channels
The communication channels configured for the user, including PSTN, SIP, VBC, WebSocket, SMS, MMS, WhatsApp, Viber, and Messenger.
[JsonPropertyOrder(4)]
public UserChannels Channels { get; }
Property Value
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
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
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
Properties
Custom properties associated with the user, stored as key-value pairs for application-specific data.
[JsonPropertyOrder(3)]
public UserProperty Properties { get; }
Property Value
Methods
Build()
Initializes a builder for creating a CreateUserRequest with optional parameters.
public static IBuilderForOptional Build()
Returns
- IBuilderForOptional
A builder instance for configuring the request.
BuildRequestMessage()
Converts the request to a HttpRequest.
public HttpRequestMessage BuildRequestMessage()
Returns
- HttpRequestMessage
The Http request.