How to Send & Receive SMS with DIDfarm
Overview
DIDfarm SMS lets you send and receive text messages on any SMS-enabled phone number in your account. Messages can be managed through two channels:
- Portal — send and receive messages directly in the DIDfarm dashboard under the SMS tab. No code required.
- REST API — integrate SMS into your application for automated messaging, notifications, and customer engagement.
Inbound SMS is free. Outbound messages are charged per segment from your wallet balance.
How it works
- Purchase a number with SMS capability (or enable SMS on an existing number)
- Send outbound SMS from the portal or API
- Receive inbound SMS in your portal inbox or via webhook
- Track delivery status in real-time
Prerequisites
- A DIDfarm account with wallet balance (sign up or top up)
- An active phone number in a country that supports SMS (see supported countries)
- For API usage: your API key from the API Keys tab in the portal
Step 1 — Enable SMS on a Number
Option A: During checkout
When ordering new numbers, SMS-capable numbers show an "SMS" checkbox in Step 2 of the order flow. Check the box to enable SMS — the add-on cost is shown next to each number.
Option B: On an existing number
- Go to My Numbers in the portal
- Click Configure on the number you want to SMS-enable
- Find the SMS capability toggle in the settings panel
- Toggle it on — you'll see the monthly price and a confirmation prompt
- Confirm — the SMS add-on fee is charged from your wallet
| Setting | Value |
|---|---|
| SMS add-on cost | €0.75/mo per number (varies by country) |
| Outbound SMS cost | €0.008 per message segment |
| Inbound SMS | Free |
| Message segment | 160 characters (GSM-7) or 70 characters (Unicode) |
| Billing | Charged from wallet balance |
Step 2 — Send SMS from the Portal
+31612345678)
The message appears in your SMS inbox immediately with a delivery status indicator. Status updates from queued → sent → delivered in real-time.
Step 3 — View Your SMS Inbox
All inbound and outbound messages appear in the SMS tab of your portal. You can:
- Filter by number — select a specific DID to see only its messages
- Filter by direction — show only inbound or outbound
- View stats — messages today, this month, and 30-day delivery rate
Step 4 — Send SMS via API
Send SMS programmatically using the DIDfarm REST API. Authenticate with your API key in the Authorization header.
{
"from_number_id": 42,
"to": "+31612345678",
"body": "Hello from DIDfarm!"
}curl -X POST https://didfarm.com/api/v1/portal/sms/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from_number_id": 42,
"to": "+31612345678",
"body": "Your order #1234 has shipped!"
}'{
"success": true,
"message": {
"id": 156,
"direction": "outbound",
"from": "+31201234567",
"to": "+31612345678",
"body": "Your order #1234 has shipped!",
"status": "queued",
"segments": 1,
"carrier": "didfarm",
"created_at": "2026-04-03T10:15:30.000000Z"
}
}| Parameter | Type | Description |
|---|---|---|
from_number_id | integer | ID of your SMS-enabled number (from GET /api/v1/portal/sms/numbers) |
to | string | Destination number in E.164 format (e.g. +31612345678) |
body | string | Message text, max 1,600 characters |
Step 5 — Receive SMS via Webhook
To receive inbound SMS in your application, configure a webhook URL. DIDfarm will send an HTTP POST to your endpoint for each incoming message.
{
"event": "sms.received",
"data": {
"id": 157,
"from": "+31612345678",
"to": "+31201234567",
"body": "Thanks, got the tracking!",
"segments": 1,
"received_at": "2026-04-03T10:16:45.000000Z"
}
}GET /api/v1/portal/sms endpoint to check for new messages, or use the portal inbox.
Step 6 — Track Delivery Status
Every outbound message goes through these status transitions:
| Status | Meaning |
|---|---|
queued | Message accepted and queued for delivery |
sending | Being transmitted to the carrier network |
sent | Accepted by the carrier for delivery |
delivered | Confirmed delivered to the recipient's handset |
failed | Delivery failed (invalid number, carrier rejection, etc.) |
Check delivery status via the portal SMS tab or by calling:
curl https://didfarm.com/api/v1/portal/sms?direction=outbound \ -H "Authorization: Bearer YOUR_API_KEY"
Pricing
| Charge | Amount | Notes |
|---|---|---|
| SMS monthly add-on | €0.75/number/mo | Varies by country. Charged from wallet. |
| Outbound SMS | €0.008/segment | 1 segment = 160 chars (GSM-7) or 70 chars (Unicode) |
| Inbound SMS | Free | No charge for receiving messages |
View full per-country SMS pricing on the SMS product page.
Supported Countries
SMS is available in 40+ countries. The most popular include:
| Country | Local | Mobile | Toll-Free |
|---|---|---|---|
| United States | Yes | Yes | Yes |
| United Kingdom | Yes | Yes | Yes |
| Germany | Yes | Yes | — |
| Netherlands | Yes | Yes | Yes |
| France | Yes | Yes | — |
| Canada | Yes | Yes | Yes |
| Australia | Yes | Yes | — |
For the complete list, see the SMS pricing table. Countries marked with an SMS badge in the order flow support SMS messaging.
Troubleshooting
| Issue | Cause | Fix |
|---|---|---|
| "SMS not available for this number type" | The number's country/type combination doesn't support SMS | Try a mobile number instead, or check supported countries |
| "Number must be active to enable SMS" | Number is still provisioning or pending regulatory verification | Wait for the number to become Active before enabling SMS |
| "Insufficient wallet balance" | Wallet balance is below the SMS add-on monthly fee | Top up your wallet |
| Outbound SMS stuck in "queued" | Carrier processing delay | Wait up to 60 seconds. If still queued, check the number's messaging profile is assigned |
| Inbound SMS not appearing | Messaging profile webhook not configured | Contact support — we'll verify the carrier webhook setup |
| "Failed to send SMS" | Invalid destination number or carrier rejection | Verify the To number is valid E.164 format and the destination country accepts SMS |
FAQ
Can I send SMS to any country?
You can send outbound SMS to most countries worldwide. However, your sending number must be in a country that supports SMS. Some destinations may have higher delivery rates with local numbers.
What is a message segment?
A standard SMS segment is 160 characters using GSM-7 encoding (Latin alphabet). Messages using Unicode characters (emoji, Chinese, Arabic, etc.) are limited to 70 characters per segment. Longer messages are automatically split into multiple segments and reassembled on the recipient's phone.
Can I use SMS with the API only (no portal)?
Yes. The portal and API use the same underlying messaging system. You can send via API and view history in the portal, or use the API exclusively.
Is there a rate limit?
Default rate limit is 10 messages per second per account. Contact us for higher throughput if you need bulk messaging.
Do you support MMS (picture messages)?
MMS is on our roadmap and will be available on US and Canadian numbers first. Currently, only text SMS is supported.
Ready to start messaging?
Get an SMS-enabled number in under 60 seconds.