Easy • 2 mins read

How to forward SMS to a custom Webhook?

Send SMS data to any HTTP endpoint (API, Zapier, Make, etc.)

For developers and power users, Webhooks offer ultimate flexibility. You can POST your SMS data to any URL, allowing integration with Zapier, Make (Integromat), or your own custom backend.

1

Prepare Your Endpoint

First, make sure you have an HTTP endpoint ready to receive SMS data. Your endpoint should be able to accept POST, GET, or PUT requests.

https://api.yourservice.com/sms/webhook
Prepare Your Endpoint
2

Add Webhook Destination

Open SMS Forwarder and tap + to add a new destination. Select Webhook from the list.

Add Webhook Destination
3

Enter Webhook URL

Paste your endpoint URL. Make sure it starts with http:// or https://.

https://your-server.com/api/sms
Enter Webhook URL
4

Select HTTP Method

Choose the HTTP method your endpoint expects:

  • POST: Send data in request body (most common)
  • GET: Send data as URL query parameters
  • PUT: Update existing resource
Select HTTP Method
5

Configure Body Key

For POST/PUT requests, specify the JSON key for the message content. For GET requests, this will be the query parameter name.

message
Configure Body Key
6

Add Custom Headers (Optional)

If your endpoint requires authentication or custom headers, tap Custom Headers and add them as key-value pairs.

Authorization: Bearer your-api-key
Add Custom Headers (Optional)
7

Test Your Webhook

Tap Send test message to verify your endpoint receives the data correctly. Check your server logs to confirm.

Test Your Webhook

Request Format

Here's what SMS Forwarder sends to your webhook:

POST Request Body (JSON)

{
  "message": "Your verification code is 123456",
  "sender": "+1234567890",
  "contact": "Bank of America",
  "timestamp": "2024-01-15T10:30:00Z"
}
  • message: The SMS content
  • sender: Phone number that sent the SMS
  • contact: Contact name if available, otherwise same as sender
  • timestamp: When the message was forwarded (ISO 8601 format)

Troubleshooting

Getting connection errors

Verify your endpoint URL is correct and publicly accessible. Check that your server is running and not blocked by firewall rules.

Authentication failing

Double-check your authorization header. Make sure the API key or token is correct and hasn't expired.

Data not in expected format

SMS Forwarder sends JSON data. Make sure your endpoint can parse JSON and is looking for the correct field names.

HTTPS certificate errors

Your server must have a valid SSL certificate. Self-signed certificates are not supported. Consider using Let's Encrypt for free certificates.

Timeout errors

Your endpoint should respond within 30 seconds. If processing takes longer, return a quick 200 response and process the data asynchronously.

Rate limiting on your endpoint

If you're receiving many SMS messages, implement queuing on your server side. Consider using filters to reduce the volume of forwarded messages.