# Verification Request Event

This callback event is a POST request to the specified verification callback URL and is triggered when a new verification request is made from the SDK client or the Verification Request API. This callback event is only triggered when a verification callback URL is specified in your dashboard.

Endpoint: POST VerificationRequestEvent
Version: 2.0.1
Security: , 

## Request fields (application/json):

  - `id` (string, required)
    The ID of the verification request.
    Example: "1234567890"

  - `event` (string, required)
    The type of the event.
    Enum: "VerificationRequestEvent", "VerificationResultEvent", "VerificationSmsDeliveredEvent"

  - `method` (string, required)
    The type of the verification.
    Enum: "sms", "flashcall", "callout", "whatsapp"

  - `identity` (object, required)
    Specifies the type of endpoint that will be verified and the particular endpoint. number is currently the only supported endpoint type.

  - `identity.type` (string, required)
    Currently only number type is supported.
    Enum: "number"

  - `identity.endpoint` (string, required)
    For type number use an [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537)-compatible phone number.
    Example: "+11235551234"

  - `reference` (string)
    Used to pass your own reference in the request for tracking purposes. Must be a unique value for each started verification request. The value must be encodable in the URL path segment. This value is passed to all events and returned from the status and report endpoints. The reference can be used to check the [status of verifications](https://developers.sinch.com/docs/verification/api-reference/verification/verification-status/verificationstatusbyreference), like with ID or identity.

  - `custom` (string)
    Can be used to pass custom data in the request. Will be passed to all events. Max length 4096 characters, can be arbitrary text data.

  - `price` (object)

  - `price.currencyId` (string)
    ISO 4217 currency code
    Example: "USD"

  - `price.amount` (number)
    Example: 0.0127

  - `acceptLanguage` (array)
    Allows you to set or override if provided in the API request, the SMS verification content language. Only used with the SMS verification method. The content language specified in the API request or in the callback can be overridden by carrier provider specific templates, due to compliance and legal requirements, such as [US shortcode requirements (pdf)](https://community.sinch.com/t5/SMS/Sinch-US-Short-Code-Onboarding-Overview/ta-p/7085).
    Example: ["es-ES"]

## Response 200 fields (application/json):

  - `body` (SMS Request Event Response (object) or Flash Call Request Event Response (object) or Phone Call Request Event Response (object) or WhatsApp Request Event Response (object)) — one of:
    - SMS Request Event Response:
      - `action` (string, required)
        Determines whether the verification can be executed.
        Enum: "allow", "deny"
      - `sms` (object)
      - `sms.code` (string)
        The SMS OTP code that should be used. By default, the Sinch dashboard will automatically generate OTP codes for SMS verification. If you want to set your own OTP, you can specify it in the response to the Verification Request Event.
        Example: "12345"
      - `sms.codeType` (string)
        Selects type of code which will be sent to customer
        Enum: "Numeric", "Alpha", "Alphanumeric"
      - `sms.expiry` (string)
        The expiration time for a verification process is represented in the format HH:MM:SS.
      - `sms.acceptLanguage` (array)
        The SMS verification content language. Set in the verification request.
        Example: ["es-ES"]
    - Flash Call Request Event Response:
      - `action` (string, required)
        Determines whether the verification can be executed.
        Enum: same as `action` in "SMS Request Event Response" (2 values)
      - `flashCall` (object)
      - `flashCall.cli` (string)
        The phone number that will be displayed to the user when the flash call is received on the user's phone. By default, the Sinch dashboard will randomly select the CLI that will be displayed during a phone call from a pool of numbers. If you want to set your own CLI, you can specify it in the response to the Verification Request Event.
      - `flashCall.dialTimeout` (integer)
        The amount of time that a phone will ring.
      - `flashCall.interceptionTimeout` (integer)
        The maximum time that a phone call verification will be active and can be completed. If the phone number hasn't been verified successfully during this time, then the verification request will fail. By default, the Sinch dashboard will automatically optimize dial time out during a phone call.
    - Phone Call Request Event Response:
      - `action` (string, required)
        Determines whether the verification can be executed.
        Enum: same as `action` in "SMS Request Event Response" (2 values)
      - `callout` (object)
      - `callout.code` (string)
        The Phone Call OTP code that should be entered by the user. Sinch servers automatically generate OTP codes for Phone Call verification. If you want to set your own code, you can specify it in the response to the Verification Request Event.
      - `callout.speech` (object)
        Text-To-Speech engine settings
      - `callout.speech.locale` (string)
        A language-region identifier according to [IANA](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). Only a subset of those identifiers is accepted.
    - WhatsApp Request Event Response:
      - `action` (string, required)
        Determines whether the verification can be executed.
        Enum: same as `action` in "SMS Request Event Response" (2 values)
      - `whatsapp` (object)
      - `whatsapp.codeType` (string)
        Selects type of code which will be sent to customer
        Enum: same as `sms.codeType` in "SMS Request Event Response" (3 values)
      - `whatsapp.acceptLanguage` (array)
        The WhatsApp verification content language. Set in the verification request.
        Example: ["es-ES"]


