Configure Webhook Endpoint
curl --request POST \
--url https://api.urtentic.com/api/v1/webhooks/configure \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks/urtentic",
"secret": "whsec_8fJ9LKps6YtG3xZD7N2W",
"events": [
"verification.completed",
"verification.failed"
],
"active": true
}
'import requests
url = "https://api.urtentic.com/api/v1/webhooks/configure"
payload = {
"url": "https://example.com/webhooks/urtentic",
"secret": "whsec_8fJ9LKps6YtG3xZD7N2W",
"events": ["verification.completed", "verification.failed"],
"active": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/webhooks/urtentic',
secret: 'whsec_8fJ9LKps6YtG3xZD7N2W',
events: ['verification.completed', 'verification.failed'],
active: true
})
};
fetch('https://api.urtentic.com/api/v1/webhooks/configure', 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.urtentic.com/api/v1/webhooks/configure",
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' => 'https://example.com/webhooks/urtentic',
'secret' => 'whsec_8fJ9LKps6YtG3xZD7N2W',
'events' => [
'verification.completed',
'verification.failed'
],
'active' => true
]),
CURLOPT_HTTPHEADER => [
"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.urtentic.com/api/v1/webhooks/configure"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhooks/urtentic\",\n \"secret\": \"whsec_8fJ9LKps6YtG3xZD7N2W\",\n \"events\": [\n \"verification.completed\",\n \"verification.failed\"\n ],\n \"active\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.urtentic.com/api/v1/webhooks/configure")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/webhooks/urtentic\",\n \"secret\": \"whsec_8fJ9LKps6YtG3xZD7N2W\",\n \"events\": [\n \"verification.completed\",\n \"verification.failed\"\n ],\n \"active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.urtentic.com/api/v1/webhooks/configure")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/webhooks/urtentic\",\n \"secret\": \"whsec_8fJ9LKps6YtG3xZD7N2W\",\n \"events\": [\n \"verification.completed\",\n \"verification.failed\"\n ],\n \"active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "wh_7dJ9LKps6YtG3xZD7N2W",
"url": "https://example.com/webhooks/urtentic",
"secret": "whsec_8fJ9LKps6YtG3xZD7N2W",
"events": [
"verification.completed",
"verification.failed"
],
"active": true,
"createdAt": "2023-06-15T14:30:00Z"
}{
"error": "INVALID_WEBHOOK_URL",
"message": "Webhook URL must use HTTPS protocol"
}Webhooks
Configure Webhook Endpoint
Configures a webhook endpoint to receive verification event notifications. This allows your application to receive real-time updates when verification statuses change.
Use Cases
- Setting up real-time verification notifications
- Configuring webhook endpoints for your application
- Specifying which events should trigger notifications
Notes
- This endpoint requires an API key with webhook configuration permissions
- The webhook URL must be publicly accessible and support HTTPS
- Webhooks are signed using a secret to verify authenticity
- Webhook requests will time out after 10 seconds
POST
/
webhooks
/
configure
Configure Webhook Endpoint
curl --request POST \
--url https://api.urtentic.com/api/v1/webhooks/configure \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks/urtentic",
"secret": "whsec_8fJ9LKps6YtG3xZD7N2W",
"events": [
"verification.completed",
"verification.failed"
],
"active": true
}
'import requests
url = "https://api.urtentic.com/api/v1/webhooks/configure"
payload = {
"url": "https://example.com/webhooks/urtentic",
"secret": "whsec_8fJ9LKps6YtG3xZD7N2W",
"events": ["verification.completed", "verification.failed"],
"active": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/webhooks/urtentic',
secret: 'whsec_8fJ9LKps6YtG3xZD7N2W',
events: ['verification.completed', 'verification.failed'],
active: true
})
};
fetch('https://api.urtentic.com/api/v1/webhooks/configure', 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.urtentic.com/api/v1/webhooks/configure",
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' => 'https://example.com/webhooks/urtentic',
'secret' => 'whsec_8fJ9LKps6YtG3xZD7N2W',
'events' => [
'verification.completed',
'verification.failed'
],
'active' => true
]),
CURLOPT_HTTPHEADER => [
"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.urtentic.com/api/v1/webhooks/configure"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhooks/urtentic\",\n \"secret\": \"whsec_8fJ9LKps6YtG3xZD7N2W\",\n \"events\": [\n \"verification.completed\",\n \"verification.failed\"\n ],\n \"active\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.urtentic.com/api/v1/webhooks/configure")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/webhooks/urtentic\",\n \"secret\": \"whsec_8fJ9LKps6YtG3xZD7N2W\",\n \"events\": [\n \"verification.completed\",\n \"verification.failed\"\n ],\n \"active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.urtentic.com/api/v1/webhooks/configure")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/webhooks/urtentic\",\n \"secret\": \"whsec_8fJ9LKps6YtG3xZD7N2W\",\n \"events\": [\n \"verification.completed\",\n \"verification.failed\"\n ],\n \"active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "wh_7dJ9LKps6YtG3xZD7N2W",
"url": "https://example.com/webhooks/urtentic",
"secret": "whsec_8fJ9LKps6YtG3xZD7N2W",
"events": [
"verification.completed",
"verification.failed"
],
"active": true,
"createdAt": "2023-06-15T14:30:00Z"
}{
"error": "INVALID_WEBHOOK_URL",
"message": "Webhook URL must use HTTPS protocol"
}Body
application/json
The HTTPS URL that will receive webhook notifications
Example:
"https://example.com/webhooks/urtentic"
Secret key used to sign webhook payloads for verification. If not provided, a random secret will be generated.
Example:
"whsec_8fJ9LKps6YtG3xZD7N2W"
List of events to subscribe to. If empty, all events will be sent.
Available options:
verification.created, verification.updated, verification.completed, verification.failed, document.verified, liveness.verified, email.verified, location.verified Example:
[ "verification.completed", "verification.failed" ]
Whether this webhook endpoint is active. Defaults to true.
Example:
true
Response
Webhook endpoint configured successfully
Unique identifier for the webhook configuration
Example:
"wh_7dJ9LKps6YtG3xZD7N2W"
Example:
"https://example.com/webhooks/urtentic"
Example:
"whsec_8fJ9LKps6YtG3xZD7N2W"
Example:
[ "verification.completed", "verification.failed" ]
Example:
true
Example:
"2023-06-15T14:30:00Z"