API and WebSocket Overview
Wire-level map of every REST endpoint and Socket.IO event the backend exposes.
This page is a map of Fusion's current backend surfaces.
It is intentionally conservative:
- it describes endpoints and events that are actually exposed by the backend
- it calls out internal and test-only paths separately
- it does not assume every helper used internally is already mirrored by a server event
Health and discovery
GET /api/healthGET /api/chainsGET /api/config/htlc-addresses
Use these before enabling route-specific UI. GET /api/chains is especially useful because the backend exposes whether a chain is enabled and operational in the current runtime.
Public intent signing and submission
POST /api/intents/get-noncePOST /api/intents/get-domainPOST /api/intents/submitGET /api/intents/:intentIdGET /api/intents/:id/htlc-params
Common status values returned by the backend:
proofs_pendingproofs_verifiedmatchedwaiting_for_source_lockexecutingcompletedfailed
Gasless EVM source-lock flow
GET /api/intents/:intentId/permit2-paramsPOST /api/intents/:intentId/relay-permit
The backend allocates a Permit2 nonce per intent and rejects the flow if the intent is not ready, the proof state is incomplete, or the deadline has already expired.
Cross-family session APIs
Cross-family routes use session endpoints instead of the standard EVM source-lock path. The endpoints below are the current set for the Midnight integration — the same session-based shape will apply to other non-EVM chain families as they come online:
POST /api/midnight/source-lock/sessionsPOST /api/midnight/source-lock/sessions/:sessionId/deploy-submittedPOST /api/midnight/source-lock/sessions/:sessionId/lock-submittedPOST /api/midnight/refund/preparePOST /api/midnight/refund/sessions/:refundSessionId/submittedGET /api/midnight/balance
Other surfaces you may see
The following endpoints exist but are intended for testing or internal flows. Do not treat them as the stable public integration surface:
POST /api/intents/submit-e2eGET /api/intents/:id/preimageGET /api/intents/pending/:address
Socket.IO events
The backend WebSocketServer currently supports:
- client emits:
subscribe:intent - client emits:
unsubscribe:intent - client emits:
subscribe:all - client emits:
unsubscribe:all - client emits:
ping - server emits:
intent:status - server emits:
intent:proof - server emits:
intent:new - server emits:
intent:status_changed - server emits:
intent:proof_changed - server emits:
intent:removed - server emits:
intent:not_found - server emits:
mempool:stats - server emits:
pong - server emits:
error
See WebSocket Events for full payload schemas.
One current mismatch
Some clients listen for an intent:settlement_proof event. As of today, that event is not emitted by the backend WebSocket server. Shielded settlement still works; the event just isn't part of the current public WebSocket contract until the server implementation adds it.
Suggested integration order
Start with the core flow and add extras as needed:
- health and chain discovery
- nonce and domain fetch
- intent submit
- WebSocket subscription for status
- Permit2 flow if you need gasless EVM source locks
- cross-family session endpoints only if you are explicitly taking on a cross-family route
Related docs: