Create a webhook endpoint
curl --request POST \
--url https://app.selektable.com/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"description": "<string>",
"enabledEvents": [
"*"
]
}
'import requests
url = "https://app.selektable.com/v1/webhook-endpoints"
payload = {
"url": "<string>",
"description": "<string>",
"enabledEvents": ["*"]
}
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: '<string>', description: '<string>', enabledEvents: ['*']})
};
fetch('https://app.selektable.com/v1/webhook-endpoints', 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.selektable.com/v1/webhook-endpoints",
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>',
'description' => '<string>',
'enabledEvents' => [
'*'
]
]),
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://app.selektable.com/v1/webhook-endpoints"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"enabledEvents\": [\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://app.selektable.com/v1/webhook-endpoints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"enabledEvents\": [\n \"*\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.selektable.com/v1/webhook-endpoints")
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\": \"<string>\",\n \"description\": \"<string>\",\n \"enabledEvents\": [\n \"*\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "whe_abc123",
"object": "webhook_endpoint",
"url": "<string>",
"description": "<string>",
"enabledEvents": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"secret": "whsec_..."
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
}Webhook Endpoints
Create a webhook endpoint
Registers an HTTPS endpoint to receive signed events. The signing secret is returned ONCE in this response and never again.
POST
/
v1
/
webhook-endpoints
Create a webhook endpoint
curl --request POST \
--url https://app.selektable.com/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"description": "<string>",
"enabledEvents": [
"*"
]
}
'import requests
url = "https://app.selektable.com/v1/webhook-endpoints"
payload = {
"url": "<string>",
"description": "<string>",
"enabledEvents": ["*"]
}
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: '<string>', description: '<string>', enabledEvents: ['*']})
};
fetch('https://app.selektable.com/v1/webhook-endpoints', 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.selektable.com/v1/webhook-endpoints",
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>',
'description' => '<string>',
'enabledEvents' => [
'*'
]
]),
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://app.selektable.com/v1/webhook-endpoints"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"enabledEvents\": [\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://app.selektable.com/v1/webhook-endpoints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"enabledEvents\": [\n \"*\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.selektable.com/v1/webhook-endpoints")
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\": \"<string>\",\n \"description\": \"<string>\",\n \"enabledEvents\": [\n \"*\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "whe_abc123",
"object": "webhook_endpoint",
"url": "<string>",
"description": "<string>",
"enabledEvents": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"secret": "whsec_..."
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>"
}
}Register an HTTPS URL to receive signed events when generations reach a terminal state. See Webhooks for the event payload shape and signature verification.
The response includes the signing
secret — shown once. Store it securely before discarding the response.Authorizations
Your Selektable API key (selektable_...), sent as Authorization: Bearer <key>.
Body
application/json
Response
Endpoint created (includes one-time secret)
Example:
"whe_abc123"
Available options:
webhook_endpoint Available options:
enabled, disabled Signing secret. Shown only once — store it securely.
Example:
"whsec_..."
Was this page helpful?
⌘I