Skip to main content
POST
/
v1
/
webhooks
Register a webhook
curl --request POST \
  --url https://api.rekko.ai/v1/webhooks \
  --header 'Content-Type: application/json' \
  --data '
{
  "events": [
    "whale_alert",
    "analysis_complete"
  ],
  "secret": "whsec_abc123def456",
  "url": "https://my-agent.example.com/webhooks/rekko"
}
'
import requests

url = "https://api.rekko.ai/v1/webhooks"

payload = {
"events": ["whale_alert", "analysis_complete"],
"secret": "whsec_abc123def456",
"url": "https://my-agent.example.com/webhooks/rekko"
}
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({
events: ['whale_alert', 'analysis_complete'],
secret: 'whsec_abc123def456',
url: 'https://my-agent.example.com/webhooks/rekko'
})
};

fetch('https://api.rekko.ai/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://api.rekko.ai/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([
'events' => [
'whale_alert',
'analysis_complete'
],
'secret' => 'whsec_abc123def456',
'url' => 'https://my-agent.example.com/webhooks/rekko'
]),
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.rekko.ai/v1/webhooks"

payload := strings.NewReader("{\n \"events\": [\n \"whale_alert\",\n \"analysis_complete\"\n ],\n \"secret\": \"whsec_abc123def456\",\n \"url\": \"https://my-agent.example.com/webhooks/rekko\"\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.rekko.ai/v1/webhooks")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n \"whale_alert\",\n \"analysis_complete\"\n ],\n \"secret\": \"whsec_abc123def456\",\n \"url\": \"https://my-agent.example.com/webhooks/rekko\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.rekko.ai/v1/webhooks")

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 \"events\": [\n \"whale_alert\",\n \"analysis_complete\"\n ],\n \"secret\": \"whsec_abc123def456\",\n \"url\": \"https://my-agent.example.com/webhooks/rekko\"\n}"

response = http.request(request)
puts response.read_body
{
  "created_at": "2026-03-20T10:00:00Z",
  "enabled": true,
  "events": [
    "whale_alert",
    "analysis_complete"
  ],
  "failure_count": 0,
  "url": "https://my-agent.example.com/webhooks/rekko",
  "webhook_id": "wh-f47ac10b58cc"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Body

application/json

Request to register a webhook.

url
string
required

HTTPS URL to receive webhook POST requests

events
string[]
required

Event types: 'price_shift', 'whale_alert', 'analysis_complete'

secret
string
default:""

HMAC-SHA256 secret for payload verification

Response

Successful Response

Registered webhook details.

webhook_id
string
required

Unique webhook identifier

url
string
required

Destination URL

events
string[]
required

Subscribed event types

created_at
string<date-time>
required

When registered

enabled
boolean
default:true

Whether active

failure_count
integer
default:0

Consecutive delivery failures