Create webhook subscription
curl --request POST \
--url https://api.wellapp.ai/v1/subscriptions/webhooks \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "webhook",
"attributes": {
"target_url": "https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2",
"event": "document.processed",
"headers": {
"secret": "secret"
}
}
}
'import requests
url = "https://api.wellapp.ai/v1/subscriptions/webhooks"
payload = {
"type": "webhook",
"attributes": {
"target_url": "https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2",
"event": "document.processed",
"headers": { "secret": "secret" }
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'webhook',
attributes: {
target_url: 'https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2',
event: 'document.processed',
headers: {secret: 'secret'}
}
})
};
fetch('https://api.wellapp.ai/v1/subscriptions/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.wellapp.ai/v1/subscriptions/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([
'type' => 'webhook',
'attributes' => [
'target_url' => 'https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2',
'event' => 'document.processed',
'headers' => [
'secret' => 'secret'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.wellapp.ai/v1/subscriptions/webhooks"
payload := strings.NewReader("{\n \"type\": \"webhook\",\n \"attributes\": {\n \"target_url\": \"https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2\",\n \"event\": \"document.processed\",\n \"headers\": {\n \"secret\": \"secret\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.wellapp.ai/v1/subscriptions/webhooks")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"webhook\",\n \"attributes\": {\n \"target_url\": \"https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2\",\n \"event\": \"document.processed\",\n \"headers\": {\n \"secret\": \"secret\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/subscriptions/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"webhook\",\n \"attributes\": {\n \"target_url\": \"https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2\",\n \"event\": \"document.processed\",\n \"headers\": {\n \"secret\": \"secret\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "webhook",
"id": "6843888f-1aa5-440b-afac-b0edca649ad2",
"attributes": {
"event": "document.processed",
"target_url": "https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2",
"headers": {
"secret": "secret"
},
"created_at": "2025-09-22T08:57:03.662Z",
"active": true
}
}
}{
"code": "SCHEMA_VALIDATION_ERROR",
"status": 400,
"title": "Validation Error",
"message": "The request is invalid",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
},
"details": [
{
"instancePath": "<string>",
"schemaPath": "<string>",
"keyword": "<string>",
"params": {},
"message": "<string>"
}
]
}{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "You are not authorized to access this resource",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}Webhooks
Create Webhook
POST
/
v1
/
subscriptions
/
webhooks
Create webhook subscription
curl --request POST \
--url https://api.wellapp.ai/v1/subscriptions/webhooks \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "webhook",
"attributes": {
"target_url": "https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2",
"event": "document.processed",
"headers": {
"secret": "secret"
}
}
}
'import requests
url = "https://api.wellapp.ai/v1/subscriptions/webhooks"
payload = {
"type": "webhook",
"attributes": {
"target_url": "https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2",
"event": "document.processed",
"headers": { "secret": "secret" }
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'webhook',
attributes: {
target_url: 'https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2',
event: 'document.processed',
headers: {secret: 'secret'}
}
})
};
fetch('https://api.wellapp.ai/v1/subscriptions/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.wellapp.ai/v1/subscriptions/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([
'type' => 'webhook',
'attributes' => [
'target_url' => 'https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2',
'event' => 'document.processed',
'headers' => [
'secret' => 'secret'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.wellapp.ai/v1/subscriptions/webhooks"
payload := strings.NewReader("{\n \"type\": \"webhook\",\n \"attributes\": {\n \"target_url\": \"https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2\",\n \"event\": \"document.processed\",\n \"headers\": {\n \"secret\": \"secret\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.wellapp.ai/v1/subscriptions/webhooks")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"webhook\",\n \"attributes\": {\n \"target_url\": \"https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2\",\n \"event\": \"document.processed\",\n \"headers\": {\n \"secret\": \"secret\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/subscriptions/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"webhook\",\n \"attributes\": {\n \"target_url\": \"https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2\",\n \"event\": \"document.processed\",\n \"headers\": {\n \"secret\": \"secret\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "webhook",
"id": "6843888f-1aa5-440b-afac-b0edca649ad2",
"attributes": {
"event": "document.processed",
"target_url": "https://webhook.site/d96a94d9-8458-4956-857e-11c85843baa2",
"headers": {
"secret": "secret"
},
"created_at": "2025-09-22T08:57:03.662Z",
"active": true
}
}
}{
"code": "SCHEMA_VALIDATION_ERROR",
"status": 400,
"title": "Validation Error",
"message": "The request is invalid",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
},
"details": [
{
"instancePath": "<string>",
"schemaPath": "<string>",
"keyword": "<string>",
"params": {},
"message": "<string>"
}
]
}{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "You are not authorized to access this resource",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}⌘I