Webhook functionality is available for Growth and Enterprise plans only.

Webhook Overview

Mobula provides Webhook support to receive blockchain events in real-time. Currently, you can capture curated events like Swaps and Transfers across EVM, Solana, and SVM chains.

Product demo

Coming soon.

Endpoint Details

  • URL: https://api.mobula.io/api/1/webhook
  • Method: POST
  • Body (JSON): Same as the Webhook example
{
    "name": "MyFirstWebhook",
    "chainIds": ["evm:1", "evm:56"],
    "events": ["swap", "transfer"],
    "apiKey": "xxxxxxxxxx",
    "url": "https://webhook.com/xxxxxxxxxxx",
};

Parameters

ParameterTypeDescription
namestringA unique name for your webhook.
chainIdsstring[]Blockchain identifiers. Supported chains: EVM, Solana. Example: ["evm:1", "evm:8453", "solana:solana"]. More info
eventsstring[]Event types to subscribe to. Currently supported: "swap", "transfer"
filtersobjectOptional filters to refine which events are sent. See Filters Documentation
urlstringThe destination URL where Mobula will POST the event payloads.
apiKeystringYour API key to authenticate the webhook request.

Create a webhook

First we need to create a webhook:
await fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Sample Swap Webhook',
    chainIds: ['solana:solana'],
    events: ['swap'],
    filters: {
      or: [{ eq: ['poolType', 'raydium'] }, { eq: ['poolType', 'raydium-clmm'] }],
    },
    apiKey: 'YOUR API KEY',
    url: 'YOUR SERVER URL',
  }),
});
The API key is mandatory to create a webhook.
A successful webhook creation returns:
{
  id: "********-****-****-****-************",
  name: "Sample Swap Webhook",
  chainIds: [ "solana:solana" ],
  events: [ "swap" ],
  filters: {
    or: [
      [Object ...], [Object ...]
    ],
  },
  webhookUrl: "YOUR SERVER URL",
  createdAt: "2025-08-22T05:39:06.438Z",
  apiKey: "YOUR API KEY",
}
Your webhook is now active and will start sending events to the specified server URL.
If you receive data from your webhook in response, then your webhook is functional and will start receiving events.

List out Registered Webhooks

You can retrieve all registered webhooks using your API key:
curl -X GET "https://api.mobula.io/api/1/webhook?apiKey=YOUR_API_KEY"

Delete a webhook

To delete a webhook, use the webhook ID:
await fetch(url + `/${webhook_id}`, {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
  },
});
If you receive:
{
  "success": true,
  "message": "Webhook deleted successfully",
  "id": "WEBHOOK_ID"
}

Usage Examples

Before diving into the examples, make sure to check the data models for both EVM and SVM chains for swaps and transfers.
Pro Tip for Devs: Dive into these data models and experiment with filters — your imagination is the only limit! Mix and / or, combine keys, and watch your streams come alive!
  • Explore poolType, poolAddress, transactionFrom, transactionTo, and other keys in the data models.
  • Combine multiple conditions using and / or operators to capture exactly the events you want.
  • Mix and match filters across swaps and transfers to suit your application needs.

Sample Swap Filters

The filter logic and data model are the same for SVM and EVM swaps.
Check out the curated swap model: EVM transfers model.
Here is a basic template for creating a webhook:
{
    "name": "MyFirstWebhook",
    "chainIds": ["solana:solana"],
    "events": ["swap"],
    "apiKey": "YOUR_API_KEY",
    "filters": {},
    "url": "YOUR_SERVER_URL"
}

Filter Swaps by Token Address

This example captures all swaps involving the $SPARK token 5zCETicUCJqJ5Z3wbfFPZqtSpHPYqnggs1wX7ZRpump from all supported pools on Solana:
{
  "filters": {
    "or": [
      { "eq": ["addressToken0", "5zCETicUCJqJ5Z3wbfFPZqtSpHPYqnggs1wX7ZRpump"] },
      { "eq": ["addressToken1", "5zCETicUCJqJ5Z3wbfFPZqtSpHPYqnggs1wX7ZRpump"] }
    ]
  }
}

Filter Swaps by Minimum USD Value

This example captures all large swaps of the $SPARK token worth more than $25 USD:
"filters": {
  "or": [
    {
      "and": [
        { "eq": ["addressToken1", "5zCETicUCJqJ5Z3wbfFPZqtSpHPYqnggs1wX7ZRpump"] },
        { "gte": ["amountUSD", "1000"] }
      ]
    },
    {
      "and": [
        { "eq": ["addressToken0", "5zCETicUCJqJ5Z3wbfFPZqtSpHPYqnggs1wX7ZRpump"] },
        { "gte": ["amountUSD", "1000"] }
      ]
    }
  ]
}

