Nodefy Docs
Nodefy Docs
  • Getting Started
    • Welcome!
    • Quickstart
    • Use Cases
    • Supported Blockchains
  • Our API Guide
    • Overview
    • Authentication
    • Notification API Methods
      • ⚡Create a notification
      • 🫴Fetch a user's notifications
      • 📴Delete a notification
    • Defining Event Types
      • 💼Wallets
      • 📃Smart Contracts
      • 🖼️NFTs
      • 💬Farcaster
    • Using Filters
    • Channels
      • Email
      • Custom Webhook
      • Slack
      • Telegram
      • In-App (coming soon)
    • User Info
Powered by GitBook
On this page
  • Endpoint:
  • Headers:
  • Request Body:
  • Example Request Body:
  • Response (Success):
  1. Our API Guide
  2. Notification API Methods

Create a notification

This endpoint lets you create a new notification.

Endpoint:

POST /api/v1/nodefy/notifications/

Headers:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Request Body:

{
    "external_user_id": str,                // Unique ID of the user to receive the notification
    "channel": "EMAIL"|"WEBHOOK"|"TELEGRAM"|"SLACK", // Notification channel
    "notification_name": str,               // optional
    "template": text,                       // optional
    "delivery_location": str,               // Recipient address (e.g. email address, telegram ID)
    "event_details": {
        "network": str,                     // Blockchain network
        "event_type": str,                  // Type of event to monitor
        "addresses": [str],                 // Array of single 0x address
        "filters": [                        // optional: Array of filter objects
            { "field_name": str, "operator": str, "value": str, "value_type": str },
            # ... more filters if needed
        ],
        "graphql": {                         // only for graphql webhook
            "topic_0": str, // optional,
            "topic_1": str, // optional
            "topic_2": str, // optional
            "topic_3": str // optional
        },
    }
}

Example Request Body:

This creates an email notification to user@example.com for any ETH transactions incoming or outgoing from wallet 0x123...abc.

{
    "external_user_id": "user123",
    "channel": "EMAIL", 
    "notification_name": "My ETH Notification",
    "delivery_location": "user@example.com",
    "event_details": {
        "network": "ETH_MAINNET",
        "event_type": "ADDRESS_ACTIVITY",
        "addresses": ["0x123...abc"],
        "filters": [
            { "field_name": "asset", "operator": "eq", "value_type": "str", "value": "ETH" } 
        ]
    }
}

Response (Success):

Returns a unique identifier for the notification.

{
  "notification_id": 123         
}

PreviousNotification API MethodsNextFetch a user's notifications

Last updated 11 months ago

(See the "" section for details on specific event_type parameters)

(See the "" section for details on filters)

⚡
Defining Events
Using Filters