Set or clear an API key's default webhook
curl --request POST \
--url https://api.eddy.engineer/admin/keys/{key_hash}/webhook \
--header 'Content-Type: application/json' \
--header 'x-admin-token: <api-key>' \
--data '
{
"secret": "<string>",
"url": "<string>"
}
'import requests
url = "https://api.eddy.engineer/admin/keys/{key_hash}/webhook"
payload = {
"secret": "<string>",
"url": "<string>"
}
headers = {
"x-admin-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-admin-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({secret: '<string>', url: '<string>'})
};
fetch('https://api.eddy.engineer/admin/keys/{key_hash}/webhook', 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.eddy.engineer/admin/keys/{key_hash}/webhook",
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([
'secret' => '<string>',
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-admin-token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/admin/keys/{key_hash}/webhook"
payload := strings.NewReader("{\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-admin-token", "<api-key>")
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.eddy.engineer/admin/keys/{key_hash}/webhook")
.header("x-admin-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/admin/keys/{key_hash}/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-admin-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"record": {
"created_at_unix_ms": 123,
"key_hash": "<string>",
"limits": {
"requests_per_minute": 500000,
"burst": 50000
},
"llm_gateway": true,
"llm_gateway_sealed": true,
"name": "<string>",
"owner_uid": "<string>",
"revoked": true,
"scopes": [
"<string>"
],
"webhook": {
"signed": true,
"url": "<string>"
}
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Admin
Set or clear an API key's default webhook
An async job submitted with this key (x-api-key) and no webhook of its own is delivered to the key’s default: one POST of the finished job record, signed exactly as a request’s webhook (x-eddy-signature: blake3=<hex>, keyed by secret; no secret = unsigned), three attempts, logged on the job under webhook. A request’s own webhook wins. url: null clears it. The secret is stored sealed, bound to the key’s hash (no seal key on the deployment: a signed default is 503 SEAL_UNCONFIGURED, an unsigned one is stored), and never answered. An admin sets any key’s; a signed-in person, the keys they own; a key does not set its own.
POST
/
admin
/
keys
/
{key_hash}
/
webhook
Set or clear an API key's default webhook
curl --request POST \
--url https://api.eddy.engineer/admin/keys/{key_hash}/webhook \
--header 'Content-Type: application/json' \
--header 'x-admin-token: <api-key>' \
--data '
{
"secret": "<string>",
"url": "<string>"
}
'import requests
url = "https://api.eddy.engineer/admin/keys/{key_hash}/webhook"
payload = {
"secret": "<string>",
"url": "<string>"
}
headers = {
"x-admin-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-admin-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({secret: '<string>', url: '<string>'})
};
fetch('https://api.eddy.engineer/admin/keys/{key_hash}/webhook', 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.eddy.engineer/admin/keys/{key_hash}/webhook",
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([
'secret' => '<string>',
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-admin-token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/admin/keys/{key_hash}/webhook"
payload := strings.NewReader("{\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-admin-token", "<api-key>")
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.eddy.engineer/admin/keys/{key_hash}/webhook")
.header("x-admin-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/admin/keys/{key_hash}/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-admin-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"secret\": \"<string>\",\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"record": {
"created_at_unix_ms": 123,
"key_hash": "<string>",
"limits": {
"requests_per_minute": 500000,
"burst": 50000
},
"llm_gateway": true,
"llm_gateway_sealed": true,
"name": "<string>",
"owner_uid": "<string>",
"revoked": true,
"scopes": [
"<string>"
],
"webhook": {
"signed": true,
"url": "<string>"
}
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
application/json