Receive a signed GitHub event
curl --request POST \
--url https://api.agentsfleet.net/v1/webhooks/{fleet_id}/github \
--header 'Content-Type: application/json' \
--header 'X-GitHub-Delivery: <x-github-delivery>' \
--header 'X-GitHub-Event: <x-github-event>' \
--header 'X-Hub-Signature-256: <x-hub-signature-256>' \
--data '{}'import requests
url = "https://api.agentsfleet.net/v1/webhooks/{fleet_id}/github"
payload = {}
headers = {
"X-GitHub-Event": "<x-github-event>",
"X-GitHub-Delivery": "<x-github-delivery>",
"X-Hub-Signature-256": "<x-hub-signature-256>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-GitHub-Event': '<x-github-event>',
'X-GitHub-Delivery': '<x-github-delivery>',
'X-Hub-Signature-256': '<x-hub-signature-256>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.agentsfleet.net/v1/webhooks/{fleet_id}/github', 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.agentsfleet.net/v1/webhooks/{fleet_id}/github",
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-GitHub-Delivery: <x-github-delivery>",
"X-GitHub-Event: <x-github-event>",
"X-Hub-Signature-256: <x-hub-signature-256>"
],
]);
$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.agentsfleet.net/v1/webhooks/{fleet_id}/github"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-GitHub-Event", "<x-github-event>")
req.Header.Add("X-GitHub-Delivery", "<x-github-delivery>")
req.Header.Add("X-Hub-Signature-256", "<x-hub-signature-256>")
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.agentsfleet.net/v1/webhooks/{fleet_id}/github")
.header("X-GitHub-Event", "<x-github-event>")
.header("X-GitHub-Delivery", "<x-github-delivery>")
.header("X-Hub-Signature-256", "<x-hub-signature-256>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/webhooks/{fleet_id}/github")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-GitHub-Event"] = '<x-github-event>'
request["X-GitHub-Delivery"] = '<x-github-delivery>'
request["X-Hub-Signature-256"] = '<x-hub-signature-256>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"deduped": true
}{
"status": "<string>",
"event_id": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}Webhooks
Receive a signed GitHub event
Verifies the body with the webhook_secret field from the workspace’s github secret.
Reviewable pull_request events and failed completed workflow_run events create fleet events. A delivery identifier remains reserved for 72 hours after acceptance.
POST
/
v1
/
webhooks
/
{fleet_id}
/
github
Receive a signed GitHub event
curl --request POST \
--url https://api.agentsfleet.net/v1/webhooks/{fleet_id}/github \
--header 'Content-Type: application/json' \
--header 'X-GitHub-Delivery: <x-github-delivery>' \
--header 'X-GitHub-Event: <x-github-event>' \
--header 'X-Hub-Signature-256: <x-hub-signature-256>' \
--data '{}'import requests
url = "https://api.agentsfleet.net/v1/webhooks/{fleet_id}/github"
payload = {}
headers = {
"X-GitHub-Event": "<x-github-event>",
"X-GitHub-Delivery": "<x-github-delivery>",
"X-Hub-Signature-256": "<x-hub-signature-256>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-GitHub-Event': '<x-github-event>',
'X-GitHub-Delivery': '<x-github-delivery>',
'X-Hub-Signature-256': '<x-hub-signature-256>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.agentsfleet.net/v1/webhooks/{fleet_id}/github', 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.agentsfleet.net/v1/webhooks/{fleet_id}/github",
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-GitHub-Delivery: <x-github-delivery>",
"X-GitHub-Event: <x-github-event>",
"X-Hub-Signature-256: <x-hub-signature-256>"
],
]);
$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.agentsfleet.net/v1/webhooks/{fleet_id}/github"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-GitHub-Event", "<x-github-event>")
req.Header.Add("X-GitHub-Delivery", "<x-github-delivery>")
req.Header.Add("X-Hub-Signature-256", "<x-hub-signature-256>")
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.agentsfleet.net/v1/webhooks/{fleet_id}/github")
.header("X-GitHub-Event", "<x-github-event>")
.header("X-GitHub-Delivery", "<x-github-delivery>")
.header("X-Hub-Signature-256", "<x-hub-signature-256>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/webhooks/{fleet_id}/github")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-GitHub-Event"] = '<x-github-event>'
request["X-GitHub-Delivery"] = '<x-github-delivery>'
request["X-Hub-Signature-256"] = '<x-hub-signature-256>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"deduped": true
}{
"status": "<string>",
"event_id": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}{
"docs_uri": "https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009",
"title": "Fleet not found",
"detail": "No fleet with id 'abc123' in this workspace.",
"error_code": "UZ-AGT-009",
"request_id": "<string>",
"current_state": "paused",
"user_message": "We couldn't find that Fleet. It may have been deleted, or the ID doesn't match one in this workspace.",
"etag": "<string>"
}Headers
GitHub event type.
Available options:
pull_request, workflow_run GitHub-issued delivery UUID. Used as the dedupe key.
HMAC-SHA256 of the raw body, prefixed with sha256=.
Path Parameters
UUIDv7 of the fleet that owns this webhook receiver.
Body
application/json
Raw GitHub webhook payload.
Response
Duplicate or ignored event. An ignored event does not reserve its delivery identifier.
- Option 1
- Option 2
⌘I