x402station.io API reference
Endpoint state-change watch
Subscribe a webhook to risk-signal state changes for one endpoint.
This HTML page is served by GET /api/v1/watch. The paid API operation remains POST /api/v1/watch.
x402 challenge example
HTTP/1.1 402 Payment Required
payment-required: <base64 PaymentRequiredResponse>
www-authenticate: x402
content-type: application/json; charset=utf-8
{
"x402Version": 2,
"error": "Payment required",
"resource": {
"url": "https://x402station.io/api/v1/watch",
"description": "Endpoint state-change watch"
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"asset": "USDC",
"amount": "10000",
"payTo": "0x4053338C7cB38624C0bc23c900F78Cf8470b4E38",
"maxTimeoutSeconds": 300
}
]
}
Request body
{
"url": "https://api.example.com/x402-endpoint",
"webhookUrl": "https://agent.example.com/x402-alerts",
"signals": [
"dead",
"zombie",
"decoy_price_extreme"
]
}
Success response
{
"watchId": "wch_123",
"secret": "ws_...",
"expiresAt": "2026-07-12T00:00:00.000Z",
"alertsRemaining": 100
}
Error codes
| status | meaning |
|---|---|
400 | Malformed JSON body, invalid URL, or missing required field. |
402 | Payment required. Decode payment-required, sign x402, retry. |
503 | Query/probe pipeline timeout. Treat as failed preflight; do not pay target blindly. |
400 | Invalid webhook URL, private-network URL, or unsupported signal. |
Notes
- Status and unsubscribe are free via /api/v1/watch/{id} with the returned secret.
- Webhook deliveries are HMAC-SHA256 signed.