← All docs

Auto-Reply & Forwarding Guide

How to set up inbound rules and outgoing replies for your SMS number

What's inside

1 · The big picture — how a message flows 2 · Inbound rules — react to messages you receive 3 · Outgoing replies — auto-answer customers 4 · Forwarding — push inbound to email / your software 5 · Default reply & master switch 6 · Template variables cheat-sheet 7 · Ready-to-use examples

1 · The big picture

Every message a customer sends to your connected SMS number runs through your rules. A rule has two parts: a trigger (what to match) and an action (what to do).

📱 Customersends a message
⚙️ Your rulesfind first match
↩️ Replyauto-answer
✉️ Emailnotify you
🔗 Webhookto your CRM
Inbound rule = "WHEN a message contains X, THEN do Y."
Rules are checked top to bottom by priority — the first one that matches wins, then matching stops.

2 · Create an inbound rule

Portal → Auto-reply rules+ Add rule.

1

Open the Rules page

Sign in to the portal and click Auto-reply rules in the left menu.

portal.mobileapiconnect.com/app/rules
Auto-reply rules
+ Add rule
No rules yet — click + Add rule to create your first trigger.
2

Set the trigger (what to match)

Give the rule a name, pick how to match, and type the keyword.

New rule
Rule name
Balance enquiry
Match type
Contains
Keyword / pattern
balance
Contains — keyword anywhere in the text Exact — the whole message equals it Regex — advanced pattern Any — matches every message
3

Optional: only from certain senders

Use From filter to run the rule only for specific numbers (a number, part of one, or a pattern). Leave blank for everyone.

From filter (optional)
e.g. 9198… — leave empty for all senders

3 · Outgoing reply (auto-answer)

In the same rule, turn on Send reply and write the message. It goes straight back as an SMS to the same number.

4

Write the reply

Use {{variables}} to personalise (see the cheat-sheet below).

New rule · reply action
Reply message
Hi! Your request was received. Reply 1 for balance, 2 for support.
5

What the customer sees

balance
10:02 ✓
Hi! Your request was received. Reply 1 for balance, 2 for support.
10:02 ✓✓

The reply is automatic — sent within a second of the customer's message.

4 · Forwarding inbound to email / your software

Two ways to get inbound SMS out of the gateway and into your systems.

Per-rule forwarding fires only when that rule matches.  •  Forward-all (in Settings) fires for every inbound message, regardless of rules.
6

Email forward (per rule)

Turn on Send email inside a rule to get notified whenever it matches.

Email to
ops@yourcompany.com
Subject
New SMS: {{from}}
Body
From {{from}} at {{now}}:
{{text}}
7

Webhook to your CRM / software

Push every inbound message to your own URL as JSON. Set this under Settings → Forward all inbound, or per-rule. We sign each request with HMAC so you can verify it's really us.

Your endpoint URL
https://yourapp.com/hooks/sms-inbound
Signing secret (optional)
whsec_… — we send it in the X-MAC-Signature header

Your endpoint receives:

POST /hooks/sms-inbound
{
  "event": "message.received",
  "from": "919876543210",
  "to": "911234500000",
  "text": "balance",
  "ref": null,
  "receivedAt": "2026-05-31T14:32:00Z",
  "tenantName": "Acme Corp"
}

5 · Default reply & master switch

At the top of the Rules page is the Auto-reply engine panel.

Auto-reply engine
Master switch + fallback reply when no rule matches
Thanks for messaging us! Our team will reply shortly.
Order of events: 1) Master switch off → nothing auto-replies.   2) On → rules checked by priority; first match wins.   3) No rule matched → default reply sent (if enabled).   4) Forward-all email/webhook always fire regardless.

6 · Template variables

Drop these into any reply, email subject/body — they're filled in live.

{{from}}Sender's number — e.g. 919876543210 (example)
{{text}}The exact message the customer sent
{{ref}}Reference id, if the message carried one
{{now}}Current date & time (ISO)
{{tenantName}}Your account / company name
{{deviceId}}Which connection received it

7 · Ready-to-use examples

A

Office-hours auto-reply

Match: Any messagePriority: 999 (lowest)

Reply: "Thanks {{from}}! We're open Mon–Sat 9–6. We'll get back to you soon."

B

Keyword menu

Match: Exact = "1"Reply: balance details

Make one rule per keyword (1, 2, 3…). Give them low priority numbers so they're checked first.

C

Lead capture → CRM

Match: Contains "quote"Action: Webhook+ Reply

Reply to the customer and POST the message to your CRM webhook at the same time.

⚠️ CAUTION
Keep your number safe — read this in your language
EnglishOnly message people who opted in, register your DLT sender ID & templates, and avoid bulk or promotional blasts — spam complaints are the #1 cause of carriers blocking a number.
हिन्दी · Hindiकेवल उन्हीं लोगों को SMS करें जिन्होंने opt-in किया है, DLT sender ID और template रजिस्टर करें, और बल्क/प्रचार वाले मैसेज से बचें — spam शिकायतें नंबर ब्लॉक होने का सबसे बड़ा कारण हैं।
বাংলা · Bengaliশুধুমাত্র opt-in করা গ্রাহকদের SMS পাঠান এবং বাল্ক বা প্রচারমূলক মেসেজ এড়িয়ে চলুন — অভিযোগই অপারেটর কর্তৃক নম্বর ব্লক হওয়ার প্রধান কারণ।
中文 · Chinese只向已授权的用户发送短信,避免群发或促销信息——投诉是运营商封号的首要原因。
Español · SpanishEnvía SMS solo a quienes dieron su consentimiento y evita envíos masivos o promocionales: las quejas son la causa principal de que el operador bloquee un número.
العربية · Arabicأرسل الرسائل فقط لمن وافقوا على ذلك، وتجنّب الرسائل الجماعية أو الترويجية — فالشكاوى هي السبب الأول في حظر المشغّل للأرقام.