PUBSUB: subscribe a callbackUrl to a topic by its topicId...
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.
Request
- Base URL: https://2s.io
- URL: https://2s.io/api/pubsub/subscribe
- Auth: API key in header PAYMENT-SIGNATURE
Request body
Response
Changes
No recorded changes to this operation across all 1 revision of this API.