Skip to main content
Users must subscribe to your app before you can send them notifications. If you try to send a message to an unsubscribed user, it will not be delivered.Setting up user subscriptions: See our User Management guide for implementation details.

Prerequisites

Before sending messages, ensure you have completed these steps:
  1. Authentication Setup: Have your API key ready (see the Authentication guide if you need to set this up)
  2. App Registration: Your app must be registered with Dialect
  3. User Subscriptions: Ensure your users have subscribed to receive notifications from your app

Message Delivery Overview

Dialect’s REST API provides flexible delivery options:
  1. Channel Selection: Messages are sent according to user channel preferences (IN_APP, email, Telegram, push)
  2. User Targeting: Send to individual users, groups, or broadcast to all subscribers
  3. Rich Content: Support for titles, actions, images, and formatted content
  4. Topic-Based: Optional targeting based on notification types/topics

How It Works

Step 1: Basic Message Sending

Send to a Single User

Send a notification to a specific user’s wallet address. This is the most common messaging pattern. API Reference: POST /v2/{appId}/send

Send to Multiple Users

Send the same notification to multiple specific users in a single request. This is more efficient than making individual API calls and supports up to 10,000 wallet addresses. API Reference: POST /v2/{appId}/send

Broadcast to All Users

Send notifications to all users subscribed to your app by using the all-subscribers recipient type.

Send Personalized Messages to Multiple Users

Send different notification content to multiple users using the batch endpoint. This is ideal for personalized alerts like individual portfolio updates, transaction confirmations, or customized recommendations. Supports up to 500 personalized messages per batch. API Reference: POST /v2/{appId}/send-batch
When to use send-batch vs send:
  • Use /send with "subscribers" type when sending the same message to multiple users (up to 10,000)
  • Use /send-batch when sending different personalized content to multiple users (up to 500)

Step 2: Channel-Specific Delivery

Target Email and Telegram

Control which channels receive your message by specifying the channels array. Note that IN_APP notifications are delivered automatically when included, so you can add other channels as needed.

Rich HTML Content for Email

When sending to email channels, you can use HTML formatting for rich content presentation.

Step 3: Interactive & Rich Messages

Actionable Notifications

Add action buttons to your notifications that allow users to take immediate action. Supports up to 3 action buttons that can direct users to external websites or blink-enabled actions. When Dialect’s mapping service detects a supported protocol URL, it automatically enriches the alert with a context object.

Messages with Images

Include images in your notifications using publicly accessible URLs. Images are supported for IN_APP and EMAIL channels.

Step 4: Custom Data

The data parameter allows you to attach arbitrary key-value pairs to your alerts. This data is accessible in notification history and push notification payloads, enabling powerful use cases. Common use cases:
  • Deep linking to specific screens in your app
  • Transaction metadata for user reference
  • Custom actions and routing logic
  • Analytics and tracking identifiers
Validation rules:
  • Property names: alphanumeric characters, underscores, and hyphens only (max 64 characters)
  • Property values: strings only (max 500 characters)
The data object is stored with the notification and can be retrieved later from the notification history endpoint. This makes it perfect for implementing deep linking or passing context to your application.

Step 5: Topic-Based Messaging

If you’ve configured notification topics, you can send targeted messages to users who have subscribed to specific categories.

Message Examples by Use Case

Welcome Message

Transaction Alert

Security Alert

Price Alert

Error Handling

Common Response Codes

202 Accepted: Message sent successfully
400 Bad Request: Invalid request format
401 Unauthorized: Invalid API key
403 Forbidden: Access denied

Error Handling Example

Best Practices

πŸ’‘ Message Design Tips:
  • Keep titles concise and descriptive (especially important for email subjects)
  • Structure longer messages with clear sections
  • Always include clear calls-to-action when appropriate
  • Use HTML formatting only for email channels
πŸ’‘ Technical Tips:
  • Test your messages across different channels (IN_APP vs email vs Telegram)
  • Implement proper error handling and retry logic for critical notifications
  • Use batch sending for multiple recipients to improve efficiency
  • Consider user time zones when sending time-sensitive notifications
πŸ’‘ User Experience Tips:
  • Respect user preferences and subscription settings
  • Provide context in your messages - users should understand why they’re receiving the notification
  • Use topic-based messaging to ensure relevance
  • Make action buttons clear and valuable