Update a specific Verification Service.

POST /v2/Services/{Sid}

Update a specific Verification Service.

Path parameters

  • Sid string Required

    The Twilio-provided string that uniquely identifies the Service resource to update.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^VA[0-9a-fA-F]{32}$.

application/x-www-form-urlencoded

Body

  • FriendlyName string

    A descriptive string that you create to describe the verification service. It can be up to 32 characters long. This value should not contain PII.

  • CodeLength integer

    The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.

  • LookupEnabled boolean

    Whether to perform a lookup with each verification started and return info about the phone number.

  • SkipSmsToLandlines boolean

    Whether to skip sending SMS verifications to landlines. Requires lookup_enabled.

  • DtmfInputRequired boolean

    Whether to ask the user to press a number before delivering the verify code in a phone call.

  • TtsName string

    The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.

  • Psd2Enabled boolean

    Whether to pass PSD2 transaction parameters when starting a verification.

  • DoNotShareWarningEnabled boolean

    Whether to add a privacy warning at the end of an SMS. Disabled by default and applies only for SMS.

  • CustomCodeEnabled boolean

    Whether to allow sending verifications with a custom code instead of a randomly generated one.

  • Push.IncludeDate boolean

    Optional configuration for the Push factors. If true, include the date in the Challenge's response. Otherwise, the date is omitted from the response. See Challenge resource’s details parameter for more info. Default: false. Deprecated do not use this parameter.

  • Push.ApnCredentialSid string

    Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See Credential Resource

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CR[0-9a-fA-F]{32}$.

  • Push.FcmCredentialSid string

    Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See Credential Resource

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CR[0-9a-fA-F]{32}$.

  • Totp.Issuer string

    Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI.

  • Totp.TimeStep integer

    Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds

  • Totp.CodeLength integer

    Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6

  • Totp.Skew integer

    Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1

  • DefaultTemplateSid string

    The default message template. Will be used for all SMS verifications unless explicitly overriden. SMS channel only.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^HJ[0-9a-fA-F]{32}$.

  • Whatsapp.MsgServiceSid string

    The SID of the Messaging Service to associate with the Verification Service.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^MG[0-9a-fA-F]{32}$.

  • Whatsapp.From string

    The WhatsApp number to use as the sender of the verification messages. This number must be associated with the WhatsApp Message Service.

  • VerifyEventSubscriptionEnabled boolean

    Whether to allow verifications from the service to reach the stream-events sinks if configured

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • sid string | null

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

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^VA[0-9a-fA-F]{32}$.

    • account_sid string | null

      The SID of the Account that created the Service resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • friendly_name string | null

      The name that appears in the body of your verification messages. It can be up to 30 characters long and can include letters, numbers, spaces, dashes, underscores. Phone numbers, special characters or links are NOT allowed. It cannot contain more than 4 (consecutive or non-consecutive) digits. This value should not contain PII.

    • code_length integer

      The length of the verification code to generate.

      Default value is 0.

    • lookup_enabled boolean | null

      Whether to perform a lookup with each verification started and return info about the phone number.

    • psd2_enabled boolean | null

      Whether to pass PSD2 transaction parameters when starting a verification.

    • skip_sms_to_landlines boolean | null

      Whether to skip sending SMS verifications to landlines. Requires lookup_enabled.

    • dtmf_input_required boolean | null

      Whether to ask the user to press a number before delivering the verify code in a phone call.

    • tts_name string | null

      The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.

    • do_not_share_warning_enabled boolean | null

      Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code

    • custom_code_enabled boolean | null

      Whether to allow sending verifications with a custom code instead of a randomly generated one.

    • push

      Configurations for the Push factors (channel) created under this Service.

    • totp

      Configurations for the TOTP factors (channel) created under this Service.

    • default_template_sid string | null

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^HJ[0-9a-fA-F]{32}$.

    • whatsapp
    • verify_event_subscription_enabled boolean | null

      Whether to allow verifications from the service to reach the stream-events sinks if configured

    • date_created string(date-time) | null

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

    • date_updated string(date-time) | null

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

    • url string(uri) | null

      The absolute URL of the resource.

POST /v2/Services/{Sid}
curl \
 --request POST 'https://verify.twilio.com/v2/Services/{Sid}' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'TtsName=name&MailerSid=MDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Totp.Skew=2&CodeLength=4&Psd2Enabled=false&Totp.Issuer=test-issuer&FriendlyName=name&LookupEnabled=false&Totp.TimeStep=30&Totp.CodeLength=3&Push.IncludeDate=false&CustomCodeEnabled=true&DtmfInputRequired=false&DefaultTemplateSid=HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&SkipSmsToLandlines=false&Push.FcmCredentialSid=CRbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb&DoNotShareWarningEnabled=false&VerifyEventSubscriptionEnabled=false'
Request example
{"TtsName"=>"name", "MailerSid"=>"MDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Totp.Skew"=>2, "CodeLength"=>4, "Psd2Enabled"=>false, "Totp.Issuer"=>"test-issuer", "FriendlyName"=>"name", "LookupEnabled"=>false, "Totp.TimeStep"=>30, "Totp.CodeLength"=>3, "Push.IncludeDate"=>false, "CustomCodeEnabled"=>true, "DtmfInputRequired"=>false, "DefaultTemplateSid"=>"HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "SkipSmsToLandlines"=>false, "Push.FcmCredentialSid"=>"CRbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "DoNotShareWarningEnabled"=>false, "VerifyEventSubscriptionEnabled"=>false}
Response examples (200)
{
  "sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "push": {
    "include_date": false,
    "apn_credential_sid": null,
    "fcm_credential_sid": "CRbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
  },
  "totp": {
    "skew": 2,
    "issuer": "test-issuer",
    "time_step": 30,
    "code_length": 3
  },
  "links": {
    "entities": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities",
    "webhooks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",
    "rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits",
    "access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AccessTokens",
    "verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",
    "verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",
    "messaging_configurations": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessagingConfigurations"
  },
  "tts_name": "name",
  "whatsapp": {
    "from": "whatsapp:+1234567890",
    "msg_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  },
  "mailer_sid": "MDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "code_length": 4,
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T20:00:00Z",
  "psd2_enabled": false,
  "friendly_name": "name",
  "lookup_enabled": false,
  "custom_code_enabled": true,
  "dtmf_input_required": false,
  "default_template_sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "skip_sms_to_landlines": false,
  "do_not_share_warning_enabled": false,
  "verify_event_subscription_enabled": false
}