Table of Contents

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

string

Examples

.WithAccountId("12aa3456")

AccountRef

Sets the account reference filter. Optional for SMS.

public Maybe<string> AccountRef { get; }

Property Value

Maybe<string>

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

Maybe<string>

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

Maybe<Uri>

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

Maybe<RecordChannel>

Examples

.WithChannel(RecordChannel.SilentAuth)

ClientRef

Sets the optional custom reference value filter. Optional for SMS.

public Maybe<string> ClientRef { get; }

Property Value

Maybe<string>

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

Maybe<string>

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

Maybe<string>

Examples

.WithCorrelationId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")

Country

Sets the ISO two-letter country code filter.

public Maybe<string> Country { get; }

Property Value

Maybe<string>

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

Maybe<DateTimeOffset>

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

Maybe<DateTimeOffset>

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

Maybe<RecordDirection>

Examples

.WithDirection(RecordDirection.Outbound)

From

Sets the sender ID or number filter.

public Maybe<string> From { get; }

Property Value

Maybe<string>

Examples

.WithFrom("447700900001")

IncludeMessage

Includes the message content in the report. Optional for SMS and MESSAGES.

public Maybe<bool> IncludeMessage { get; }

Property Value

Maybe<bool>

Examples

.WithIncludeMessage(true)

IncludeSubaccounts

Includes data from sub-accounts in the report.

public Maybe<bool> IncludeSubaccounts { get; }

Property Value

Maybe<bool>

Examples

.WithIncludeSubaccounts(true)

LegId

Sets the unique leg identifier filter. Optional for IN-APP-VOICE.

public Maybe<string> LegId { get; }

Property Value

Maybe<string>

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

Maybe<string>

Examples

.WithLocale("en-gb")

MeetingId

Sets the meeting ID filter. Optional for VIDEO-API.

public Maybe<string> MeetingId { get; }

Property Value

Maybe<string>

Examples

.WithMeetingId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")

Network

Sets the mobile network code filter.

public Maybe<string> Network { get; }

Property Value

Maybe<string>

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

Maybe<string>

Examples

.WithNumber("447700900000")

NumberType

Sets the number type filter. Optional for VERIFY-API.

public Maybe<string> NumberType { get; }

Property Value

Maybe<string>

Examples

.WithNumberType("mobile")

ParentRequestId

Sets the parent request ID filter. Optional for VERIFY-V2.

public Maybe<string> ParentRequestId { get; }

Property Value

Maybe<string>

Examples

.WithParentRequestId("aaaaaaaa-bbbb-cccc-dddd-0123456789ab")

Product

Sets the product to generate the report for.

[Mandatory(0)]
public ReportProduct Product { get; }

Property Value

ReportProduct

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

Maybe<string>

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

Maybe<string>

Examples

.WithProductPath("/camara/sim-swap/v040/check")

Provider

Sets the messaging provider filter. Optional for MESSAGES.

public Maybe<MessagesProvider> Provider { get; }

Property Value

Maybe<MessagesProvider>

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

Maybe<string>

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

Maybe<string>

Examples

.WithRequestType("fraud-score")

Risk

Sets the risk assessment level filter. Optional for NUMBER-INSIGHT-V2.

public Maybe<string> Risk { get; }

Property Value

Maybe<string>

Examples

.WithRisk("high")

SessionId

Sets the session ID filter. Optional for VIDEO-API.

public Maybe<string> SessionId { get; }

Property Value

Maybe<string>

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

Maybe<bool>

Examples

.WithShowConcatenated(false)

Status

Sets the status filter.

public Maybe<string> Status { get; }

Property Value

Maybe<string>

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

Maybe<bool>

Examples

.WithSwapped(true)

To

Sets the recipient phone number filter.

public Maybe<string> To { get; }

Property Value

Maybe<string>

Examples

.WithTo("447700900000")

Methods

Build()

public static IBuilderForProduct Build()

Returns

IBuilderForProduct

BuildRequestMessage()

Converts the request to a HttpRequest.

public HttpRequestMessage BuildRequestMessage()

Returns

HttpRequestMessage

The Http request.