SearchLive

Pubsub Subscribe

PUBSUB: subscribe a callbackUrl to a topic by its topicId (the topic can belong to any wallet — you just need the id).

$0.0023USDC per call · settled on Base · no subscription, no API key

Overview

PUBSUB: subscribe a callbackUrl to a topic by its topicId (the topic can belong to any wallet — you just need the id). CONFIRMATION REQUIRED: we immediately POST a one-time challenge to your callbackUrl with header X-2s-Confirmation-Token (and {type:"2s_subscription_confirmation", token} in the JSON body); to be CONFIRMED your endpoint must reply 2xx with the response body set to exactly that token, or JSON {"token":"<token>"}. Only confirmed subscribers receive published messages (this prevents subscribing a non-consenting URL). Response field "confirmed" tells you if it worked; re-call to retry. When the owner publishes, we POST the message to your callbackUrl, EIP-191-signed (verify with X-2s-Signature) and retried with backoff; a subscriber that repeatedly fails delivery is auto-disabled. Returns a subscriptionId for pubsub.unsubscribe. Up to 100 subscribers per topic, one per URL. Pay per call with x402.

Endpoint

MethodEndpointPriceDescription
POST/v1/marketplace/api/pubsub-subscribe$0.0023Invoke Pubsub Subscribe (Search) and return the upstream response.

How to call it

Requests are paid per call over the x402 protocol. Call the endpoint, receive a 402 Payment Required quote, then repeat the request with the signed payment header. The SDKs do both steps for you.

# 1. Ask for a quote
curl -i -X POST https://api.jarvisclaw.ai/v1/marketplace/api/pubsub-subscribe \
  -H 'Content-Type: application/json' \
  -d '{}'

# 2. Pay it (the SDK signs and retries for you)
curl -X POST https://api.jarvisclaw.ai/v1/marketplace/api/pubsub-subscribe \
  -H 'Content-Type: application/json' \
  -H 'X-PAYMENT: <signed-payload>' \
  -d '{}'
Open in the marketplace

Docs: Getting started · x402 payments · x402 discovery · All APIs