curl --request POST \
--url https://api.skia.money/api/webhook/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"callbackUrl": "<string>",
"events": [],
"secretHint": "<string>"
}
'import requests
url = "https://api.skia.money/api/webhook/subscriptions"
payload = {
"callbackUrl": "<string>",
"events": [],
"secretHint": "<string>"
}
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({callbackUrl: '<string>', events: [], secretHint: '<string>'})
};
fetch('https://api.skia.money/api/webhook/subscriptions', 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.skia.money/api/webhook/subscriptions",
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([
'callbackUrl' => '<string>',
'events' => [
],
'secretHint' => '<string>'
]),
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://api.skia.money/api/webhook/subscriptions"
payload := strings.NewReader("{\n \"callbackUrl\": \"<string>\",\n \"events\": [],\n \"secretHint\": \"<string>\"\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://api.skia.money/api/webhook/subscriptions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"callbackUrl\": \"<string>\",\n \"events\": [],\n \"secretHint\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skia.money/api/webhook/subscriptions")
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 \"callbackUrl\": \"<string>\",\n \"events\": [],\n \"secretHint\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"subscriptionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"events": [
"order.executed"
],
"callbackUrl": "<string>",
"signingSecret": "<string>",
"delivery": {
"id": "<string>",
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"data": {}
}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}Create an event subscription (contract frozen — DELIVERY NOT IMPLEMENTED)
HONESTY FIRST (R4-22 + round-4 addition 4, per CLAIM-1): the CRUD is live but NO delivery engine exists today — no dispatcher, no HMAC, no outbound code. Creating a subscription does NOT imply events will fire; they never do until SV-9 ships. Same honesty pattern as the rebate stub. CONTRACT FROZEN NOW (clients code against it once): events enum [“order.executed”, “wallet.created”, “session_key.revoked”] (extensible), delivery envelope , HMAC-SHA256 signature header X-Skia-Signature, and the signing secret returned ONCE at creation (secretHint is deprecated — it never was a secret). SSRF rule (ships with SV-9): https-only callbacks + private/IP-range blocklist. Server truth today: events strings are stored UNVALIDATED; enum enforcement arrives with SV-9.
curl --request POST \
--url https://api.skia.money/api/webhook/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"callbackUrl": "<string>",
"events": [],
"secretHint": "<string>"
}
'import requests
url = "https://api.skia.money/api/webhook/subscriptions"
payload = {
"callbackUrl": "<string>",
"events": [],
"secretHint": "<string>"
}
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({callbackUrl: '<string>', events: [], secretHint: '<string>'})
};
fetch('https://api.skia.money/api/webhook/subscriptions', 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.skia.money/api/webhook/subscriptions",
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([
'callbackUrl' => '<string>',
'events' => [
],
'secretHint' => '<string>'
]),
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://api.skia.money/api/webhook/subscriptions"
payload := strings.NewReader("{\n \"callbackUrl\": \"<string>\",\n \"events\": [],\n \"secretHint\": \"<string>\"\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://api.skia.money/api/webhook/subscriptions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"callbackUrl\": \"<string>\",\n \"events\": [],\n \"secretHint\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skia.money/api/webhook/subscriptions")
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 \"callbackUrl\": \"<string>\",\n \"events\": [],\n \"secretHint\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"subscriptionId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"events": [
"order.executed"
],
"callbackUrl": "<string>",
"signingSecret": "<string>",
"delivery": {
"id": "<string>",
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"data": {}
}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}Authorizations
TESTNET posture: simulated signature bearer — the token is the caller's 0x (address-as-identity; no per-request signature verification). Real EIP-191/EIP-712-verified bearers + SIWE (EIP-4361) sessions for the hosted UI arrive in v1.7.0. The settlement security boundary is the EIP-712 Order signature verified by SwapERC20 on-chain, not this credential. See docs/auth-posture-testnet.md.
Body
Response
Subscription created (STORED ONLY — delivery pending SV-9; no events fire today)
DELIVERY NOT IMPLEMENTED (R4-22 + round-4 addition 4, per CLAIM-1): this object describes a STORED subscription — no dispatcher exists today, no events ever fire until SV-9. The contract below is frozen so clients code against it once (same honesty pattern as the rebate 501 stub).