POST
/
api
/
v1
/
accounts
/
{account_id}
/
webhooks
Add a webhook
curl --request POST \
  --url https://app.chatwoot.com/api/v1/accounts/{account_id}/webhooks \
  --header 'Content-Type: application/json' \
  --header 'api_access_token: <api-key>' \
  --data '{
  "url": "https://example.com/webhook",
  "subscriptions": [
    "conversation_created",
    "conversation_status_changed"
  ]
}'
{
  "id": 123,
  "url": "<string>",
  "subscriptions": [
    "conversation_created"
  ],
  "account_id": 123
}

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

account_id
integer
required

The numeric ID of the account

Body

application/json
url
string

The url where the events should be sent

Example:

"https://example.com/webhook"

subscriptions
enum<string>[]

The events you want to subscribe to.

Example:
[
  "conversation_created",
  "conversation_status_changed"
]

Response

Success

id
number

The ID of the webhook

url
string

The url to which the events will be send

subscriptions
enum<string>[]

The list of subscribed events

account_id
number

The id of the account which the webhook object belongs to