Handle incoming webhook
curl --request POST \
--url https://api.superglue.ai/v1/hooks/{toolId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "evt_1234",
"type": "customer.created",
"data": {
"object": {
"id": "cus_abc123",
"email": "user@example.com"
}
}
}
'import requests
url = "https://api.superglue.ai/v1/hooks/{toolId}"
payload = {
"id": "evt_1234",
"type": "customer.created",
"data": { "object": {
"id": "cus_abc123",
"email": "user@example.com"
} }
}
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({
id: 'evt_1234',
type: 'customer.created',
data: {object: {id: 'cus_abc123', email: 'user@example.com'}}
})
};
fetch('https://api.superglue.ai/v1/hooks/{toolId}', 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.superglue.ai/v1/hooks/{toolId}",
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([
'id' => 'evt_1234',
'type' => 'customer.created',
'data' => [
'object' => [
'id' => 'cus_abc123',
'email' => 'user@example.com'
]
]
]),
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.superglue.ai/v1/hooks/{toolId}"
payload := strings.NewReader("{\n \"id\": \"evt_1234\",\n \"type\": \"customer.created\",\n \"data\": {\n \"object\": {\n \"id\": \"cus_abc123\",\n \"email\": \"user@example.com\"\n }\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.superglue.ai/v1/hooks/{toolId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"evt_1234\",\n \"type\": \"customer.created\",\n \"data\": {\n \"object\": {\n \"id\": \"cus_abc123\",\n \"email\": \"user@example.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superglue.ai/v1/hooks/{toolId}")
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 \"id\": \"evt_1234\",\n \"type\": \"customer.created\",\n \"data\": {\n \"object\": {\n \"id\": \"cus_abc123\",\n \"email\": \"user@example.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"runId": "7f3e9c1a-2b4d-4e8f-9a3b-1c5d7e9f2a4b",
"status": "accepted",
"toolId": "handle-stripe-webhook"
}{
"error": {
"message": "Invalid input parameters"
}
}{
"error": {
"message": "Invalid input parameters"
}
}Webhooks
Handle incoming webhook
Enterprise feature.
Trigger a tool execution from an external webhook (Stripe, GitHub, etc.).
The request body becomes the tool’s input payload. Returns 202 Accepted immediately and executes the tool asynchronously.
Also handles webhook challenge/verification patterns inline:
- monday.com, Slack: POST body
{ challenge: "..." }→ echoes challenge as JSON - Generic: POST body
{ verification_token: "...", type: "verification" }→ echoes token as JSON
POST
/
hooks
/
{toolId}
Handle incoming webhook
curl --request POST \
--url https://api.superglue.ai/v1/hooks/{toolId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "evt_1234",
"type": "customer.created",
"data": {
"object": {
"id": "cus_abc123",
"email": "user@example.com"
}
}
}
'import requests
url = "https://api.superglue.ai/v1/hooks/{toolId}"
payload = {
"id": "evt_1234",
"type": "customer.created",
"data": { "object": {
"id": "cus_abc123",
"email": "user@example.com"
} }
}
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({
id: 'evt_1234',
type: 'customer.created',
data: {object: {id: 'cus_abc123', email: 'user@example.com'}}
})
};
fetch('https://api.superglue.ai/v1/hooks/{toolId}', 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.superglue.ai/v1/hooks/{toolId}",
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([
'id' => 'evt_1234',
'type' => 'customer.created',
'data' => [
'object' => [
'id' => 'cus_abc123',
'email' => 'user@example.com'
]
]
]),
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.superglue.ai/v1/hooks/{toolId}"
payload := strings.NewReader("{\n \"id\": \"evt_1234\",\n \"type\": \"customer.created\",\n \"data\": {\n \"object\": {\n \"id\": \"cus_abc123\",\n \"email\": \"user@example.com\"\n }\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.superglue.ai/v1/hooks/{toolId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"evt_1234\",\n \"type\": \"customer.created\",\n \"data\": {\n \"object\": {\n \"id\": \"cus_abc123\",\n \"email\": \"user@example.com\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superglue.ai/v1/hooks/{toolId}")
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 \"id\": \"evt_1234\",\n \"type\": \"customer.created\",\n \"data\": {\n \"object\": {\n \"id\": \"cus_abc123\",\n \"email\": \"user@example.com\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"runId": "7f3e9c1a-2b4d-4e8f-9a3b-1c5d7e9f2a4b",
"status": "accepted",
"toolId": "handle-stripe-webhook"
}{
"error": {
"message": "Invalid input parameters"
}
}{
"error": {
"message": "Invalid input parameters"
}
}Authorizations
Query Parameters
Body
application/json
Webhook payload from the external service. Becomes the tool's input.
The body is of type object.
Was this page helpful?