List Messages
Get a paginated list of sent messages with filters.
Manage the sending and querying of messages through multiple channels like SMS and Email. SendMe123’s messaging system allows you to send individual or batch messages with complete delivery status tracking.
All messaging endpoints are asynchronous: the API records every message in persistence, schedules delivery in BullMQ, and returns an enqueue summary.
Message endpoints allow you to send communications and query the history of sent messages.
Method | Endpoint | Description |
---|---|---|
GET | /api/messages | Get paginated list of messages |
POST | /api/messages/sms/contacts | Send SMS to specific contacts |
POST | /api/messages/sms/all | Send SMS to all contacts |
POST | /api/messages/sms/tags | Send SMS by tags |
POST | /api/messages/email/contacts | Send Email to specific contacts |
POST | /api/messages/email/all | Send Email to all contacts |
POST | /api/messages/email/tags | Send Email by tags |
Explore the available endpoints:
List Messages
Get a paginated list of sent messages with filters.
SMS to Contacts
Send SMS messages to a specific list of numbers.
SMS to All
Send SMS messages to all contacts in your database.
SMS by Tags
Send SMS messages to contacts filtered by tags.
Email to Contacts
Send email messages to specific addresses.
Email to All
Send email messages to all contacts.
Email by Tags
Send email messages to contacts by tags.
Status | Description |
---|---|
QUEUED | Message queued for sending |
SENDING | Message being sent |
SENT | Message sent to provider |
DELIVERED | Message delivered to recipient |
UNDELIVERED | Message could not be delivered |
FAILED | Sending error |
RECEIVED | Message received by recipient |
SCHEDULED | Message scheduled for future sending |
CANCELED | Message canceled |
READ | Message read by recipient |
Type | Channel | Description |
---|---|---|
sms | SMS | Standard text message |
otp | SMS | Verification code (OTP) |
flash | SMS | Flash message (appears immediately) |
email | Electronic mail |
PLAIN_TEXT
: Unformatted textHTML
: HTML content for emailscountryCode
field)const sendSMS = async () => { try { const response = await axios.post('https://app.sendme123.com/api/messages/sms/contacts', { message: 'Hello, this is a test message', contacts: ['3001234567'], country: 'CO' }, { headers: { 'Authorization': 'Bearer your-token-here', 'Content-Type': 'application/json' } });
console.log('SMS enqueued:', response.data); return response.data; } catch (error) { console.error('Error sending SMS:', error.response?.data || error.message); throw error; }};
const sendEmail = async () => { try { const response = await axios.post('https://app.sendme123.com/api/messages/email/contacts', { subject: 'Welcome to SendMe', message: '<h1>Welcome!</h1><p>Thank you for joining us.</p>', }, { headers: { 'Authorization': 'Bearer your-token-here', 'Content-Type': 'application/json' } });
console.log('Email enqueued:', response.data); return response.data; } catch (error) { console.error('Error sending Email:', error.response?.data || error.message); throw error; }};
const sendEmail = async () => { try { const response = await axios.post('https://app.sendme123.com/api/messages/send/email', { subject: 'Registration confirmation', message: 'Welcome to our platform' }, { headers: { 'api-key': 'your-api-key-here', 'Content-Type': 'application/json' } });
console.log('Email sent:', response.data); return response.data; } catch (error) { console.error('Error sending email:', error.response?.data || error.message); throw error; }};