Struct GetInsightsRequest
- Namespace
- Vonage.IdentityInsights.GetInsights
- Assembly
- Vonage.dll
Represents a request to retrieve identity insights.
[Builder(new string[] { })]
public readonly struct GetInsightsRequest : IVonageRequest
- Implements
- Inherited Members
Properties
CurrentCarrier
Includes current carrier information in the response. Returns the carrier that currently owns the phone number.
[OptionalBoolean(false, "WithCurrentCarrier")]
public bool CurrentCarrier { get; }
Property Value
Examples
.WithCurrentCarrier()
Format
Includes phone number format validation in the response. Returns details such as international and national formats.
[OptionalBoolean(false, "WithFormat")]
public bool Format { get; }
Property Value
Examples
.WithFormat()
OriginalCarrier
Includes original carrier information in the response. Returns the carrier that originally owned the phone number.
[OptionalBoolean(false, "WithOriginalCarrier")]
public bool OriginalCarrier { get; }
Property Value
Examples
.WithOriginalCarrier()
PhoneNumber
Sets the phone number to retrieve insights for. The number should follow E.164 format (e.g., +14155552671). You may optionally include a leading +, but do not use 00 at the beginning. The API can extract the phone number even if the input contains alphanumeric characters, spaces, or symbols like brackets.
[MandatoryWithParsing(0, "ParsePhoneNumber")]
public PhoneNumber PhoneNumber { get; }
Property Value
Examples
.WithPhoneNumber("+14155552671")
Purpose
Sets the purpose/reason for the request. Required only for Insights that use the Network Registry. For Production Network Registry, the value must match one of the network profile purposes associated with your application. For Playground Network Registry, the value must be "FraudPreventionAndDetection".
public Maybe<string> Purpose { get; }
Property Value
Examples
.WithPurpose("FraudPreventionAndDetection")
SimSwap
Includes SIM swap detection in the response. Use this to detect if the SIM card has been changed recently.
public Maybe<SimSwapRequest> SimSwap { get; }
Property Value
Examples
.WithSimSwap(new SimSwapRequest(Period: 24))
Methods
Build()
public static IBuilderForPhoneNumber Build()
Returns
BuildRequestMessage()
Converts the request to a HttpRequest.
public HttpRequestMessage BuildRequestMessage()
Returns
- HttpRequestMessage
The Http request.