Catalog subscriptions and RSS
Subscribe to a category, a listing, or both. When both are supplied, they combine with AND. Supported events are listing_published, listing_updated, listing_removed and price_changed. Events concern committed public changes; private drafts, provider credentials and moderation details stay private.
Create and manage subscriptions
Sign in and create an agent key at Agent keys, selecting Manage catalog subscriptions. Trial-only keys cannot manage subscriptions, and existing keys keep their scopes. Every management request uses Authorization: Bearer <agent key>. Ownership is enforced by account; another account cannot inspect, modify, rotate or delete your subscription.
# Create: category, listing (stable ID or public slug), or both
curl -X POST "$ORIGIN/api/subscriptions" -H "Authorization: Bearer $AGENT_KEY" -H 'Content-Type: application/json' \
-d '{"category":"finance","endpointUrl":"https://your.example/hooks/agentmarket","events":["listing_published","listing_updated","listing_removed","price_changed"]}'
# List your subscriptions
curl "$ORIGIN/api/subscriptions" -H "Authorization: Bearer $AGENT_KEY"
# Replace configuration, or pause (full configuration required)
curl -X PUT "$ORIGIN/api/subscriptions/SUBSCRIPTION_ID" -H "Authorization: Bearer $AGENT_KEY" -H 'Content-Type: application/json' \
-d '{"category":"finance","endpointUrl":"https://your.example/hooks/agentmarket","events":["price_changed"],"paused":true}'
# Inspect up to 50 delivery records and their attempts; paginate with nextCursor
curl "$ORIGIN/api/subscriptions/SUBSCRIPTION_ID/deliveries" -H "Authorization: Bearer $AGENT_KEY"
# Rotate: copy the returned secret once
curl -X POST "$ORIGIN/api/subscriptions/SUBSCRIPTION_ID/rotate-secret" -H "Authorization: Bearer $AGENT_KEY"
# Unsubscribe: deletes the subscription and its queued deliveries/logs
curl -X DELETE "$ORIGIN/api/subscriptions/SUBSCRIPTION_ID" -H "Authorization: Bearer $AGENT_KEY"Creation returns subscription metadata and a generated whsec_ signing secret, shown only once. List/update/log responses never return it. Signing secrets are encrypted at rest using a key derived from AUTH_SECRET. Rotating AUTH_SECRET makes existing stored webhook secrets unreadable; rotate affected subscriptions and update consumers afterwards. Rotation returns a new secret and key version; retries use the current secret. Allow the prior secret briefly (up to five minutes) for already in-flight requests.
A subscription starts after the committed catalog boundary captured during creation; it does not replay older events. Replacing configuration, pausing or resuming applies to future events and cancels queued/in-flight leases for the prior configuration. Already transmitted requests may finish, so consumers must still deduplicate. Rotation preserves pending deliveries and event IDs. Revoking an agent key prevents management with that key but does not unsubscribe existing hooks; use another scoped key from the same account to manage them.
Limits: 20 subscriptions per account, including paused subscriptions; 60 management requests/minute/account and the shared 60 requests/minute/IP guard. Request bodies are capped at 6 KB. Rate guards are in-memory per server instance; quotas are enforced transactionally in the database. HTTP 401 indicates missing/wrong key scope, 404 hides subscriptions not owned by the caller, and 429 indicates quota/rate limits. Rate-limit responses include Retry-After. Configure a public HTTPS destination on port 443, with no credentials, query string or fragment. DNS and connection-time IP validation prevent private/local destinations and rebinding; redirects are not followed.
Payloads, signatures and deduplication
{
"schemaVersion": 1,
"eventId": "catalog:123:price_changed",
"eventType": "price_changed",
"listingId": "stable-listing-id",
"slug": "example",
"changedAt": "2026-11-03T00:00:00.000Z",
"summary": "Published pricing or free-tier allowance changed",
"url": "https://agentmarket.trade/products/example",
"historyUrl": "https://agentmarket.trade/api/products/example/history"
}Each request includes X-AgentMarket-Event-Id, X-AgentMarket-Timestamp (Unix seconds), X-AgentMarket-Key-Id (secret version), and X-AgentMarket-Signature: v1=<hex HMAC-SHA256>. Compute the HMAC with the full whsec_ secret as the UTF-8 key over the exact timestamp, a dot, and the raw request bytes. Do not parse/re-serialize JSON before checking the signature. Use constant-time comparison and reject timestamps outside a five-minute window.
import { createHmac, timingSafeEqual } from 'node:crypto';
const expected = 'v1=' + createHmac('sha256', secret)
.update(timestamp + '.').update(rawBody).digest('hex');
const received = Buffer.from(signature);
const valid = /^\d{10}$/.test(timestamp)
&& Math.abs(Date.now() - Number(timestamp) * 1000) <= 300000
&& received.length === Buffer.byteLength(expected)
&& timingSafeEqual(received, Buffer.from(expected));
// Check valid, then atomically record eventId before applying the event.Retries keep the exact body and eventId, but use a new send timestamp/signature and the current secret version. Delivery is at least once, not exactly once: a receiver may process a request before its response is lost. Persist event IDs and handle repeats safely. A price change produces both listing_updated and price_changed if you subscribed to both; their event IDs differ by event type. The same catalog event ID can appear in separate subscriptions. Ordering across subscriptions/retries is not guaranteed; compare catalog sequence or fetch current details to reconcile state.
Price events reflect public plan amounts, models, currency, billing units/periods and free-tier terms; evidence-only verification refreshes do not create price events. Category moves notify the old and new categories as listing updates. Unpublication/deletion retain last-public category/slug for matching. Removal links may return 404. A reference to a previously public listing can be used to monitor republication. Category and price attribution before this feature's rollout is unknown and is not invented.
Delivery, retries and logs
Return any 2xx response to acknowledge. Network/timeouts, 408, 429 and 5xx are retried after 1, 2, 4, 8 and 16 minutes, with at most six total attempts. Other 4xx, redirects and unsafe destinations fail permanently. Calls time out after five seconds; responses are bounded and bodies are discarded. Workers use 60-second leases and recover crashed attempts; expired leases appear in the attempt log. Events older than 24 hours stop retrying.
Owner-only logs show pending, sending, delivered, failed or canceled state, attempt count, next attempt time, HTTP status and coarse outcomes. They contain no signing secret, authorization header, response body or raw network error. Delivery bodies/logs are removed on unsubscribe and become eligible for deletion after 30 days on worker runs. To recover after a terminal failure, correct the endpoint and use the catalog changes API to reconcile missed state; configuration changes do not replay old events.
A2A 1.0 catalog push
The agent card advertises pushNotifications: true. Use JSON-RPC at /api/a2a with Content-Type: application/json, A2A-Version: 1.0 and Authorization: Bearer <agent key with subscriptions scope>. Public directory discovery continues to return a single message. The subscribe-catalog-events skill creates a durable working task that survives server restarts.
{
"jsonrpc": "2.0",
"id": 1,
"method": "SendMessage",
"params": {
"message": {
"messageId": "watch-finance-1",
"role": "ROLE_USER",
"parts": [
{
"data": {
"skill": "subscribe-catalog-events",
"category": "finance",
"events": [
"listing_published",
"listing_updated",
"listing_removed",
"price_changed"
]
}
}
]
}
}
}Read result.task.id, then register an endpoint on that task. Choose category, listing (public slug or stable ID), or both. Events default to all four types; matching and event IDs are identical to webhooks and RSS. Unpublication and deletion map to listing_removed. Watches are limited to 20 active tasks per account; cancel unused tasks. Repeating SendMessage creates another watch, so retain the returned task ID.
{
"jsonrpc": "2.0",
"id": 2,
"method": "CreateTaskPushNotificationConfig",
"params": {
"taskId": "TASK_ID",
"url": "https://receiver.example/a2a-events",
"authentication": {
"scheme": "Bearer",
"credentials": "YOUR_RANDOM_RECEIVER_SECRET_AT_LEAST_32_CHARACTERS"
}
}
}The receiver credential is separate from your AgentMarket agent key. Generate at least 32 random printable ASCII characters without spaces (maximum 2048), keep it secret, and configure it at your receiver. Bearer authentication sends Authorization: Bearer <credentials>. Alternatively omit authentication and supply token; delivery then sends X-A2A-Notification-Token. Other authentication schemes and combining token with authentication are rejected. Credentials are encrypted at rest and write-only: create/get/list responses never return them.
Registration validates the HTTPS URL; every delivery resolves and pins public DNS/IP addresses, rejects redirects and private destinations, and uses the existing timeout and response-size limits. Registration does not perform a callback ownership challenge or certify that the receiver is reachable. The receiver must verify its configured credential and the signature before accepting a delivery; a successful 2xx delivery is the acknowledgment. No network request is sent during registration.
The server assigns a config ID in result.id. Use the following standard A2A methods with the same account key. Watch tasks and configs are account-owned; other accounts cannot read, change or cancel them.
GetTask {"id":"TASK_ID"}
CreateTaskPushNotificationConfig {"taskId":"TASK_ID","url":"https://receiver.example/a2a-events","token":"YOUR_RANDOM_RECEIVER_SECRET_AT_LEAST_32_CHARACTERS"}
GetTaskPushNotificationConfig {"taskId":"TASK_ID","id":"CONFIG_ID"}
ListTaskPushNotificationConfigs {"taskId":"TASK_ID","pageSize":20}
DeleteTaskPushNotificationConfig {"taskId":"TASK_ID","id":"CONFIG_ID"}
CancelTask {"id":"TASK_ID"}List responses contain configs and an optional nextPageToken; pass it as pageToken for the next page (default 20, maximum 100). Config IDs are server assigned: omit id on create. To change an endpoint or rotate the receiver credential, delete its config and create a replacement. Watches keep working without a config. CancelTask is idempotent, returns TASK_STATE_CANCELED, deletes its configs and queued deliveries, and blocks future registration. Deleting a config stops future notifications and removes its queue/logs; an HTTP request already in flight may still arrive. Events begin after each registration and are not replayed.
There is one shared limit of 20 webhook/A2A endpoints per account and a limit of 60 watch operations per account per minute, plus the public IP limit. Configs appear in /api/subscriptions with a2aTaskId, and their existing delivery logs remain available. REST deletion also unregisters an A2A endpoint. REST updates and secret rotation reject A2A configs; use the A2A methods to preserve task scope and authentication.
Push POSTs use Content-Type: application/a2a+json and the A2A 1.0 StreamResponse statusUpdate envelope. Each update keeps the task working and carries the public catalog event as a data part. It contains no draft content, agent key, receiver credential or private owner data.
{
"statusUpdate": {
"taskId": "TASK_ID",
"contextId": "TASK_ID",
"status": {
"state": "TASK_STATE_WORKING",
"timestamp": "2026-11-03T00:00:00.000Z",
"message": {
"messageId": "catalog:123:price_changed",
"role": "ROLE_AGENT",
"taskId": "TASK_ID",
"contextId": "TASK_ID",
"parts": [
{
"data": {
"schemaVersion": 1,
"eventId": "catalog:123:price_changed",
"eventType": "price_changed",
"listingId": "PUBLIC_ID",
"slug": "example",
"changedAt": "2026-11-03T00:00:00.000Z",
"summary": "Published pricing or free-tier allowance changed",
"url": "https://agentmarket.trade/products/example",
"historyUrl": "https://agentmarket.trade/api/products/example/history"
}
}
]
}
},
"metadata": {
"eventId": "catalog:123:price_changed"
}
}
}The X-AgentMarket signing headers described above also accompany A2A requests. For A2A only, use your supplied receiver credential as the HMAC key. Verify the exact raw envelope bytes with the timestamp and reject stale signatures. Deduplicate by eventId within each config (one public event can be delivered to multiple tasks/configs). The shared worker preserves exact envelope bytes across retries; attempts, lease recovery, terminal failures, retention and ordering follow the same webhook rules. A2A creates no separate event feed or worker. The operator scheduler described below is required for both formats.
Supported binding: A2A 1.0 JSON-RPC. Streaming, tenants, inline configuration.taskPushNotificationConfig, task continuation through SendMessage, and ListTasks are unsupported. Start a new watch without taskId/contextId and register with CreateTaskPushNotificationConfig in a second call. GetTask returns current state and scope without message history. Reconcile missed events through the public catalog change feed; replacing a config does not replay history.
Public RSS
GET /api/rss GET /api/rss?category=finance GET /api/rss?listing=PUBLIC_SLUG_OR_ID&events=price_changed GET /api/rss?category=finance&listing=PUBLIC_SLUG_OR_ID&events=listing_updated,listing_removed
RSS 2.0 requires no account or signing secret and creates no persistent subscription. It exposes up to 100 corresponding public events from the last 90 days with stable GUIDs, UTC publication dates and canonical links. It shares the public IP rate limit. Treat historical links as potentially unavailable. RSS is a recent read-only window; use the catalog change feed/checkpoints for complete synchronization.
Operator setup
Webhook delivery requires a recurring worker. Deploy migrations, set DATABASE_URL and AUTH_SECRET, and configure a scheduler to call POST /api/jobs/subscriptions every minute with Authorization: Bearer <CRON_SECRET>. GET is supported for scheduler services that require it. This worker credential is separate from user agent keys. The provisioning script generates CRON_SECRET once, but does not register a scheduler or change a hosting plan.
# Run this command from your scheduler with ORIGIN and CRON_SECRET injected securely: curl --fail -X POST "$ORIGIN/api/jobs/subscriptions" -H "Authorization: Bearer $CRON_SECRET" # Or run a database-connected worker directly from the repository: npx tsx scripts/deliver-subscriptions.ts
The HTTP worker processes up to 10 due deliveries per run (20 with the CLI), so schedule enough capacity for the observed queue. Concurrent runs are lease-safe. Deployment configuration must explicitly supply the scheduler; successful subscription creation alone does not mean a worker is active. Without CRON_SECRET the HTTP worker returns 503. No customer webhooks are sent during setup or tests unless a real worker is run against their queue.