curl --request GET \
--url https://api.trysela.com/api/webhooks/{id}/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.trysela.com/api/webhooks/{id}/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.trysela.com/api/webhooks/{id}/', 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.trysela.com/api/webhooks/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://api.trysela.com/api/webhooks/{id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trysela.com/api/webhooks/{id}/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trysela.com/api/webhooks/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 42,
"url": "https://crm.example.com/leads/{{id}}/events",
"trigger": [
"LEAD_CREATED",
"CALL_COMPLETE"
],
"method": "POST",
"filter_condition": "get('last_chat.is_contact', False)"
}Retrieve a Webhook Subscription
Returns one webhook subscription owned by the authenticated API user. Secret headers are write-only and are never included in the response.
curl --request GET \
--url https://api.trysela.com/api/webhooks/{id}/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.trysela.com/api/webhooks/{id}/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.trysela.com/api/webhooks/{id}/', 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.trysela.com/api/webhooks/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://api.trysela.com/api/webhooks/{id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trysela.com/api/webhooks/{id}/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trysela.com/api/webhooks/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 42,
"url": "https://crm.example.com/leads/{{id}}/events",
"trigger": [
"LEAD_CREATED",
"CALL_COMPLETE"
],
"method": "POST",
"filter_condition": "get('last_chat.is_contact', False)"
}Authorizations
Token-based authentication with required prefix "Token"
Path Parameters
A unique integer value identifying this webhook.
Response
Webhook subscription retrieved successfully.
Webhook URL. Supports {{variable}} placeholders resolved from the webhook payload (e.g. https://api.example.com/leads/{{id}}/notify). Use dot notation for nested values (e.g. {{metadata.us_state}}).
255LEAD_CREATED, LEAD_UPDATED, LEAD_CLOSED, LEAD_CLOSED_INCOMPLETE, LEAD_LOST, LEAD_SCHEDULE_COMPLETED, LEAD_LATE_CALLBACK, LEAD_OUT_OF_TERRITORY, LEAD_BAD_NUMBER, LEAD_CANCELLED, LEAD_CALLBACK_TO_TRANSFER, LEAD_BEFORE_REENGAGEMENT, LEAD_REENGAGEMENT, LEAD_FIRST_INBOUND, CALL_COMPLETE, BEFORE_CALLING, CALL_FAILED, CALL_ENDED, CALL_TRANSFER_INITIATED, SMS_COMPLETE, SMS_DNC, CALL_DNC HTTP method to use when sending the webhook request. NULL or blank defaults to POST.
GET- GETPOST- POSTPUT- PUTPATCH- PATCH
GET, POST, PUT, PATCH Optional filter expression that controls when the webhook fires. The expression is evaluated against the webhook payload - the same data sent in the request body. Leave blank to always fire. Use has('field') to check whether a field exists, get('path.to.value', default) for safe nested access, and comparison operators such as ==, !=, and, or. Examples: status == 'CLOSED', has('last_chat') and last_chat['is_contact'], get('last_chat.call_direction', '') == 'INBOUND'