Channel Developers

thumbnail
Category

Webhook

Webhook

What is Webhook

A webhook is a feature that notifies your server through a REST API when events happen on Channel. This section includes the following guides: - How to create a webhook in Channel - Event types in a webhook - Quick-reply for a webhook For an Open API, please take a look at this section
What is Webhook

Getting started

Before you start You will need a channel account in order to create a Webhook. If you don't have one, please visit Channel and create a new account now :) Create a webhook Before using this feature, first you need to create a model. A channel can have multiple webhook models. You can find its configuration under "Settings > Webhook". Once you are on Webhook, click on Create new webhook and fill out boxes below. - Set a name (e.g. Welcome Webhook) - The URL path for your webhook - Options for ala
Getting started

Webhook events

Channel currently provides only one event, message creation. We plan to add more events later on. Event structure When a particular event occurs, we request a POST call to your registered URL with a body with JSON format data. An event JSON format is the following: - event: describes an action of the event such as "upsert", "update" and "push". - type: a model that is a target of the event. For now, “Message”, “UserChat” and "User". - entity: an actual model data for the type. - refers: includes
Webhook events

Quick-reply for a Webhook

Channel provides Quick-reply option for a Webhook. You can easily reply a message with your response for our Webhook event request. Response Header If you want to reply a message with your response, you should add a custom HTTP response header "x-quick-reply" : "true" Else, we will recognize your response as not a Quick-reply message. You can set bot-name for your Quick-reply message with a custom HTTP response header "x-bot-name" : "YOUR_BOT_NAME" Else, bot name will be your Channel-name. Respo
Quick-reply for a Webhook