# Create a notification

### Endpoint:

<pre class="language-http"><code class="lang-http"><strong>POST /api/v1/nodefy/notifications/
</strong></code></pre>

### Headers:

```json
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

### Request Body:

```json
{
    "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.

{% code fullWidth="false" %}

```json
{
    "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" } 
        ]
    }
}

```

{% endcode %}

(See the "[Defining Events](https://docs.nodefy.xyz/our-api-guide/defining-event-types)" section for details on specific `event_type` parameters)

(See the "[Using Filters](https://docs.nodefy.xyz/our-api-guide/using-filters)" section for details on `filters`)

### Response (Success):

Returns a unique identifier for the notification.

```
{
  "notification_id": 123         
}
```
