Public API Documentation
Build with MSG4wrd.io API v5
Use the v5 API for authentication, inbound SMS, outbound queues, contacts, keyword webhooks, GSM modem devices, SMS campaigns, monitoring, top-ups, account limits, billing, and token QR codes.
All authenticated portal features are available to every account by default. Wallet credits and account limits govern usage.
https://api.msg4wrd.io
Authentication
Call /api/login, then send protected requests with a Bearer token.
Message Status
Response Format
All endpoints return JSON. Validation failures include a message and may include an errors map.
POST /api/v5/send
Send SMS Status Flow
Send requests are documented separately because the API queues an outbound message first, then the sender workflow moves it through status codes.
curl -X POST "https://api.msg4wrd.io/api/v5/send?mobile=09171234567&message=Hello%20from%20MSG4wrd&local=0&priority=0" \ -H "Authorization: Bearer YOUR_TOKEN_HERE" \ -H "Accept: application/json"
Save the returned sent.id. That ID is the same value used for resend when the outbound message later fails.
curl -X POST "https://api.msg4wrd.io/api/v5/inbound/message/125/resend" \ -H "Authorization: Bearer YOUR_TOKEN_HERE" \ -H "Accept: application/json"
- 1Read messages from GET /api/v5/inbound or GET /api/v5/inbound/thread/{mobile}.
- 2Find an outbound message where is_inbound is 0 and status is 3.
- 3Call POST /api/v5/inbound/message/{id}/resend using that message ID.
- 4A successful resend resets the same message to status 0 pending and returns the updated sent object.
The API accepted the request, charged the wallet, created the outbound SMS row, and returned the message ID in sent.id.
Store sent.id. The gateway/device worker picks up pending outbound messages for delivery.
The message is actively being processed by the sender workflow.
Do not resend yet. Continue reading the thread or inbound list until the status moves to success or failed.
The outbound SMS was marked as delivered/sent by the processing workflow.
No resend action is needed.
The outbound SMS failed and is eligible for API resend if it belongs to the authenticated account.
Call POST /api/v5/inbound/message/{id}/resend with the failed outbound message ID.
Endpoint Catalog
API v5 Routes
Base
Authentication bootstrap and session/token management.
/api/loginAuthenticate with email/password and receive a bearer token.
emailpasswordJSON Response Example
{
"token": "1|abc123...",
"user": {
"id": 1,
"firstname": "Juan",
"lastname": "Dela Cruz",
"email": "[email protected]"
}
}/api/v5/logoutEnd the current session without revoking the persisted API token.
JSON Response Example
/api/v5/tokens/createRegenerate the account API token and invalidate previous tokens.
JSON Response Example
{
"token": "2|xyz789..."
}/api/v5/tokens/qr-codeReturn a QR code data URI for the active API token.
JSON Response Example
{
"qr_code": "data:image/svg+xml;base64,PHN2Zy...",
"mime_type": "image/svg+xml"
}Account
Account wallet, usage, and device and outbound SMS limit metadata.
/api/v5/accountRetrieve wallet, account limits and usage, keyword usage, and active API token details.
JSON Response Example
{
"wallets": {
"balance": 150.00
},
"limits": {
"device_limit": 1,
"devices_used": 0,
"devices_remaining": 1,
"sms_daily_limit": 200,
"sms_sent_today": 0,
"sms_remaining_today": 200,
"sms_monthly_limit": 3000,
"sms_sent_this_month": 0,
"sms_remaining_this_month": 3000
},
"total_keyword_used": 3,
"authToken": "1|abc123...",
"realtime_channel": "account-realtime-channel"
}Send SMS
Outbound SMS queueing, status tracking, and failed-message resend behavior.
/api/v5/sendQueue an outbound SMS message using query parameters.
mobilemessagelocalsendernamepriorityJSON Response Example
{
"message": "Message queued successfully.",
"charged": 1,
"sent": {
"id": 124,
"mobile": "09171234567",
"normalized_mobile": "+639171234567",
"content": "Hello",
"sender": "default",
"is_inbound": 0,
"local": 0,
"priority": 0,
"status": 0,
"created_at": "2026-05-09T10:01:00.000000Z"
}
}Inbound
SMS conversations, replies, failed-message retries, and device ingestion.
/api/v5/inboundList paginated SMS conversations across inbound messages and outbound replies.
searchpageJSON Response Example
{
"data": [
{
"id": 123,
"from_mobile": "09171234567",
"normalized_mobile": "+639171234567",
"contact_name": "Juan Dela Cruz",
"contact_mobile": "09171234567",
"content": "Hello",
"is_inbound": 1,
"status": 2,
"received_at": "2026-05-09T10:00:00.000000Z"
}
],
"current_page": 1,
"last_page": 3,
"realtime_channel": "account-realtime-channel"
}/api/v5/inbound/thread/{mobile}Retrieve a full SMS thread by mobile number.
mobileJSON Response Example
{
"mobile": "+639171234567",
"variants": ["09171234567", "+639171234567"],
"messages": [
{
"id": 123,
"mobile": "09171234567",
"normalized_mobile": "+639171234567",
"content": "Hello",
"sender": "default",
"is_inbound": 0,
"status": 0,
"created_at": "2026-05-09T10:00:00.000000Z"
}
]
}/api/v5/inbound/replySend a manual reply to an inbound thread target.
mobilemessageJSON Response Example
{
"message": "Reply sent successfully.",
"sent": {
"id": 125,
"mobile": "09171234567",
"normalized_mobile": "+639171234567",
"content": "Reply text",
"sender": "default",
"is_inbound": 0,
"status": 0,
"created_at": "2026-05-09T10:02:00.000000Z"
}
}/api/v5/inbound/message/{id}/resendReset a failed outbound SMS message back to pending.
idJSON Response Example
{
"message": "Message queued for resend.",
"sent": {
"id": 125,
"mobile": "09171234567",
"normalized_mobile": "+639171234567",
"content": "Reply text",
"sender": "default",
"is_inbound": 0,
"status": 0,
"created_at": "2026-05-09T10:02:00.000000Z"
}
}/api/v5/inboundStore and forward an inbound SMS from a registered device integration.
device_uidmobilemessagelocalJSON Response Example
{
"status": 200,
"message": "success"
}Contacts
Saved SMS contacts used by inbound lists and manual sends.
/api/v5/contactsList saved SMS contacts.
JSON Response Example
{
"data": [
{
"id": 1,
"name": "Juan Dela Cruz",
"mobile": "09171234567",
"created_at": "2026-05-09T10:00:00.000000Z",
"updated_at": "2026-05-09T10:00:00.000000Z"
}
]
}/api/v5/contactsCreate a saved SMS contact.
namemobileJSON Response Example
{
"message": "Contact added successfully.",
"contact": {
"id": 1,
"name": "Juan Dela Cruz",
"mobile": "09171234567",
"created_at": "2026-05-09T10:00:00.000000Z",
"updated_at": "2026-05-09T10:00:00.000000Z"
}
}/api/v5/contacts/{id}Update a saved SMS contact.
idnamemobileJSON Response Example
{
"message": "Contact updated successfully.",
"contact": {
"id": 1,
"name": "Juan Dela Cruz",
"mobile": "09171234567",
"created_at": "2026-05-09T10:00:00.000000Z",
"updated_at": "2026-05-09T10:05:00.000000Z"
}
}/api/v5/contacts/{id}Delete a saved SMS contact.
idJSON Response Example
SMS Campaigns
Recipient-file parsing, sample templates, draft creation, delivery reporting, reuse, and queued sending.
/api/v5/campaigns/parseParse an XLSX, CSV, or TXT recipient file into a validation preview.
file/api/v5/campaigns/template/{type}Download a basic, company, or unique-message sample template.
typeformat/api/v5/campaignsList campaigns plus aggregate recipient and delivery totals.
page/api/v5/campaignsSave a campaign draft without spending credits or sending messages.
namemessagesrecipientssource_filename/api/v5/campaigns/{id}Retrieve campaign totals, cost estimate, wallet balance, and recipient delivery statuses.
idpagestatus/api/v5/campaigns/{id}/duplicateLoad a previous campaign into the Copy and Use composer workflow.
id/api/v5/campaigns/{id}/sendQueue a draft after checking wallet credits and daily/monthly outbound limits.
idKeywords
Keyword routing, webhook assignment, devices, and linked mobile numbers.
/api/v5/keywords-devicesRetrieve keywords, mobile devices, and linked mobile numbers.
JSON Response Example
{
"keywords": [
{
"id": 1,
"keyword": "PAYMENT",
"webhook": "https://example.com/webhook",
"status": true
}
],
"devices": [
{
"id": 1,
"name": "Main GSM Modem",
"device_id": "DEVICE-001",
"mobile": "09171234567",
"status": true
}
]
}/api/v5/keyword/createCreate a keyword and webhook configuration.
keywordwebhookdevice_idewallet_channelis_default_webhookdefault_webhookstatusmobile_appJSON Response Example
{
"success": true,
"message": "Keyword created"
}/api/v5/keyword/{id}Update an existing keyword.
idkeywordwebhookdevice_idewallet_channelis_default_webhookdefault_webhookstatusmobile_appJSON Response Example
{
"success": true,
"message": "Keyword updated."
}/api/v5/keyword/{id}Delete an existing keyword.
idJSON Response Example
{
"success": true,
"message": "Keyword deleted."
}Devices
GSM modem device registration and management.
/api/v5/device/createRegister a new GSM modem device.
idis_updatenamedevice_idmobileis_autoreply_to_senderis_msg4wrdstatusJSON Response Example
{
"success": true,
"message": "Device registered"
}/api/v5/device/{id}Update a registered GSM modem device.
idnamedevice_idmobileis_autoreply_to_senderis_msg4wrdstatusJSON Response Example
{
"success": true,
"message": "Device updated."
}/api/v5/device/{id}Delete a registered GSM modem device.
idJSON Response Example
{
"success": true,
"message": "Device deleted."
}Sender Numbers
Blocked sender-number management for Philippine and US numbers.
/api/v5/sender-number/createAdd a number to the account’s blocked-sender list.
mobile/api/v5/sender-number/{id}Delete a blocked sender number owned by the account.
idBilling
Top-up offers, promos, limit add-ons, one-time checkout, payment history, and invoices.
/api/v5/credit-packagesList active credit top-ups, promos, and account-limit add-ons.
/api/v5/paymentsList one-time purchase and legacy payment history.
page/api/v5/payments/{id}/proofDownload the authenticated account’s own manual payment proof image.
id/api/v5/payments/gateway-settingsRead enabled payment gateways and public checkout configuration.
/api/v5/payments/gateway-settings/{gateway}/qrDownload the configured public QR image for GCash or Maya.
gateway/api/v5/checkout/paypal/orderCreate a PayPal order for an active offer.
credit_package_id/api/v5/checkout/paypal/order/{txn}/captureCapture a PayPal order and fulfill credits and limit increments once.
txn/api/v5/checkout/manualSubmit GCash or Maya payment details and proof for verification.
credit_package_idgatewayreference_numberproof/api/v5/billingList billing invoices and payment history.
pageJSON Response Example
{
"data": [
{
"id": 1,
"description": "Credit top-up",
"amount": 999.00,
"status": "paid",
"paid_at": "2026-05-09T10:00:00.000000Z"
}
],
"current_page": 1,
"last_page": 2
}