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, billing, token QR codes, and plan details.
https://staging.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://staging.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://staging.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": "juan@example.com"
}
}/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, plan, and subscription metadata.
/api/v5/accountRetrieve wallet, plan, keyword usage, and active API token details.
JSON Response Example
{
"wallets": {
"balance": 150.00
},
"planDetails": {
"name": "Basic",
"limit": 1000
},
"total_keyword_used": 3,
"authToken": "1|abc123..."
}/api/v5/account/plan/detailsList active subscription plans.
JSON Response Example
[
{
"id": 1,
"name": "Basic",
"amount": 999,
"is_active": 1
}
]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
}/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
Keywords
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."
}Billing
Billing invoices and payment history.
/api/v5/billingList billing invoices and payment history.
pageJSON Response Example
{
"data": [
{
"id": 1,
"description": "Basic Plan",
"amount": 999.00,
"status": "paid",
"paid_at": "2026-05-09T10:00:00.000000Z"
}
],
"current_page": 1,
"last_page": 2
}