curl --request POST \
--url https://api.eddy.engineer/hooks/agents/{agent}/{hook} \
--header 'Content-Type: application/json' \
--header 'x-eddy-signature: <x-eddy-signature>' \
--data '{}'import requests
url = "https://api.eddy.engineer/hooks/agents/{agent}/{hook}"
payload = {}
headers = {
"x-eddy-signature": "<x-eddy-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-eddy-signature': '<x-eddy-signature>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.eddy.engineer/hooks/agents/{agent}/{hook}', 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/hooks/agents/{agent}/{hook}",
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([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-eddy-signature: <x-eddy-signature>"
],
]);
$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/hooks/agents/{agent}/{hook}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-eddy-signature", "<x-eddy-signature>")
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/hooks/agents/{agent}/{hook}")
.header("x-eddy-signature", "<x-eddy-signature>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/hooks/agents/{agent}/{hook}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-eddy-signature"] = '<x-eddy-signature>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"accepted": true,
"delivery": "<string>",
"duplicate": true
}{
"accepted": true,
"agent": "<string>",
"delivery": "<string>",
"hook": "<string>",
"run": "<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>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}An agent's inbound webhook (AS18)
Called by another system, not by people. The body is signed as the engine signs its own outbound webhooks (SD5): x-eddy-signature: blake3=<hex>, BLAKE3 keyed with derive_key(“eddy webhook v1”, secret) over the raw body, checked before anything is read: unsigned 401 HOOK_UNSIGNED, mis-signed 401 HOOK_SIGNATURE_INVALID. An unknown agent or hook, or one not armed, is 404 HOOK_NOT_FOUND. x-eddy-delivery (else the body’s hash) makes a redelivery answer duplicate without a second run. A delivery while the hook’s previous run is going is 429 HOOK_BUSY (Retry-After); one whose run cannot start (credits, a gone person) 409 HOOK_REFUSED. Otherwise 202 with the run it started: the armed definition acting for the person who armed it, the body (JSON, or text) in its input as data. At most 256 KiB (413 HOOK_TOO_LARGE). TL3b: a JSON body’s attachments: [{blob, name}] go into the run as a definition run’s attachments do, read as the person who armed the hook; a file that person may not read refuses the delivery (409 HOOK_REFUSED). TL5: a mail.received trigger’s hook takes a mail: {from, subject, received, body_text?, attachments?: [{blob, name}], to?, cc?, message_id?} (400 MAIL_SHAPE otherwise; body_text is kept to 12,000 characters). A sender the trigger’s from does not take is answered 200 {accepted: true, run: null, skipped} and starts nothing; otherwise the run gets the mail as data and, as attachments, its first five files that are within an inline run’s limits (the rest stay in the mail as blob refs).
curl --request POST \
--url https://api.eddy.engineer/hooks/agents/{agent}/{hook} \
--header 'Content-Type: application/json' \
--header 'x-eddy-signature: <x-eddy-signature>' \
--data '{}'import requests
url = "https://api.eddy.engineer/hooks/agents/{agent}/{hook}"
payload = {}
headers = {
"x-eddy-signature": "<x-eddy-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-eddy-signature': '<x-eddy-signature>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.eddy.engineer/hooks/agents/{agent}/{hook}', 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/hooks/agents/{agent}/{hook}",
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([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-eddy-signature: <x-eddy-signature>"
],
]);
$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/hooks/agents/{agent}/{hook}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-eddy-signature", "<x-eddy-signature>")
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/hooks/agents/{agent}/{hook}")
.header("x-eddy-signature", "<x-eddy-signature>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/hooks/agents/{agent}/{hook}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-eddy-signature"] = '<x-eddy-signature>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"accepted": true,
"delivery": "<string>",
"duplicate": true
}{
"accepted": true,
"agent": "<string>",
"delivery": "<string>",
"hook": "<string>",
"run": "<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>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}