Twilio.Chat.V2.Service.Channel.WebhookService (twilio_elixir v0.1.1)

Copy Markdown View Source

Webhooks for specific channels

Operations: list, create, fetch, update, delete

Summary

Functions

Operation: CreateChannelWebhook | Tags: ChatV2Webhook

Operation: DeleteChannelWebhook | Tags: ChatV2Webhook

Operation: FetchChannelWebhook | Tags: ChatV2Webhook

Operation: ListChannelWebhook | Tags: ChatV2Webhook

Operation: UpdateChannelWebhook | Tags: ChatV2Webhook

Functions

create(client, service_sid, channel_sid, params \\ %{}, opts \\ [])

@spec create(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V2.Service.Channel.Webhook.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Operation: CreateChannelWebhook | Tags: ChatV2Webhook

Required Parameters

ParameterTypeDescription
TypestringValues: webhook, trigger, studio

Optional Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Configuration.Filters | array | The events that cause us to call the Channel Webhook. Used when type is webhook. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see Webhook Event Triggers. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

Configuration.FlowSidstringThe SID of the Studio Flow to call when an event in configuration.filters occurs. Used only when type is studio.
Configuration.MethodstringValues: GET, POST

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Configuration.RetryCount | integer | The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

Configuration.TriggersarrayA string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when type = trigger.
Configuration.UrlstringThe URL of the webhook to call using the configuration.method.

delete(client, service_sid, channel_sid, sid, opts \\ [])

@spec delete(Twilio.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}

Operation: DeleteChannelWebhook | Tags: ChatV2Webhook

fetch(client, service_sid, channel_sid, sid, opts \\ [])

@spec fetch(Twilio.Client.t(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V2.Service.Channel.Webhook.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Operation: FetchChannelWebhook | Tags: ChatV2Webhook

list(client, service_sid, channel_sid, params \\ %{}, opts \\ [])

@spec list(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Operation: ListChannelWebhook | Tags: ChatV2Webhook

stream(client, service_sid, channel_sid, params \\ %{}, opts \\ [])

@spec stream(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  Enumerable.t()

Stream: (lazy auto-pagination).

update(client, service_sid, channel_sid, sid, params \\ %{}, opts \\ [])

@spec update(Twilio.Client.t(), String.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V2.Service.Channel.Webhook.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Operation: UpdateChannelWebhook | Tags: ChatV2Webhook

Optional Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Configuration.Filters | array | The events that cause us to call the Channel Webhook. Used when type is webhook. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see Webhook Event Triggers. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

Configuration.FlowSidstringThe SID of the Studio Flow to call when an event in configuration.filters occurs. Used only when type = studio.
Configuration.MethodstringValues: GET, POST

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| Configuration.RetryCount | integer | The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. |

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

Configuration.TriggersarrayA string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when type = trigger.
Configuration.UrlstringThe URL of the webhook to call using the configuration.method.