Overview
The Messages API allows you to send messages through webhooks to Discord. Messages can include plain text, rich embeds, and file attachments.Send Message to Webhook
POST/webhooks/{webhook}/send
Send a message through a specific webhook to Discord.
Path Parameters
Webhook ID to send the message through
Request Body
Plain text message content (max 2000 characters). Supports variables like
{user.name}, {date}, {time}Array of embed objects (max 10 embeds per message)
Embed title (max 256 characters)
Embed description (max 4096 characters)
Embed color as decimal integer (e.g., 3447003 for blue)
URL for the embed title
ISO 8601 timestamp
Array of file uploads (max 10 files, 10MB each). Multipart/form-data only. Supported: jpg, jpeg, png, gif, webp, mp4, mov, avi
Response
Returns302 redirect to /dashboard with success or error message.
Success
Error
Send Temporary Message
POST/send/temporary
Send a message using a temporary webhook URL without saving it to your account.
Request Body
Discord webhook URL to send message to
Custom webhook name for this message (max 80 characters)
Custom avatar URL for this message
Message content (max 2000 characters)
Array of embed objects (same structure as regular send)
File attachments
Response
Returns302 redirect to /dashboard with success or error message.
Quick Send Page
GET/send
Display the quick send interface with available webhooks and templates.
Response
Returns Inertia page with:All webhooks available to the user (owned + shared)
All templates available to the user (owned + shared)
Variable Replacement
Messages support dynamic variables that are automatically replaced when sent:User Variables
| Variable | Description | Example |
|---|---|---|
{user.name} | Current user’s name | John Doe |
{user.email} | Current user’s email | [email protected] |
{user.id} | User ID | 123 |
Webhook Variables
| Variable | Description | Example |
|---|---|---|
{webhook.name} | Webhook name | Production Alerts |
{webhook.id} | Webhook ID | 456 |
Date/Time Variables
| Variable | Description | Example |
|---|---|---|
{date} | Current date | 2024-01-15 |
{time} | Current time | 10:30:45 |
{datetime} | Current date and time | 2024-01-15 10:30:45 |
Example with Variables
Discord Embed Colors
Common color values for embeds (decimal format):| Color | Decimal | Hex |
|---|---|---|
| Default | 0 | #000000 |
| Aqua | 1752220 | #1ABC9C |
| Green | 3066993 | #2ECC71 |
| Blue | 3447003 | #3498DB |
| Purple | 10181046 | #9B59B6 |
| Gold | 15844367 | #F1C40F |
| Orange | 15105570 | #E67E22 |
| Red | 15158332 | #E74C3C |
| Grey | 9807270 | #95A5A6 |
| Dark Grey | 9936031 | #979C9F |
| Navy | 3426654 | #34495E |
File Upload Limits
Important: File uploads must use
multipart/form-data encoding, not JSON.- Max files per message: 10
- Max file size: 10 MB per file
- Supported formats: jpg, jpeg, png, gif, webp, mp4, mov, avi
- Field name:
files[](array notation)
Message History
All sent messages are logged in the message history with:- User who sent the message
- Message content (stored as JSON)
- Send timestamp
- Status (success/failed)
- Discord API response
Error Handling
Validation Errors
Discord API Errors
Common Discord errors:Unknown Webhook: Webhook URL is invalid or deletedInvalid Form Body: Message content violates Discord limitsCannot send an empty message: Both content and embeds are emptyRate Limited: Too many messages sent too quickly
Best Practices
Use Templates
Use Templates
Create templates for frequently sent messages to ensure consistency and reduce errors.
Test Before Production
Test Before Production
Use a test Discord server to verify message formatting before sending to production channels.
Monitor Message History
Monitor Message History
Check message history regularly to identify and troubleshoot failed deliveries.
Respect Rate Limits
Respect Rate Limits
Discord rate limits webhook requests. Avoid sending messages too rapidly.
