HF + MS
Integration Guide

Connect Hyperflow to MuleSoft

Expose Hyperflow's onchain data API through MuleSoft Flex Gateway and publish it to your API Experience Hub portal — so your enterprise teams can discover, access, and govern it natively within Anypoint Platform.

Flex Gateway API Experience Hub Anypoint Platform GraphQL
Overview

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.

Your App
MuleSoft / HTTP
HTTPS
Flex Gateway
Auth · Rate limit
HTTPS
Hyperflow API
GraphQL · WS · REST

Hyperflow endpoint: https://api.hyperflow.finance/ethereum/graphql
Additional chains: replace ethereum with arbitrum, polygon, base, solana, etc.

Before you start

Prerequisites

Anypoint Platform account with admin or API Manager permissions
Flex Gateway installed and running (Docker or Kubernetes)
Hyperflow API key — obtain from your Hyperflow dashboard
API Experience Hub (optional) — requires a connected Salesforce org with 2,000+ External Identity licenses
Step 1 of 5

01Register Flex Gateway

Register your Flex Gateway instance with Anypoint Platform so it appears as an available runtime in API Manager.

  1. Log into Anypoint PlatformRuntime ManagerFlex Gateways
  2. Click Add Gateway → choose your deployment mode (Docker or Kubernetes)
  3. Copy the registration command — it contains your org ID and auth token
  4. Run the command on your gateway host (replace my-gateway with your preferred name)
terminal bash
# 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.

Step 2 of 5

02Publish the Hyperflow API

Create an API instance in API Manager that proxies to Hyperflow's endpoint.

  1. Go to API ManagerManage APICreate new API
  2. Asset type: HTTP API (or import the Hyperflow GraphQL spec from Exchange if available)
  3. Runtime: Flex Gateway → select your registered gateway
  4. Implementation URI: https://api.hyperflow.finance/ethereum/graphql
  5. Listener port: 8081 (or your preferred port)
  6. 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.

Step 3 of 5

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):

  1. In API Manager, select your Hyperflow API instance → Policies
  2. Add policy: HTTP Header Injection
  3. Configure an inbound header: X-API-Key: {your-hyperflow-api-key}
  4. Apply & save
policy-config.yaml yaml
# 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):

  1. Add policy: Client ID Enforcement
  2. Header name: Authorization (Bearer token)
  3. Clients request access via API Experience Hub and receive credentials automatically
Step 4 of 5

04Publish to API Experience Hub

Make Hyperflow discoverable to your organisation's developers through the AEH portal.

  1. 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)
  2. Link to API Manager: in API Manager, open your Hyperflow instance → Manage API in Exchange and select the spec you just uploaded
  3. Open API Experience Hub admin: go to AEH → APIsAdd API from Exchange → search "Hyperflow"
  4. Set visibility: Internal (your org only) or Public
  5. 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.

Step 5 of 5

05Make your first query

With the gateway running, query Hyperflow through your Flex Gateway URL using standard HTTP or MuleSoft's HTTP Request connector.

wallet-query.graphql graphql
# 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
  }
}
mule-http-request.xml xml
<!-- 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.

Help

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.