curl --request POST \
--url https://whistle.huddleup-sports.com/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/whistle/webhooks",
"events": [
"game.created",
"position.claimed",
"payment.paid"
]
}
'import requests
url = "https://whistle.huddleup-sports.com/api/v1/webhooks"
payload = {
"url": "https://example.com/whistle/webhooks",
"events": ["game.created", "position.claimed", "payment.paid"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/whistle/webhooks',
events: ['game.created', 'position.claimed', 'payment.paid']
})
};
fetch('https://whistle.huddleup-sports.com/api/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://whistle.huddleup-sports.com/api/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([
'url' => 'https://example.com/whistle/webhooks',
'events' => [
'game.created',
'position.claimed',
'payment.paid'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://whistle.huddleup-sports.com/api/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://example.com/whistle/webhooks\",\n \"events\": [\n \"game.created\",\n \"position.claimed\",\n \"payment.paid\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://whistle.huddleup-sports.com/api/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/whistle/webhooks\",\n \"events\": [\n \"game.created\",\n \"position.claimed\",\n \"payment.paid\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://whistle.huddleup-sports.com/api/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/whistle/webhooks\",\n \"events\": [\n \"game.created\",\n \"position.claimed\",\n \"payment.paid\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"url": "<string>",
"events": [],
"active": true,
"source": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"secret": "<string>"
}
}{
"error": "invalid_json"
}{
"error": "unauthorized"
}Register a webhook endpoint
url must be HTTPS. events empty or omitted = subscribe to all events; unknown names → 400 unknown_event:<name>. The endpoint’s source is derived from your key, and it receives events only for leagues in your scope. The signing secret (whsec_…) is returned in this response only — store it immediately; it cannot be retrieved again, and there is no rotation endpoint (delete and re-register to rotate).
curl --request POST \
--url https://whistle.huddleup-sports.com/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/whistle/webhooks",
"events": [
"game.created",
"position.claimed",
"payment.paid"
]
}
'import requests
url = "https://whistle.huddleup-sports.com/api/v1/webhooks"
payload = {
"url": "https://example.com/whistle/webhooks",
"events": ["game.created", "position.claimed", "payment.paid"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/whistle/webhooks',
events: ['game.created', 'position.claimed', 'payment.paid']
})
};
fetch('https://whistle.huddleup-sports.com/api/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://whistle.huddleup-sports.com/api/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([
'url' => 'https://example.com/whistle/webhooks',
'events' => [
'game.created',
'position.claimed',
'payment.paid'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://whistle.huddleup-sports.com/api/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://example.com/whistle/webhooks\",\n \"events\": [\n \"game.created\",\n \"position.claimed\",\n \"payment.paid\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://whistle.huddleup-sports.com/api/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/whistle/webhooks\",\n \"events\": [\n \"game.created\",\n \"position.claimed\",\n \"payment.paid\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://whistle.huddleup-sports.com/api/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/whistle/webhooks\",\n \"events\": [\n \"game.created\",\n \"position.claimed\",\n \"payment.paid\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"url": "<string>",
"events": [],
"active": true,
"source": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"secret": "<string>"
}
}{
"error": "invalid_json"
}{
"error": "unauthorized"
}Authorizations
Partner API key: Authorization: Bearer whk_…. Keys are issued by the Whistle team (email tommy@huddleup-sports.com), shown once at issuance, and bound to your source namespace — they access only your leagues (plus explicit grants) and your webhook endpoints. Any auth failure returns 401 {"error":"unauthorized"}; the API never returns 403 — out-of-scope resources answer 404 exactly like nonexistent ones.
Body
HTTPS only.
Empty/omitted = all events.
game.created, game.updated, game.cancelled, game.completed, position.claimed, position.released, payment.paid, payment.failed, official.joined, official.approved, official.removed, official.no_show Derived from your key — omit, or echo your key's source; any other value returns 400 source_mismatch.
40Response
Created endpoint including the once-only secret
Show child attributes
Show child attributes

