Architecture
The integration routes your MuleSoft applications to Hyperflow through two components: Flex Gateway acts as an authenticated proxy in front of Hyperflow's GraphQL endpoint, and API Experience Hub gives your enterprise developers a self-service portal to discover, request access, and manage credentials.
Hyperflow endpoint: https://api.hyperflow.finance/ethereum/graphql
Additional chains: replace ethereum with arbitrum, polygon, base, solana, etc.
Prerequisites
01Register Flex Gateway
Register your Flex Gateway instance with Anypoint Platform so it appears as an available runtime in API Manager.
- Log into Anypoint Platform → Runtime Manager → Flex Gateways
- Click Add Gateway → choose your deployment mode (Docker or Kubernetes)
- Copy the registration command — it contains your org ID and auth token
- Run the command on your gateway host (replace
my-gatewaywith your preferred name)
# Docker registration example (MuleSoft provides the full command)
docker run --rm \
-v /usr/local/share/mulesoft/flex-gateway:/usr/local/share/mulesoft/flex-gateway \
mulesoft/flex-gateway \
registration create \
--organization $ORG_ID \
--token $REGISTRATION_TOKEN \
--output-directory /usr/local/share/mulesoft/flex-gateway \
my-hyperflow-gateway
Once registered, the gateway appears under Flex Gateways in Runtime Manager with a green status indicator.
02Publish the Hyperflow API
Create an API instance in API Manager that proxies to Hyperflow's endpoint.
- Go to API Manager → Manage API → Create new API
- Asset type: HTTP API (or import the Hyperflow GraphQL spec from Exchange if available)
- Runtime: Flex Gateway → select your registered gateway
- Implementation URI:
https://api.hyperflow.finance/ethereum/graphql - Listener port: 8081 (or your preferred port)
- Click Save & Deploy
To support all Hyperflow chains, create a separate API instance per chain endpoint, or use a single instance with path routing. Contact hello@hyperflowlabs.com for a multi-chain gateway config template.
03Apply authentication policy
Configure the gateway to forward your Hyperflow API key as an upstream request header, and optionally enforce a Client ID policy for downstream callers.
Add the upstream header (inject your Hyperflow API key):
- In API Manager, select your Hyperflow API instance → Policies
- Add policy: HTTP Header Injection
- Configure an inbound header:
X-API-Key: {your-hyperflow-api-key} - Apply & save
# Flex Gateway policy config (declarative mode)
apiVersion: gateway.mulesoft.com/v1alpha1
kind: PolicyBinding
metadata:
name: hyperflow-auth-header
spec:
targetRef:
name: hyperflow-api
policyRef:
name: http-transform
config:
request:
addHeaders:
- key: "X-API-Key"
value: "{{ env.HYPERFLOW_API_KEY }}"
Enforce client credentials for downstream callers (optional):
- Add policy: Client ID Enforcement
- Header name:
Authorization(Bearer token) - Clients request access via API Experience Hub and receive credentials automatically
04Publish to API Experience Hub
Make Hyperflow discoverable to your organisation's developers through the AEH portal.
- Upload the API spec to Anypoint Exchange: go to Exchange → Publish a new asset → asset type GraphQL API → upload the Hyperflow SDL schema (available from our API docs)
- Link to API Manager: in API Manager, open your Hyperflow instance → Manage API in Exchange and select the spec you just uploaded
- Open API Experience Hub admin: go to AEH → APIs → Add API from Exchange → search "Hyperflow"
- Set visibility: Internal (your org only) or Public
- Add a description, documentation page, and contact details, then click Publish to portal
AEH requirement: Your Salesforce org must have at least 2,000 External Identity licenses and be connected to Anypoint Platform. See the AEH getting started guide for Salesforce setup steps.
Once published, developers in your org can browse the portal, request access, and receive client credentials — all without manual intervention from your team.
05Make your first query
With the gateway running, query Hyperflow through your Flex Gateway URL using standard HTTP or MuleSoft's HTTP Request connector.
# POST to http://your-flex-gateway-host:8081/ethereum/graphql
# Authorization: Bearer {client-token-from-AEH}
query WalletIntel($addr: Address!) {
wallet(address: $addr) {
balances { chain, usdValue }
transfers(last: 100) { hash, to, from }
riskScore
sanctions
firstSeen
}
}
<!-- MuleSoft HTTP Request connector -->
<http:request
method="POST"
url="http://your-flex-gateway-host:8081/ethereum/graphql"
config-ref="HTTP_Request_config">
<http:headers>
<http:header
key="Content-Type"
value="application/json"/>
<http:header
key="Authorization"
value="Bearer #[vars.clientToken]"/>
</http:headers>
<http:body>
#[output application/json ---
{ query: vars.graphqlQuery, variables: vars.queryVars }]
</http:body>
</http:request>
A successful response returns JSON with your requested onchain data — balances, transfers, risk scores — in under 500ms from Hyperflow's indexed infrastructure.
Troubleshooting
- 401 Unauthorized — Check that your Hyperflow API key is correctly injected via the HTTP Header Injection policy. Verify the key is active in your Hyperflow dashboard.
- Connection refused on port 8081 — Ensure Flex Gateway is running and the API instance status in API Manager is Active. Check firewall rules allow inbound traffic on your chosen port.
- GraphQL schema not found in Exchange — Download the SDL from our API docs and upload it manually as a GraphQL API asset in Anypoint Exchange.
- AEH portal not showing API — Confirm the API spec is linked in API Manager (Manage API in Exchange) and that your AEH admin has set visibility to the correct audience.
Still stuck? Email hello@hyperflowlabs.com — include your Anypoint org ID and Flex Gateway logs.
Need help with the integration?
Our engineering team can walk through your MuleSoft setup live.