Register a webhook endpoint
curl --request POST \
--url https://api.watx.in/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/hooks/watx",
"events": [
"message.received",
"message.status_updated"
]
}
'import requests
url = "https://api.watx.in/v1/webhooks"
payload = {
"url": "https://example.com/hooks/watx",
"events": ["message.received", "message.status_updated"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/hooks/watx',
events: ['message.received', 'message.status_updated']
})
};
fetch('https://api.watx.in/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.watx.in/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/hooks/watx',
'events' => [
'message.received',
'message.status_updated'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.watx.in/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://example.com/hooks/watx\",\n \"events\": [\n \"message.received\",\n \"message.status_updated\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.watx.in/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/hooks/watx\",\n \"events\": [\n \"message.received\",\n \"message.status_updated\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.watx.in/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/hooks/watx\",\n \"events\": [\n \"message.received\",\n \"message.status_updated\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "5b6c7d8e-9f01-4a2b-8c3d-4e5f6a7b8c9d",
"url": "https://example.com/hooks/watx",
"events": [
"message.received",
"message.status_updated"
],
"is_active": true,
"last_delivery_at": null,
"failure_count": 0,
"created_at": "2026-09-15T06:41:02.000Z",
"provider": "api",
"secret": "whsec_Zm9vYmFyYmF6cXV4MTIzNDU2Nzg5MGFiY2RlZmdoaWo"
}
}{
"error": {
"code": "bad_request",
"message": "'events' must be a non-empty array of known event names"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key"
}
}{
"error": {
"code": "forbidden",
"message": "This API key is missing the 'messages:send' scope"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded for this API key"
}
}Webhooks
Register a webhook endpoint
Registers an endpoint and subscribes it to one or more events. The url
must be https:// and must resolve to a public address.
The response carries secret once. Store it: Watx keeps only an
encrypted copy and no read path returns it again. Use it to verify the
X-Watx-Signature header on every delivery.
Requires the webhooks:manage scope.
POST
/
webhooks
Register a webhook endpoint
curl --request POST \
--url https://api.watx.in/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/hooks/watx",
"events": [
"message.received",
"message.status_updated"
]
}
'import requests
url = "https://api.watx.in/v1/webhooks"
payload = {
"url": "https://example.com/hooks/watx",
"events": ["message.received", "message.status_updated"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/hooks/watx',
events: ['message.received', 'message.status_updated']
})
};
fetch('https://api.watx.in/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.watx.in/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/hooks/watx',
'events' => [
'message.received',
'message.status_updated'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.watx.in/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://example.com/hooks/watx\",\n \"events\": [\n \"message.received\",\n \"message.status_updated\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.watx.in/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/hooks/watx\",\n \"events\": [\n \"message.received\",\n \"message.status_updated\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.watx.in/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/hooks/watx\",\n \"events\": [\n \"message.received\",\n \"message.status_updated\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "5b6c7d8e-9f01-4a2b-8c3d-4e5f6a7b8c9d",
"url": "https://example.com/hooks/watx",
"events": [
"message.received",
"message.status_updated"
],
"is_active": true,
"last_delivery_at": null,
"failure_count": 0,
"created_at": "2026-09-15T06:41:02.000Z",
"provider": "api",
"secret": "whsec_Zm9vYmFyYmF6cXV4MTIzNDU2Nzg5MGFiY2RlZmdoaWo"
}
}{
"error": {
"code": "bad_request",
"message": "'events' must be a non-empty array of known event names"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key"
}
}{
"error": {
"code": "forbidden",
"message": "This API key is missing the 'messages:send' scope"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded for this API key"
}
}Authorizations
Your workspace API key, created in Settings → API keys, sent as
Authorization: Bearer <key>. New keys start with watx_live_; keys
issued before the rename start with converse360_live_ and still work.
Body
application/json
Response
The endpoint, with its signing secret.
Show child attributes
Show child attributes