Struct CreateReportRequest
- Namespace
- Vonage.Reports.CreateReport
- Assembly
- Vonage.dll
Represents a request to create an asynchronous report. The report is generated in the background; use the returned request ID with GetReportRequest to poll for completion.
[Builder(new string[] { })]
public readonly struct CreateReportRequest : IVonageRequest
- Implements
- Inherited Members
Properties
AccountId
Sets the account ID (API key) to generate the report for.
[Mandatory(1)]
public string AccountId { get; }
Property Value
Examples
.WithAccountId("12aa3456")
AccountRef
Sets the account reference filter. Optional for SMS.
public Maybe<string> AccountRef { get; }
Property Value
Examples
.WithAccountRef("customer1234")
CallId
Sets the unique call identifier filter. Optional for AMD, ASR, VOICE-CALL, VOICE-FAILED, and WEBSOCKET-CALL.
public Maybe<string> CallId { get; }
Property Value
Examples
.WithCallId("dfc0c915-1")
CallbackUrl
Sets the webhook URL that receives a notification when the report is ready.
public Maybe<Uri> CallbackUrl { get; }
Property Value
Examples
.WithCallbackUrl(new Uri("https://example.com/webhook"))
Channel
Sets the verification channel filter. Optional for VERIFY-V2.
public Maybe<RecordChannel> Channel { get; }
Property Value
Examples
.WithChannel(RecordChannel.SilentAuth)
ClientRef
Sets the optional custom reference value filter. Optional for SMS.
public Maybe<string> ClientRef { get; }
Property Value
Examples
.WithClientRef("my-personal-reference")
ConversationId
Sets the conversation ID filter. Optional for CONVERSATION-EVENT, CONVERSATION-MESSAGE, and IN-APP-VOICE.
public Maybe<string> ConversationId { get; }
Property Value
Examples
.WithConversationId("CON-aaaaaaaa-bbbb-cccc-dddd-0123456789ab")
CorrelationId
Sets the correlation ID filter for Network API events. Optional for NETWORK-API-EVENT.
public Maybe<string> CorrelationId { get; }
Property Value
Examples
.WithCorrelationId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")
Country
Sets the ISO two-letter country code filter.
public Maybe<string> Country { get; }
Property Value
Examples
.WithCountry("PL")
DateEnd
Sets the end of the reporting period (exclusive). Defaults to the current time if not provided.
public Maybe<DateTimeOffset> DateEnd { get; }
Property Value
Examples
.WithDateEnd(DateTimeOffset.Parse("2024-02-07T14:22:08+00:00"))
DateStart
Sets the start of the reporting period (inclusive). Defaults to seven days ago if not provided.
public Maybe<DateTimeOffset> DateStart { get; }
Property Value
Examples
.WithDateStart(DateTimeOffset.Parse("2024-02-02T13:50:00+00:00"))
Direction
Sets the direction filter. Required for SMS and MESSAGES; optional for VOICE-CALL, VOICE-FAILED, and ASR.
public Maybe<RecordDirection> Direction { get; }
Property Value
Examples
.WithDirection(RecordDirection.Outbound)
From
Sets the sender ID or number filter.
public Maybe<string> From { get; }
Property Value
Examples
.WithFrom("447700900001")
IncludeMessage
Includes the message content in the report. Optional for SMS and MESSAGES.
public Maybe<bool> IncludeMessage { get; }
Property Value
Examples
.WithIncludeMessage(true)
IncludeSubaccounts
Includes data from sub-accounts in the report.
public Maybe<bool> IncludeSubaccounts { get; }
Property Value
Examples
.WithIncludeSubaccounts(true)
LegId
Sets the unique leg identifier filter. Optional for IN-APP-VOICE.
public Maybe<string> LegId { get; }
Property Value
Examples
.WithLegId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")
Locale
Sets the language/locale filter. Optional for VERIFY-API and VERIFY-V2.
public Maybe<string> Locale { get; }
Property Value
Examples
.WithLocale("en-gb")
MeetingId
Sets the meeting ID filter. Optional for VIDEO-API.
public Maybe<string> MeetingId { get; }
Property Value
Examples
.WithMeetingId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")
Network
Sets the mobile network code filter.
public Maybe<string> Network { get; }
Property Value
Examples
.WithNetwork("12345")
Number
Sets the phone number for lookup. Optional for NUMBER-INSIGHT and NUMBER-INSIGHT-V2.
public Maybe<string> Number { get; }
Property Value
Examples
.WithNumber("447700900000")
NumberType
Sets the number type filter. Optional for VERIFY-API.
public Maybe<string> NumberType { get; }
Property Value
Examples
.WithNumberType("mobile")
ParentRequestId
Sets the parent request ID filter. Optional for VERIFY-V2.
public Maybe<string> ParentRequestId { get; }
Property Value
Examples
.WithParentRequestId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")
Product
Sets the product to generate the report for.
[Mandatory(0)]
public ReportProduct Product { get; }
Property Value
Examples
.WithProduct(ReportProduct.Sms)
ProductName
Sets the product name filter for Network API events. Optional for NETWORK-API-EVENT.
public Maybe<string> ProductName { get; }
Property Value
Examples
.WithProductName("simswap")
ProductPath
Sets the API path filter for Network API events. Optional for NETWORK-API-EVENT.
public Maybe<string> ProductPath { get; }
Property Value
Examples
.WithProductPath("/camara/sim-swap/v040/check")
Provider
Sets the messaging provider filter. Optional for MESSAGES.
public Maybe<MessagesProvider> Provider { get; }
Property Value
Examples
.WithProvider(MessagesProvider.WhatsApp)
RequestSessionId
Sets the request session ID filter for Network API events. Optional for NETWORK-API-EVENT.
public Maybe<string> RequestSessionId { get; }
Property Value
Examples
.WithRequestSessionId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")
RequestType
Sets the request type filter. Optional for NUMBER-INSIGHT-V2 and NETWORK-API-EVENT.
public Maybe<string> RequestType { get; }
Property Value
Examples
.WithRequestType("fraud-score")
Risk
Sets the risk assessment level filter. Optional for NUMBER-INSIGHT-V2.
public Maybe<string> Risk { get; }
Property Value
Examples
.WithRisk("high")
SessionId
Sets the session ID filter. Optional for VIDEO-API.
public Maybe<string> SessionId { get; }
Property Value
Examples
.WithSessionId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")
ShowConcatenated
Includes the concatenated field in the report. Optional for SMS with direction outbound.
public Maybe<bool> ShowConcatenated { get; }
Property Value
Examples
.WithShowConcatenated(false)
Status
Sets the status filter.
public Maybe<string> Status { get; }
Property Value
Examples
.WithStatus("delivered")
Swapped
Filters by whether the number has been ported or swapped. Optional for NUMBER-INSIGHT-V2.
public Maybe<bool> Swapped { get; }
Property Value
Examples
.WithSwapped(true)
To
Sets the recipient phone number filter.
public Maybe<string> To { get; }
Property Value
Examples
.WithTo("447700900000")
Methods
Build()
public static IBuilderForProduct Build()
Returns
BuildRequestMessage()
Converts the request to a HttpRequest.
public HttpRequestMessage BuildRequestMessage()
Returns
- HttpRequestMessage
The Http request.