Track Multiple Whales swaps by Single Webhook

This example captures all swaps from specific wallet addresses:
{
  "filters": {
    "or": [
      { "eq": ["swapSenderAddress", "8zFZHuSRuDpuAR7J6FzwyF3vKNx4CVW3DFHJerQhc7Zd"] },
      { "eq": ["swapSenderAddress", "DWvAGkfeHTNd2SWkQh6LsaxEmR3TLn1VuxCZiyb1r98Z"] },
      { "eq": ["swapSenderAddress", "H1gJR25VXi5Ape1gAU7fTWzZFWaCpuP3rzRtKun8Dwo2"] },
      { "eq": ["swapSenderAddress", "7Lp4JBapgNhXoxpJtR2twufh7oaQyqngqJpy7HFJcn7h"] }
    ]
  }
}

Track Multiple Whales by Token or Swap Amount

This example captures swaps from specific wallet addresses and filters by swap amount in USD:
"filters": {
  "or": [
    {
      "and": [
        { "eq": ["swapSenderAddress", "8zFZHuSRuDpuAR7J6FzwyF3vKNx4CVW3DFHJerQhc7Zd"] },
        { "gte": ["amountUSD", "2500"] }
      ]
    },
    {
      "and": [
        { "eq": ["swapSenderAddress", "DWvAGkfeHTNd2SWkQh6LsaxEmR3TLn1VuxCZiyb1r98Z"] },
        { "gte": ["amountUSD", "1000"] }
      ]
    },
    {
      "and": [
        { "eq": ["swapSenderAddress", "H1gJR25VXi5Ape1gAU7fTWzZFWaCpuP3rzRtKun8Dwo2"] },
        { "gte": ["amountUSD", "3000"] }
      ]
    },

  ]
}

Sample Transfer Filters

The filter logic is the same for both SVM and EVM transfers
For EVM transfers, just update the identifiers according to the EVM transfers model.
Here is a basic template for creating a webhook for transfers:
{
  "name": "MyFirstWebhook",
  "chainIds": ["solana:solana"],
  "events": ["transfer"],
  "apiKey": "YOUR_API_KEY",
  "filters": {},
  "url": "YOUR_SERVER_URL"
}

Filter Transfer by Multiple Wallets

This example captures all transfers from multiple wallets, with some conditions on the transfer amount (e.g., amountUSD greater than 200 or 300):
{
  "filters": {
    "or": [
      { "eq": ["transactionFrom", "ASde6y8pBCU1aityWHRpqT7pEAcEonjCgFUMeh5egRes"] },
      { "eq": ["transactionFrom", "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"] },
      { "eq": ["transactionFrom", "5zf7uryG7jXMEnKvSM2WmmHcJu3Q2fXBpUjZkE7XC2Xr"] },
      { "eq": ["transactionFrom", "CSSJFgoeqidqVtHKSNP7i7s6WX8APHfH2kYGdLV195Jb"] },
      {
        "and": [
          { "eq": ["transactionFrom", "H1gJR25VXi5Ape1gAU7fTWzZFWaCpuP3rzRtKun8Dwo2"] },
          { "gte": ["amount", "3000"] }
        ]
      },
      {
        "and": [
          { "eq": ["transactionTo", "5e7u41Ykt3WgnbJaQutMX9b7LZM4qh9Qsd5Y7RTsP5t4"] },
          { "lte": ["amount", "1"] }
        ]
      }
    ]
  }
}

Filter Transfers by Sender

This stream captures all transfers sent to a specific address:
{
  "filters": {
    "eq": ["transactionTo", "ASde6y8pBCU1aityWHRpqT7pEAcEonjCgFUMeh5egRes"]
  }
}

Filter Transfers From Sender and Receiver (End-to-End)

This example demonstrates how to capture all transfers sent from or received by specific addresses, combining multiple conditions in a single webhook.
{
  "filters": {
    "or": [
      {
        "and": [
          { "eq": ["transactionFrom", "2zqLokC98qfedXyXZHeL4sEdFcmmTFizvb1UQeRweWxp"] },
          { "eq": ["transactionTo", "suqh5sHtr8HyJ7q8scBimULPkPpA557prMG47xCHQfK"] }
        ]
      },
      {
        "and": [
          { "eq": ["transactionFrom", "3i51cKbLbaKAqvRJdCUaq9hsnvf9kqCfMujNgFj7nRKt"] },
          { "eq": ["transactionTo", "bangc1iPWdP4b6zNGf4yAsJm21KVH8sic71dFosH8AQ"] }
        ]
      }
    ]
  }
}

Can’t find what you’re looking for? Reach out to us, response times < 1h.