Documentation

Reference

Protocol reference

Canonical details for request headers, webhook events, and error handling on Chest Gate.

Last updated April 22, 2026

This page documents wire-level details. Use it alongside the API provider and skill / MCP author guides. Those guides explain when to reach for each header. This page explains what each one does.

Request headers

Headers you may send or observe on paid requests. Combine as appropriate per the guides.

HeaderDirectionPurpose
X-Chest-Referrer-Key: cg_pub_live_...RequestAPI-key attribution path. One key per integration partner.
X-Referrer-WalletRequestReferrer wallet address, paired with a signature header.
X-Referrer-SigRequestSignature over the request canonicalization. Validates wallet ownership.
X-PaymentRequestBase64-encoded x402 payment payload.
X-Payment-ResponseResponseSettlement receipt including on-chain transaction reference.

Webhook events

Events are delivered to your registered webhook URL. Consumers must be idempotent by deliveryId, deliveries retry with exponential backoff and eventually dead-letter.

EventWhen it firesKey payload fields
call.attributedAttribution resolved (seconds after request).callId, slug, referrer
call.settledSettlement + split distribution finalized on-chain.callId, distributeTx, split
call.failedSettlement or downstream distribution failed.callId, reason, retryable

Error classes

HTTP status codes you should expect to see and how to respond to each.

StatusMeaningClient action
401 UnauthorizedInvalid or missing auth material.Check API key scope, signature validity, or wallet ownership.
402 Payment RequiredMissing or invalid payment payload.Retry with a valid X-Payment header.
409 ConflictHandle already taken, or resource state conflicts.Pick a different handle; do not retry the same request.
429 Too Many RequestsRate limit exceeded for your caller tier.Honor Retry-After and back off.

Limits and retries

  • Webhook deliveries retry with exponential backoff and eventually dead-letter.
  • Proxy requests are rate-limited by caller tier: API key > signed headers > unsigned.
  • Downstream consumers must be idempotent by deliveryId.