Submit one user-signed Relayed-V3 transaction for co-signing and broadcast.
POST/v1/relay
The idempotency key is (tx.sender, tx.nonce) plus the SHA-256 of the canonical signing bytes.
Posting the same bytes again returns the stored response with duplicate: true and never creates a
second reservation or a second broadcast. Unknown body members are rejected. variants,
transactions and alternates give VARIANTS_NOT_SUPPORTED: one request carries one transaction,
signed once.
Once the transaction is co-signed (state COSIGNED), the answer is always 200 or 202.
Authentication: the signed transaction is the credential when the sender has an account or is an
authorised sender on chain. Relaying for arbitrary senders needs a sponsor API key.
Optional logical idempotency key (header Idempotency-Key or body member intentKey; if you send
both, the header is used). It is stored per (sender, key) for
86 400 000 ms. The same key with different bytes or a different nonce, while the first intent is not
DEAD, gives 409 INTENT_ALREADY_SUBMITTED carrying the first intent. After DEAD the key is free
again. The same key with the same bytes is an ordinary replay. The key can only reject a request, so
it never contradicts the idempotency key above. Send one key per user action, so that a retry after a
timeout cannot relay the same action twice.
Free relays: a short list of calls to the CoRelayer contract is relayed free of charge. GET /v1/pricing
publishes it as howToBuy.freeOperations. A free call to the contract while it is paused (paused or
deposits_paused, sender is not the owner) gives 503 CONTRACT_PAUSED before anything is co-signed.
Request
Responses
- 200
- 202
- 400
- 401
- 402
- 403
- 409
- 410
- 413
- 422
- 429
- 500
- 503
Co-signed and acknowledged by at least one gateway (state BROADCAST or later).
Response Headers
Request id, also the instance of a problem document and the log correlation id.
Remaining units in the current window.
Co-signed, no gateway acknowledgement within 800 ms (state COSIGNED). Re-broadcast continues server-side.
MALFORMED_REQUEST, VARIANTS_NOT_SUPPORTED, RELAYER_SIGNATURE_PRESENT, CHAIN_ID_MISMATCH, TX_VERSION_UNSUPPORTED, TX_OPTIONS_UNSUPPORTED, LEASE_MISSING, CURSOR_INVALID.
Response Headers
Request id, also the instance of a problem document and the log correlation id.
UNAUTHENTICATED, TOKEN_INVALID (details.expectedShard = 1 when the native-auth block hash is not a shard-1 block), TOKEN_EXPIRED, CHALLENGE_INVALID, API_KEY_INVALID, STREAM_TICKET_INVALID, ASSIGN_PROOF_REQUIRED, ASSIGN_PROOF_INVALID.
NO_ENTITLEMENT. Carries a PAYMENT-REQUIRED header that points at POST /v1/x402/topup.
Response Headers
x402 v2 - base64 of a JSON X402PaymentRequired.
FORBIDDEN, ORIGIN_NOT_ALLOWED, API_KEY_SCOPE, ACCOUNT_SUSPENDED, LEASE_INVALID, RECEIVER_NOT_ALLOWED, SENDER_NOT_AUTHORIZED, DEPLOY_NOT_ALLOWED, FREE_FLOW_BARRED.
LEASE_MISMATCH, LEASE_EXPIRED, NONCE_PIN_MISMATCH, RESIGN_REQUIRED, RESIGN_SAME_NONCE, INTENT_ALREADY_EXECUTED, NOTHING_TO_CANCEL, NONCE_TOO_LOW, NONCE_IN_FLIGHT, NONCE_GAP, PRICE_ABOVE_MAX, QUEUED_BLOCK_EXISTS, DOWNGRADE_NOT_IMMEDIATE, PAYG_PRICE_ABOVE_MAX, QUOTE_EXPIRED, LIMIT_REACHED, IDEMPOTENCY_IN_PROGRESS, INTENT_ALREADY_SUBMITTED (logical idempotency key; carries the first intent), FREE_FLOW_BUSY.
RELAYER_RETIRED (only when no lease flow exists; otherwise RESIGN_REQUIRED).
PAYLOAD_TOO_LARGE - request body above 131 072 bytes.
REPLACEMENT_UNDERPRICED, RELAYER_UNKNOWN, RELAYER_SHARD_MISMATCH, GAS_PRICE_OUT_OF_RANGE, GAS_LIMIT_TOO_LOW, GAS_LIMIT_TOO_HIGH, GAS_OVERPROVISIONED, DATA_TOO_LARGE, SENDER_SIGNATURE_INVALID, GUARDIAN_*, INSUFFICIENT_SENDER_BALANCE, SIMULATION_FAILED, UNSUPPORTED_TX_FIELD, TIER_NOT_PURCHASABLE, DEPOSIT_BELOW_MIN, DEPOSIT_ABOVE_MAX, WEBHOOK_URL_NOT_ALLOWED, IDEMPOTENCY_KEY_REUSED.
RATE_LIMITED, GAS_BUDGET_EXCEEDED, HOURLY_BURN_EXCEEDED, TOO_MANY_IN_FLIGHT, QUOTA_EXHAUSTED (the latter without Retry-After; details.reason = CAP_REACHED_PAYG_OFF | PAYG_ESCROW_EMPTY).
Response Headers
Seconds (HTTP standard). Millisecond precision is in details.retryAfterMs of the problem body.
Requests (or RU on the relay path) allowed in the current window.
Remaining units in the current window.
Seconds until the window resets (IETF RateLimit header fields).
INTERNAL - only before the commit point.
SWAP_VENUE_PAUSED (the exchange venue is paused), CONTRACT_PAUSED (the CoRelayer contract is paused: paused or deposits_paused; it is never reported as SWAP_VENUE_PAUSED), SWAP_BUDGET_EXHAUSTED, FREE_FLOW_UNAVAILABLE, NO_RELAYER_AVAILABLE, UPSTREAM_UNAVAILABLE (the x402 routes also return it when they cannot read their payment records), SIGNER_UNAVAILABLE, SIGNER_FENCED, SIGNER_TIMEOUT. All are answered before the commit point.
Response Headers
Seconds (HTTP standard). Millisecond precision is in details.retryAfterMs of the problem body.