Register Webhook
curl --request POST \
--url https://app.activecalculator.com/api/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'x-ac-api-key: <api-key>' \
--data '
{
"url": "<string>",
"triggers": [
"newSubmission"
],
"calculators": [
"<string>"
],
"name": "<string>",
"source": "user"
}
'import requests
url = "https://app.activecalculator.com/api/v1/webhooks"
payload = {
"url": "<string>",
"triggers": ["newSubmission"],
"calculators": ["<string>"],
"name": "<string>",
"source": "user"
}
headers = {
"x-ac-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-ac-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
triggers: ['newSubmission'],
calculators: ['<string>'],
name: '<string>',
source: 'user'
})
};
fetch('https://app.activecalculator.com/api/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://app.activecalculator.com/api/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' => '<string>',
'triggers' => [
'newSubmission'
],
'calculators' => [
'<string>'
],
'name' => '<string>',
'source' => 'user'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ac-api-key: <api-key>"
],
]);
$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://app.activecalculator.com/api/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"triggers\": [\n \"newSubmission\"\n ],\n \"calculators\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"source\": \"user\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-ac-api-key", "<api-key>")
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://app.activecalculator.com/api/v1/webhooks")
.header("x-ac-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"triggers\": [\n \"newSubmission\"\n ],\n \"calculators\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"source\": \"user\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.activecalculator.com/api/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ac-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"triggers\": [\n \"newSubmission\"\n ],\n \"calculators\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"source\": \"user\"\n}"
response = http.request(request)
puts response.read_body"{\n \"data\": {\n \"id\": \"webhook123\",\n \"name\": \"Example Webhook\",\n \"createdAt\": \"2024-01-15T10:30:00.000Z\",\n \"updatedAt\": \"2024-01-15T11:45:00.000Z\",\n \"url\": \"https://example.com/webhook\",\n \"source\": \"user\",\n \"workspaceId\": \"workspace456\"\n }\n}""{}"Webhooks
Register Webhook
Create a new webhook right from the API and see it active right away!
POST
/
webhooks
Register Webhook
curl --request POST \
--url https://app.activecalculator.com/api/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'x-ac-api-key: <api-key>' \
--data '
{
"url": "<string>",
"triggers": [
"newSubmission"
],
"calculators": [
"<string>"
],
"name": "<string>",
"source": "user"
}
'import requests
url = "https://app.activecalculator.com/api/v1/webhooks"
payload = {
"url": "<string>",
"triggers": ["newSubmission"],
"calculators": ["<string>"],
"name": "<string>",
"source": "user"
}
headers = {
"x-ac-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-ac-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
triggers: ['newSubmission'],
calculators: ['<string>'],
name: '<string>',
source: 'user'
})
};
fetch('https://app.activecalculator.com/api/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://app.activecalculator.com/api/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' => '<string>',
'triggers' => [
'newSubmission'
],
'calculators' => [
'<string>'
],
'name' => '<string>',
'source' => 'user'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ac-api-key: <api-key>"
],
]);
$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://app.activecalculator.com/api/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"triggers\": [\n \"newSubmission\"\n ],\n \"calculators\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"source\": \"user\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-ac-api-key", "<api-key>")
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://app.activecalculator.com/api/v1/webhooks")
.header("x-ac-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"triggers\": [\n \"newSubmission\"\n ],\n \"calculators\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"source\": \"user\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.activecalculator.com/api/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ac-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"triggers\": [\n \"newSubmission\"\n ],\n \"calculators\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"source\": \"user\"\n}"
response = http.request(request)
puts response.read_body"{\n \"data\": {\n \"id\": \"webhook123\",\n \"name\": \"Example Webhook\",\n \"createdAt\": \"2024-01-15T10:30:00.000Z\",\n \"updatedAt\": \"2024-01-15T11:45:00.000Z\",\n \"url\": \"https://example.com/webhook\",\n \"source\": \"user\",\n \"workspaceId\": \"workspace456\"\n }\n}""{}"Authorizations
Body
application/json
The URL where the webhook will send data
An array of pipeline trigger event types. Currently supported trigger is "newSubmission"
An array of calculator IDs (CUID2 format)
A name for the webhook
The source of the webhook
Available options:
user, zapier, make, n8n, pipedream Response
200
Show child attributes
Show child attributes
Was this page helpful?
⌘I