Class: WebhookInstance

Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookInstance(version, payload, serviceSid, channelSid, sid)

new WebhookInstance(version, payload, serviceSid, channelSid, sid)

Initialize the WebhookContext
Parameters:
Name Type Description
version V2 Version of the resource
payload WebhookPayload The instance payload
serviceSid sid The service_sid
channelSid sid The channel_sid
sid sid The sid
Properties:
Name Type Description
sid string The sid
accountSid string The account_sid
serviceSid string The service_sid
channelSid string The channel_sid
type string The type
url string The url
configuration object The configuration
dateCreated Date The date_created
dateUpdated Date The date_updated
Source:

Methods

fetch(callbackopt) → {Promise}

fetch a WebhookInstance
Parameters:
Name Type Attributes Description
callback function <optional>
Callback to handle processed record
Source:
Returns:
Resolves to processed WebhookInstance
Type
Promise

remove(callbackopt) → {Promise}

remove a WebhookInstance
Parameters:
Name Type Attributes Description
callback function <optional>
Callback to handle processed record
Source:
Returns:
Resolves to processed WebhookInstance
Type
Promise

toJSON()

Provide a user-friendly representation
Source:
Returns:
Object

update(optsopt, callbackopt) → {Promise}

update a WebhookInstance
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
configuration.url string <optional>
The configuration.url
configuration.method webhook.method <optional>
The configuration.method
configuration.filters string | list <optional>
The configuration.filters
configuration.triggers string | list <optional>
The configuration.triggers
configuration.flowSid string <optional>
The configuration.flow_sid
configuration.retryCount number <optional>
The configuration.retry_count
callback function <optional>
Callback to handle processed record
Source:
Returns:
Resolves to processed WebhookInstance
Type
Promise