Table of Contents

Class Message

Namespace
Vonage.Common
Assembly
Vonage.dll

Represents an SMS message received via webhook or retrieved from the API.

public class Message
Inheritance
Message
Inherited Members

Remarks

This class is used for deserializing webhook payloads and API responses containing message data.

Properties

AccountId

Gets or sets the Vonage account ID that sent or received the message.

[JsonProperty("account-id")]
public string AccountId { get; set; }

Property Value

string

Body

Gets or sets the message content.

[JsonProperty("body")]
public string Body { get; set; }

Property Value

string

ClientRef

Gets or sets the client reference that was set when the message was sent.

[JsonProperty("client-ref")]
public string ClientRef { get; set; }

Property Value

string

DateClosed

Gets or sets the timestamp when message processing completed, in ISO 8601 format.

[JsonProperty("date-closed")]
public string DateClosed { get; set; }

Property Value

string

DateReceived

Gets or sets the timestamp when the message was received, in ISO 8601 format.

[JsonProperty("date-received")]
public string DateReceived { get; set; }

Property Value

string

ErrorCode

Gets or sets the error code if the message failed. See Vonage documentation for error codes.

[JsonProperty("error-code")]
public string ErrorCode { get; set; }

Property Value

string

ErrorCodeLabel

Gets or sets the human-readable description of the error code.

[JsonProperty("error-code-label")]
public string ErrorCodeLabel { get; set; }

Property Value

string

FinalStatus

Gets or sets the final delivery status of the message.

[JsonProperty("final-status")]
public string FinalStatus { get; set; }

Property Value

string

From

Gets or sets the sender's phone number or alphanumeric sender ID.

[JsonProperty("from")]
public string From { get; set; }

Property Value

string

Latency

Gets or sets the time taken to deliver the message, in milliseconds.

[JsonProperty("latency")]
public decimal Latency { get; set; }

Property Value

decimal

MessageId

Gets or sets the unique identifier for the message.

[JsonProperty("message-id")]
public string MessageId { get; set; }

Property Value

string

Network

Gets or sets the network code of the carrier that delivered the message.

[JsonProperty("network")]
public string Network { get; set; }

Property Value

string

Price

Gets or sets the cost of the message in EUR.

[JsonProperty("price")]
public decimal Price { get; set; }

Property Value

decimal

Status

Gets or sets the delivery status of the message (e.g., "delivered", "failed").

[JsonProperty("status")]
public string Status { get; set; }

Property Value

string

To

Gets or sets the recipient's phone number in E.164 format.

[JsonProperty("to")]
public string To { get; set; }

Property Value

string

Type

Gets or sets the message type (e.g., "text", "unicode").

[JsonProperty("type")]
public string Type { get; set; }

Property Value

string