Update webhook

POST /v2/Services/{ServiceSid}/Webhooks/{Sid}

TODO: Resource-level docs

Path parameters

  • ServiceSid string Required

    The unique SID identifier of the Service.

  • Sid string Required

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

Body

  • EventTypes array[string]

    The array of events that this Webhook is subscribed to. Possible event types: *, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied

  • The string that you assigned to describe the webhook. This value should not contain PII.

  • Status string

    The webhook status. Default value is enabled. One of: enabled or disabled

    Values are enabled or disabled.

  • Version string

    The webhook version. Default value is v2 which includes all the latest fields. Version v1 is legacy and may be removed in the future.

    Values are v1 or v2.

  • The URL associated with this Webhook.

Responses

  • OK

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

      The SID of the Account that created the resource

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

    • date_created string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was created

    • date_updated string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was last updated

    • event_types array[string] | null

      The array of events that this Webhook is subscribed to.

    • friendly_name string | null

      The string that you assigned to describe the webhook

    • service_sid string | null

      Service Sid.

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

    • sid string | null

      The unique string that identifies the resource

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

    • status string | null

      The webhook status

      Values are enabled or disabled.

    • url string(uri) | null

      The absolute URL of the Webhook resource

    • version string | null

      The webhook version

      Values are v1 or v2.

    • webhook_method string | null

      The method used when calling the webhook's URL.

      Values are GET or POST.

    • webhook_url string(uri) | null

      The URL associated with this Webhook.

POST /v2/Services/{ServiceSid}/Webhooks/{Sid}
curl \
 -X POST https://verify.twilio.com/v2/Services/{ServiceSid}/Webhooks/{Sid} \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'EventTypes=string&FriendlyName=string&Status=enabled&Version=v1&WebhookUrl=string'
Request example
{
  "EventTypes": [
    "string"
  ],
  "FriendlyName": "string",
  "Status": "enabled",
  "Version": "v1",
  "WebhookUrl": "string"
}
Request examples
{
  "EventTypes": [
    "string"
  ],
  "FriendlyName": "string",
  "Status": "enabled",
  "Version": "v1",
  "WebhookUrl": "string"
}
Response examples (200)
{
  "account_sid": "string",
  "date_created": "2023-05-04T09:42:00+00:00",
  "date_updated": "2023-05-04T09:42:00+00:00",
  "event_types": [
    "string"
  ],
  "friendly_name": "string",
  "service_sid": "string",
  "sid": "string",
  "status": "enabled",
  "url": "https://example.com",
  "version": "v1",
  "webhook_method": "GET",
  "webhook_url": "https://example.com"
}
Response examples (200)
{
  "account_sid": "string",
  "date_created": "2024-05-04T09:42:00+00:00",
  "date_updated": "2024-05-04T09:42:00+00:00",
  "event_types": [
    "string"
  ],
  "friendly_name": "string",
  "service_sid": "string",
  "sid": "string",
  "status": "enabled",
  "url": "https://example.com",
  "version": "v1",
  "webhook_method": "GET",
  "webhook_url": "https://example.com"
}