VerifyV2Verification

Create a new Verification using a Service

Changed on

Create a new Verification using a Service

post/v2/Services/{ServiceSid}/Verifications

Request

  • Base URL
    https://verify.twilio.com
  • URL
    https://verify.twilio.com/v2/Services/{ServiceSid}/Verifications
  • Auth
    • HTTP basic
    • or HTTP bearer

Path parameters

ServiceSidstring required

The SID of the verification Service to create the resource under.

Request body application/x-www-form-urlencoded

Tostring required

The phone number or email to verify. Phone numbers must be in E.164 format.

Channelstring required

The verification method to use. One of: email, sms, whatsapp, call, sna or auto.

CustomFriendlyNamestring

A custom user defined friendly name that overwrites the existing one in the verification message

CustomMessagestring

The text of a custom message to use for the verification [DEPRECATED].

SendDigitsstring

The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of sendDigits.

Localestring

Locale will automatically resolve based on phone number country code for SMS, WhatsApp, and call channel verifications. It will fallback to English or the template’s default translation if the selected translation is not available. This parameter will override the automatic locale resolution. See supported languages and more information here.

CustomCodestring

A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive.

Amountstring

The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.

Payeestring

The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.

RateLimitsunknown
ChannelConfigurationunknown
AppHashstring

Your App Hash to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: <#> Your AppName verification code is: 1234 He42w354ol9.

TemplateSidstring

The message template. If provided, will override the default template for the Service. SMS and Voice channels only. If the Templates parameter is also provided, Templates takes precedence over this parameter.

TemplateCustomSubstitutionsstring

A stringified JSON object in which the keys are the template's special variables and the values are the variables substitutions.

Templatesstring

A stringified JSON array of template entries, ordered by preference. Each entry is an object with the following fields: sid (string, required, matching ^HJ[0-9a-fA-F]{32}$) — the SID of the message template to apply; and substitutions (object, optional) — a key-value map in which the keys are the template's special variables and the values are their substitution values. The array may contain up to 10 entries. If provided, Templates takes precedence over TemplateSid and TemplateCustomSubstitutions.

DeviceIpstring

Strongly encouraged if using the auto channel. The IP address of the client's device. If provided, it has to be a valid IPv4 or IPv6 address.

EnableSnaClientTokenboolean

An optional Boolean value to indicate the requirement of sna client token in the SNA URL invocation response for added security. This token must match in the Verification Check request to confirm phone number verification.

RiskCheck'enable' | 'disable'

Risk_check overrides Fraud Prevention measures like Fraud Guard, Geo Permissions etc per verification attempt basis, allowing Verify to block traffic considered fraudulent if enabled or bypass active protections if disabled. Can be: enable(default) or disable. For SMS channel only.

Tagsstring

A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The tags will also be included as part of the verification and message status event type payloads. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length. This value should not contain PII.

Response

Created

sidstring nullable

The unique string that we created to identify the Verification resource.

service_sidstring nullable

The SID of the Service the resource is associated with.

account_sidstring nullable

The SID of the Account that created the Verification resource.

tostring nullable

The phone number or email being verified. Phone numbers must be in E.164 format.

channel'sms' | 'call' | 'email' | 'whatsapp' | 'sna'

The verification method used. One of: email, sms, whatsapp, call, sna, or rcs.

statusstring nullable

The status of the verification. Can be: pending, approved, canceled, max_attempts_reached, deleted, failed or expired.

validboolean nullable

Use "status" instead. Legacy property indicating whether the verification was successful.

lookupunknown
amountstring nullable

The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.

payeestring nullable

The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.

date_createdstring date-time nullable

The date and time in GMT when the resource was created specified in RFC 2822 format.

date_updatedstring date-time nullable

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

snaunknown
urlstring uri nullable

The absolute URL of the Verification resource.

Changes