Subscribe to Webhook
curl --request POST \
--url https://api.thehyperstack.com/v1/webhook/subscribe \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": {}
}
'import requests
url = "https://api.thehyperstack.com/v1/webhook/subscribe"
payload = {
"url": "<string>",
"events": {}
}
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: '<string>', events: {}})
};
fetch('https://api.thehyperstack.com/v1/webhook/subscribe', 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.thehyperstack.com/v1/webhook/subscribe",
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>',
'events' => [
]
]),
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.thehyperstack.com/v1/webhook/subscribe"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": {}\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.thehyperstack.com/v1/webhook/subscribe")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thehyperstack.com/v1/webhook/subscribe")
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\": \"<string>\",\n \"events\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Webhook updated successfully"
}
{
"success": false,
"error": "URL and Event(s) are required",
"error_code": "missing_url_event"
}
{
"success": false,
"error": "Invalid Event(s)",
"error_code": "invalid_event"
}
{
"success": false,
"error": "Invalid URL",
"error_code": "invalid_url"
}
{
"detail": "Invalid token or organization not found"
}
Webhooks
Subscribe to Webhook
POST
/
v1
/
webhook
/
subscribe
Subscribe to Webhook
curl --request POST \
--url https://api.thehyperstack.com/v1/webhook/subscribe \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": {}
}
'import requests
url = "https://api.thehyperstack.com/v1/webhook/subscribe"
payload = {
"url": "<string>",
"events": {}
}
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: '<string>', events: {}})
};
fetch('https://api.thehyperstack.com/v1/webhook/subscribe', 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.thehyperstack.com/v1/webhook/subscribe",
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>',
'events' => [
]
]),
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.thehyperstack.com/v1/webhook/subscribe"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": {}\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.thehyperstack.com/v1/webhook/subscribe")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thehyperstack.com/v1/webhook/subscribe")
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\": \"<string>\",\n \"events\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Webhook updated successfully"
}
{
"success": false,
"error": "URL and Event(s) are required",
"error_code": "missing_url_event"
}
{
"success": false,
"error": "Invalid Event(s)",
"error_code": "invalid_event"
}
{
"success": false,
"error": "Invalid URL",
"error_code": "invalid_url"
}
{
"detail": "Invalid token or organization not found"
}
Description
This endpoint allows you to register a webhook URL to receive real-time event notifications from Hyperstack. If a subscription already exists for your organization, it will be updated with the new URL and events. Currently supported events:credential.issued— triggered when a credential is successfully published
Headers
string
required
Bearer YOUR_API_TOKEN — obtainable from Hyperstack Dashboard → Settings → API Access
Body Parameters
string
required
The HTTPS URL that Hyperstack will POST event payloads to. Must begin with
http:// or https://.array[string]
required
An array of event names to subscribe to. Currently supported values:
["credential.issued"].Success Response Fields
boolean
Indicates whether the subscription was created or updated.
string
A confirmation message. Value:
"Webhook updated successfully".Responses
{
"success": true,
"message": "Webhook updated successfully"
}
{
"success": false,
"error": "URL and Event(s) are required",
"error_code": "missing_url_event"
}
{
"success": false,
"error": "Invalid Event(s)",
"error_code": "invalid_event"
}
{
"success": false,
"error": "Invalid URL",
"error_code": "invalid_url"
}
{
"detail": "Invalid token or organization not found"
}
curl -X POST "https://api.thehyperstack.com/v1/webhook/subscribe" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/hyperstack",
"events": ["credential.issued"]
}'
Last modified on February 22, 2026
Was this page helpful?
⌘I

