# Create channel webhook **POST /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks** Webhooks for specific channels ## Servers - https://chat.twilio.com: https://chat.twilio.com () ## Authentication methods - Account sid auth token ## Parameters ### Path parameters - **ServiceSid** (string) The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to create the Webhook resource under. - **ChannelSid** (string) The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Channel Webhook resource belongs to. This value can be the Channel resource's `sid` or `unique_name`. ### Body: application/x-www-form-urlencoded (object) - **Type** (string) The type of webhook. Can be: `webhook`, `studio`, or `trigger`. - **Configuration.Url** (string) The URL of the webhook to call using the `configuration.method`. - **Configuration.Method** (string) - **Configuration.Filters** (array[string]) 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](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). - **Configuration.Triggers** (array[string]) A 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.FlowSid** (string) The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`. - **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. ## Responses ### 201 Created #### Headers - **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 #### Body: application/json (object) - **sid** (string | null) The unique string that we created to identify the Channel Webhook resource. - **account_sid** (string | null) The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Channel Webhook resource. - **service_sid** (string | null) The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) the Channel Webhook resource is associated with. - **channel_sid** (string | null) The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource belongs to. - **type** (string | null) The type of webhook. Can be: `webhook`, `studio`, or `trigger`. - **url** (string(uri) | null) The absolute URL of the Channel Webhook resource. - **configuration** () The JSON string that describes how the channel webhook is configured. The configuration object contains the `url`, `method`, `filters`, and `retry_count` values that are configured by the create and update actions. - **date_created** (string(date-time) | null) The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - **date_updated** (string(date-time) | null) The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. [Powered by Bump.sh](https://bump.sh)