﻿{"openapi":"3.0.0","paths":{"/webhooks/rest/v1/webhooks/{id}":{"patch":{"operationId":"update","summary":"Update a webhook","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookDto"}}}},"responses":{"200":{"description":""}},"tags":["Webhooks"],"security":[{"x-api-key":[]}]},"get":{"operationId":"findOne","summary":"Retrieve a webhook by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Webhooks"],"security":[{"x-api-key":[]}]},"delete":{"operationId":"remove","summary":"Remove a webhook by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Webhooks"],"security":[{"x-api-key":[]}]}},"/webhooks/rest/v1/webhooks/template/{templateId}":{"post":{"operationId":"createWebhookFromTemplate","summary":"Create webhook from template","parameters":[{"name":"templateId","required":true,"in":"path","schema":{"type":"string","enum":["evmWalletFilter","evmContractEvents","evmAbiFilter","solanaWalletFilter","bitcoinWalletFilter","xrplWalletFilter","hyperliquidWalletEventsFilter","stellarWalletTransactionsSourceAccountFilter"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookFromTemplateDto"}}}},"responses":{"201":{"description":""}},"tags":["Webhooks"],"security":[{"x-api-key":[]}]}},"/webhooks/rest/v1/webhooks/{webhookId}/template/{templateId}":{"patch":{"operationId":"updateWebhookTemplate","summary":"Update a webhook template","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}},{"name":"templateId","required":true,"in":"path","schema":{"type":"string","enum":["evmWalletFilter","evmContractEvents","evmAbiFilter","solanaWalletFilter","bitcoinWalletFilter","xrplWalletFilter","hyperliquidWalletEventsFilter","stellarWalletTransactionsSourceAccountFilter"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookTemplateDto"}}}},"responses":{"200":{"description":""}},"tags":["Webhooks"],"security":[{"x-api-key":[]}]}},"/webhooks/rest/v1/webhooks/{id}/pause":{"post":{"operationId":"pauseStream","summary":"Pause webhook","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Webhooks"],"security":[{"x-api-key":[]}]}},"/webhooks/rest/v1/webhooks/{id}/activate":{"post":{"operationId":"activateStream","summary":"Activate webhook","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateWebhookDto"}}}},"responses":{"201":{"description":""}},"tags":["Webhooks"],"security":[{"x-api-key":[]}]}},"/webhooks/rest/v1/webhooks/enabled_count":{"get":{"operationId":"getEnabledWebhooks","summary":"Retrieve enable webhooks","parameters":[],"responses":{"200":{"description":""}},"tags":["Webhooks"],"security":[{"x-api-key":[]}]}},"/webhooks/rest/v1/webhooks":{"get":{"operationId":"findAll","summary":"Retrieve all webhooks","parameters":[{"name":"limit","required":true,"in":"query","schema":{"default":20,"type":"number"}},{"name":"offset","required":true,"in":"query","schema":{"default":0,"type":"number"}}],"responses":{"200":{"description":""}},"tags":["Webhooks"],"security":[{"x-api-key":[]}]},"delete":{"operationId":"removeWebhooksByAccountId","summary":"Remove all webhooks","parameters":[],"responses":{"200":{"description":""}},"tags":["Webhooks"],"security":[{"x-api-key":[]}]}}},"info":{"title":"Webhooks REST API","description":"","version":"1.0","contact":{}},"tags":[{"name":"Webhooks","description":""}],"servers":[],"components":{"securitySchemes":{"x-api-key":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"UpdateWebhookDto":{"type":"object","properties":{"name":{"type":"string","example":"My Webhook"},"notification_email":{"type":"string","example":"contact@example.com","description":"Notify when webhook is terminated"},"destination_attributes":{"oneOf":[{"$ref":"#/components/schemas/WebhookAttributes"}],"example":{"url":"http://localhost:8080/test","security_token":"sample-security-token","compression":"none"}}}},"CreateWebhookFromTemplateDto":{"type":"object","properties":{"name":{"type":"string","example":"My Webhook"},"network":{"type":"string","enum":["abstract-mainnet","abstract-testnet","arbitrum-mainnet","arbitrum-sepolia","arc-testnet","arc-mainnet","ault-mainnet","ault-testnet","avalanche-fuji","avalanche-mainnet","b3-mainnet","b3-sepolia","base-mainnet","base-sepolia","bera-mainnet","bera-bepolia","bch-mainnet","bch-testnet","bitcoin-mainnet","bitcoin-testnet4","blast-mainnet","blast-sepolia","bnbchain-mainnet","bnbchain-testnet","celo-mainnet","cyber-mainnet","cyber-sepolia","doge-mainnet","ethereum-hoodi","ethereum-mainnet","ethereum-sepolia","fantom-mainnet","flare-mainnet","flare-testnet","flow-mainnet","flow-testnet","fluent-testnet","fraxtal-mainnet","gnosis-mainnet","gravity-alpham","hedera-mainnet","hedera-testnet","hemi-mainnet","hemi-testnet","hyperevm-mainnet","hyperevm-testnet","hypercore-mainnet","imx-mainnet","imx-testnet","injective-mainnet","injective-testnet","ink-mainnet","ink-sepolia","joc-mainnet","kaia-mainnet","kaia-testnet","katana-mainnet","lens-mainnet","lens-testnet","linea-mainnet","lisk-mainnet","ltc-mainnet","ltc-testnet","mantle-mainnet","mantle-sepolia","megaeth-mainnet","moca-testnet","mode-mainnet","monad-mainnet","monad-testnet","morph-hoodi","morph-mainnet","nova-mainnet","optimism-mainnet","optimism-sepolia","peaq-mainnet","plasma-testnet","plasma-mainnet","polygon-amoy","polygon-mainnet","robinhood-testnet","robinhood-mainnet","sahara-testnet","scroll-mainnet","scroll-testnet","sei-mainnet","sei-testnet","solana-devnet","solana-mainnet","solana-testnet","soneium-mainnet","sonic-mainnet","sophon-mainnet","stellar-mainnet","stellar-testnet","story-aeneid","story-mainnet","tempo-mainnet","tempo-testnet","tron-mainnet","tron-nile","unichain-mainnet","unichain-sepolia","vana-mainnet","vana-moksha","worldchain-mainnet","worldchain-sepolia","xai-mainnet","xai-sepolia","xlayer-mainnet","xlayer-testnet","xrp-mainnet","xrp-testnet","xrplevm-mainnet","xrplevm-testnet","zerog-galileo","zerog-mainnet","zec-mainnet","zec-testnet","zkevm-cardona","zkevm-mainnet","zksync-mainnet","zksync-sepolia","zora-mainnet"],"example":"ethereum-mainnet"},"notification_email":{"type":"string","example":"contact@example.com","description":"Notify when webhook is terminated"},"destination_attributes":{"oneOf":[{"$ref":"#/components/schemas/WebhookAttributes"}],"example":{"url":"http://localhost:8080/test","security_token":"sample-security-token","compression":"none"}},"templateArgs":{"description":"Arguments for the selected template. Provide inline values (e.g. an array of wallet addresses) or reference names of pre-created lists (e.g. walletsListName).","oneOf":[{"$ref":"#/components/schemas/EVMWalletFilterTemplate"},{"$ref":"#/components/schemas/EVMContractEventsTemplate"},{"$ref":"#/components/schemas/SolanaWalletFilterTemplate"},{"$ref":"#/components/schemas/BitcoinWalletFilterTemplate"},{"$ref":"#/components/schemas/EVMABIFilterTemplate"},{"$ref":"#/components/schemas/XRPLWalletFilterTemplate"},{"$ref":"#/components/schemas/HyperliquidWalletEventsFilterTemplate"},{"$ref":"#/components/schemas/StellarWalletTransactionsFilterTemplate"},{"$ref":"#/components/schemas/EVMWalletFilterByListTemplate"},{"$ref":"#/components/schemas/EVMContractEventsByListTemplate"},{"$ref":"#/components/schemas/SolanaWalletFilterByListTemplate"},{"$ref":"#/components/schemas/BitcoinWalletFilterByListTemplate"},{"$ref":"#/components/schemas/EVMABIFilterByListTemplate"},{"$ref":"#/components/schemas/XRPLWalletFilterByListTemplate"},{"$ref":"#/components/schemas/HyperliquidWalletEventsFilterByListTemplate"},{"$ref":"#/components/schemas/StellarWalletTransactionsFilterByListTemplate"}],"examples":{"List reference — wallets":{"summary":"List reference — walletsListName points to a pre-created list","value":{"walletsListName":"my_wallets_list"}},"List reference — contract events":{"summary":"List reference — contractsListName and eventHashesListName point to pre-created lists","value":{"contractsListName":"my_contracts_list","eventHashesListName":"my_event_hashes_list"}},"Inline wallet addresses":{"summary":"Inline values — wallet addresses provided directly","value":{"wallets":["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"]}},"Inline contract events":{"summary":"Inline values — contract addresses and event hashes provided directly","value":{"contracts":["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],"eventHashes":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}}}}},"required":["name","network","destination_attributes","templateArgs"]},"WebhookAttributes":{"type":"object","properties":{"url":{"type":"string"},"security_token":{"type":"string"},"compression":{"type":"string"}},"required":["url","security_token","compression"]},"EVMWalletFilterTemplate":{"type":"object","properties":{"wallets":{"example":["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],"description":"Wallets","type":"array","items":{"type":"string"}}},"required":["wallets"]},"EVMContractEventsTemplate":{"type":"object","properties":{"contracts":{"example":["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],"description":"Contracts","type":"array","items":{"type":"string"}},"eventHashes":{"example":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"description":"Event hashes","type":"array","items":{"type":"string"}}}},"SolanaWalletFilterTemplate":{"type":"object","properties":{"accounts":{"description":"Accounts","type":"array","items":{"type":"string"}}},"required":["accounts"]},"BitcoinWalletFilterTemplate":{"type":"object","properties":{"wallets":{"description":"Wallets","type":"array","items":{"type":"string"}}},"required":["wallets"]},"EVMABIFilterTemplate":{"type":"object","properties":{"abi":{"type":"string","description":"ABI single line"},"contracts":{"description":"Contracts","type":"array","items":{"type":"string"}}},"required":["abi"]},"XRPLWalletFilterTemplate":{"type":"object","properties":{"wallets":{"description":"Wallets","type":"array","items":{"type":"string"}}},"required":["wallets"]},"HyperliquidWalletEventsFilterTemplate":{"type":"object","properties":{"wallets":{"example":["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],"description":"Wallets","type":"array","items":{"type":"string"}}},"required":["wallets"]},"StellarWalletTransactionsFilterTemplate":{"type":"object","properties":{"wallets":{"description":"Wallets","type":"array","items":{"type":"string"}}},"required":["wallets"]},"EVMWalletFilterByListTemplate":{"type":"object","properties":{"walletsListName":{"type":"string","description":"Name of the pre-created list containing wallet addresses","example":"my_wallets_list"}},"required":["walletsListName"]},"EVMContractEventsByListTemplate":{"type":"object","properties":{"contractsListName":{"type":"string","description":"Name of the pre-created list containing contract addresses","example":"my_contracts_list"},"eventHashesListName":{"type":"string","description":"Name of the pre-created list containing event hashes","example":"my_event_hashes_list"}}},"SolanaWalletFilterByListTemplate":{"type":"object","properties":{"accountsListName":{"type":"string","description":"Name of the pre-created list containing Solana account addresses","example":"my_accounts_list"}},"required":["accountsListName"]},"BitcoinWalletFilterByListTemplate":{"type":"object","properties":{"walletsListName":{"type":"string","description":"Name of the pre-created list containing wallet addresses","example":"my_wallets_list"}},"required":["walletsListName"]},"EVMABIFilterByListTemplate":{"type":"object","properties":{"contractsListName":{"type":"string","description":"Name of the pre-created list containing contract addresses","example":"my_contracts_list"},"abiJson":{"type":"string","description":"ABI JSON string"}},"required":["abiJson"]},"XRPLWalletFilterByListTemplate":{"type":"object","properties":{"walletsListName":{"type":"string","description":"Name of the pre-created list containing wallet addresses","example":"my_wallets_list"}},"required":["walletsListName"]},"HyperliquidWalletEventsFilterByListTemplate":{"type":"object","properties":{"walletsListName":{"type":"string","description":"Name of the pre-created list containing wallet addresses","example":"my_wallets_list"}},"required":["walletsListName"]},"StellarWalletTransactionsFilterByListTemplate":{"type":"object","properties":{"walletsListName":{"type":"string","description":"Name of the pre-created list containing wallet addresses","example":"my_wallets_list"}},"required":["walletsListName"]},"UpdateWebhookTemplateDto":{"type":"object","properties":{"name":{"type":"string","example":"My Webhook"},"notification_email":{"type":"string","example":"contact@example.com","description":"Notify when webhook is terminated"},"destination_attributes":{"oneOf":[{"$ref":"#/components/schemas/WebhookAttributes"}],"example":{"url":"http://localhost:8080/test","security_token":"sample-security-token","compression":"none"}},"templateArgs":{"description":"Arguments for the selected template. Provide inline values (e.g. an array of wallet addresses) or reference names of pre-created lists (e.g. walletsListName).","oneOf":[{"$ref":"#/components/schemas/EVMWalletFilterTemplate"},{"$ref":"#/components/schemas/EVMContractEventsTemplate"},{"$ref":"#/components/schemas/SolanaWalletFilterTemplate"},{"$ref":"#/components/schemas/BitcoinWalletFilterTemplate"},{"$ref":"#/components/schemas/EVMABIFilterTemplate"},{"$ref":"#/components/schemas/XRPLWalletFilterTemplate"},{"$ref":"#/components/schemas/HyperliquidWalletEventsFilterTemplate"},{"$ref":"#/components/schemas/StellarWalletTransactionsFilterTemplate"},{"$ref":"#/components/schemas/EVMWalletFilterByListTemplate"},{"$ref":"#/components/schemas/EVMContractEventsByListTemplate"},{"$ref":"#/components/schemas/SolanaWalletFilterByListTemplate"},{"$ref":"#/components/schemas/BitcoinWalletFilterByListTemplate"},{"$ref":"#/components/schemas/EVMABIFilterByListTemplate"},{"$ref":"#/components/schemas/XRPLWalletFilterByListTemplate"},{"$ref":"#/components/schemas/HyperliquidWalletEventsFilterByListTemplate"},{"$ref":"#/components/schemas/StellarWalletTransactionsFilterByListTemplate"}],"examples":{"List reference — wallets":{"summary":"List reference — walletsListName points to a pre-created list","value":{"walletsListName":"my_wallets_list"}},"List reference — contract events":{"summary":"List reference — contractsListName and eventHashesListName point to pre-created lists","value":{"contractsListName":"my_contracts_list","eventHashesListName":"my_event_hashes_list"}},"Inline wallet addresses":{"summary":"Inline values — wallet addresses provided directly","value":{"wallets":["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"]}},"Inline contract events":{"summary":"Inline values — contract addresses and event hashes provided directly","value":{"contracts":["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],"eventHashes":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}}}}},"required":["templateArgs"]},"ActivateWebhookDto":{"type":"object","properties":{"startFrom":{"type":"string","enum":["last","latest"],"example":"latest"}},"required":["startFrom"]}