API documentation
Send SMS through your own Android phone from any server, get delivery statuses by webhook, and manage contact lists, campaigns and opt-outs.
- Base URL
- https://smsflow.app/api/v1
- API keys
- Dashboard, API keys
Introduction
The SMS Flow API sends SMS through an Android phone connected to your account, with that phone's SIM and number. It also gives you the messages the phone received, your contact lists, campaigns and opt-out list.
The API needs the Full version of the Android app on the sending phone. A phone running the Google Play version
only sends messages written in the dashboard, and API calls that target it answer 422 device_play_flavor.
Base URL: https://smsflow.app/api/v1. Send these headers with every request:
X-API-KEY: your API key.Accept: application/json: so errors come back as JSON.Content-Type: application/json: for requests with a body (POST,PUT).
Times are ISO 8601 in UTC. Phone numbers are best sent in international E.164 format, for example +40712345678.
Authentication
Create API keys in the dashboard under API keys. A key is shown once, when you create it; we store only a hash. If a key leaks, delete it there and create a new one.
Send the key in the X-API-KEY header. A missing key answers 401 Missing API Key; a wrong or deleted key answers 401 Invalid API Key.
Keep keys on your server. Never put them in a website's JavaScript or in a public repository.
Example
curl https://smsflow.app/api/v1 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
{
"message": "SMS Flow API v1"
}Errors and limits
Errors use the HTTP status code and a JSON body with an error field (validation errors use message and errors).
| Status | When |
|---|---|
| 401 | Missing API Key or Invalid API Key. |
| 402 | Insufficient credits: your balance does not cover every message in the request. Nothing is queued. The body has required and available. |
| 403 | The device, contact list or campaign belongs to another account. |
| 404 | The message, device or list was not found. |
| 409 | The phone number is already in this contact list. |
| 422 | Validation failed (see errors), or device_play_flavor: the phone runs the Google Play app, which cannot send API messages. |
| 429 | More than 60 requests per minute with the same API key. Wait and retry; the Retry-After header says how many seconds. |
// 402 Payment Required
{
"error": "Insufficient credits",
"required": 2.5,
"available": { "balance": 1.2, "bonus": 0 }
}
// 422 Unprocessable Content
{
"error": "device_play_flavor",
"message": "This phone runs SMS Flow from Google Play, which can't send campaigns. Install SMS Flow Full from smsflow.app/download or pick another device."
}GET/devices
List the phones connected to your account.
Use a device's uuid as device_id when you send. last_seen is the phone's last check-in.
Example
curl https://smsflow.app/api/v1/devices \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
[
{
"uuid": "8d23e2f5-8a9d-4a1b-9112-fdb71b3e0451",
"name": "Samsung Galaxy A54",
"last_seen": "2026-10-16T12:45:00Z"
}
]POST/send
Send one message to one number, or the same message to up to 500 numbers.
Body:
device_id(string, required): theuuidof the phone that sends.to(required): one phone number as a string, or an array of 1 to 500 numbers in E.164 format (+40712345678).message(string, required): up to 500 characters. Billed per segment: 160 characters (70 with characters like ă, ș, ț), or 153 (67) per segment for longer texts.
All or nothing: if your balance does not cover every message, the answer is 402 and nothing is queued.
Otherwise the messages are queued and the phone sends them the next time it checks in.
Opt-outs. With an array, numbers on your opt-out list are skipped and returned in skipped (count in skipped_suppressed).
A single number is sent even if it opted out (for transactional messages), and the answer adds "warning": "recipient_opted_out".
Keep the returned sms_ids: they identify the messages in GET /status and in status webhooks.
Example
curl -X POST https://smsflow.app/api/v1/send \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"device_id": "8d23e2f5-8a9d-4a1b-9112-fdb71b3e0451",
"to": ["+40712345678", "+40729302845"],
"message": "Your order 1042 has shipped. Delivery on Thursday."
}'Response
{
"message": "2 SMS messages queued successfully",
"recipients": ["+40712345678", "+40729302845"],
"queued_at": "2026-10-16T14:20:00+00:00",
"sms_ids": [18734, 18735],
"skipped_suppressed": 0,
"skipped": []
}
// With a single number in "to":
{
"message": "SMS queued successfully",
"recipients": ["+40712345678"],
"queued_at": "2026-10-16T14:20:00+00:00",
"sms_id": 18734,
"sms_ids": [18734]
}POST/send/bulk
Send the same message to every contact in one of your contact lists.
Body: device_id (string), list_id (integer) and message (up to 500 characters), all required.
Contacts on your opt-out list are skipped and counted in skipped_suppressed.
If your balance does not cover the whole list, the answer is 402 and nothing is queued.
Example
curl -X POST https://smsflow.app/api/v1/send/bulk \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"device_id": "8d23e2f5-8a9d-4a1b-9112-fdb71b3e0451",
"list_id": 5,
"message": "We are closed on Monday. See you on Tuesday!"
}'Response
{
"message": "Bulk SMS queued successfully",
"list_id": 5,
"recipients_count": 126,
"queued_at": "2026-10-16T14:20:00+00:00",
"sms_ids": [18736, 18737, "…"],
"skipped_suppressed": 2
}GET/status/{message_id}
Check the current status of one message.
Statuses only move forward: pending (queued) → sending (the phone took it) → sent → delivered
(the carrier returned a delivery report). failed can follow any of the first three, with the reason in error.
A failed message is refunded automatically. Not every carrier returns delivery reports, so some messages stay sent.
To avoid polling, use status webhooks.
Example
curl https://smsflow.app/api/v1/status/18734 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
{
"id": 18734,
"status": "delivered",
"sent_at": "2026-10-16T14:20:31+00:00",
"delivered_at": "2026-10-16T14:20:36+00:00",
"error": null
}Status webhooks
Get a request on your server every time the status of an API or campaign message changes.
In the dashboard, open API keys and enter your status webhook URL. The first time you save it,
the dashboard shows your signing secret (whsec_…) once; you can rotate it later. Messages written in the dashboard do not trigger webhooks.
SMS Flow sends a POST with JSON for every change to sending, sent, delivered or failed.
Answer with any 2xx within 10 seconds. Timeouts, 5xx and 429 are retried 5 times in total
(after about 10 s, 1 min, 5 min and 30 min). Redirects are not followed.
Check the signature. X-SmsFlow-Signature is t=<unix time>,v1=<hex>, where v1 is the HMAC-SHA256 of
"{t}.{raw body}" with your secret. Compare in constant time and reject requests whose t is more than 5 minutes off.
Retries keep the same event_id, so you can ignore duplicates, and events can arrive out of order.
Replies
To receive incoming SMS on your server, open Settings, Forwarding, and enter its URL. Each forwarded message costs €0.003 per segment.
POST https://example.com/smsflow
Content-Type: application/json
X-SmsFlow-Event: message.status
X-SmsFlow-Event-Id: 1b0f5a2e-6c1d-4a59-9f4e-2f0d7c1a9b33
X-SmsFlow-Signature: t=1792152000,v1=5f2c0e…a91b
{
"event": "message.status",
"event_id": "1b0f5a2e-6c1d-4a59-9f4e-2f0d7c1a9b33",
"id": 18734,
"status": "failed",
"recipient": "+40712345678",
"error": "RESULT_ERROR_NO_SERVICE: No service",
"sent_at": null,
"delivered_at": null,
"source": "api",
"campaign_id": null,
"occurred_at": "2026-10-16T14:20:00+00:00"
}Verify the signature
$body = file_get_contents('php://input');
parse_str(str_replace(',', '&', $_SERVER['HTTP_X_SMSFLOW_SIGNATURE'] ?? ''), $sig);
$expected = hash_hmac('sha256', ($sig['t'] ?? '') . '.' . $body, getenv('SMSFLOW_WEBHOOK_SECRET'));
if (!isset($sig['v1']) || !hash_equals($expected, $sig['v1']) || abs(time() - (int) $sig['t']) > 300) {
http_response_code(400);
exit;
}Opt-outs (suppressions)
The numbers that bulk sends and campaigns skip.
A reply of STOP, STOP ALL, STOP SMS, UNSUBSCRIBE, OPRIRE or DEZABONARE
(case and diacritics ignored) adds the sender automatically. You can also manage the list yourself:
| Request | Result |
|---|---|
| GET /suppressions?page=1&per_page=50&q=+4071 | { "data": [{ "id", "phone", "reason", "created_at" }], "meta": { "current_page", "last_page", "per_page", "total" } } |
| POST /suppressions | Body { "phone": "+40712345678" }. 201 when added, 200 if it was already listed. reason is api. |
| DELETE /suppressions/{phone} | URL-encoded number, for example %2B40712345678. 200, or 404 if it is not listed. |
reason is stop_keyword, manual (added in the dashboard) or api.
Example
curl -X POST https://smsflow.app/api/v1/suppressions \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{ "phone": "+40712345678" }'Response
{
"id": 3,
"phone": "+40712345678",
"reason": "api",
"created_at": "2026-10-16T14:20:00+00:00"
}GET/queue/{device_uuid}
Retrieve up to 100 SMS messages currently queued for sending from the specified device.
This endpoint returns the most recent SMS messages that are queued and waiting to be sent by a specific connected device. It's useful for syncing your system with the latest unsent messages.
Path parameter:
device_uuid- The unique identifier of the device. You can get it from the/devicesendpoint.
The response is limited to the last 100 pending messages to ensure fast performance.
Example
curl -X GET https://smsflow.app/api/v1/queue/8d23e2f5-8a9d-4a1b-9112-fdb71b3e0451 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
[
{
"id": 18734,
"recipient": "+40712345678",
"body": "Your appointment is confirmed for 15:30.",
"queued_at": "2026-10-16T14:20:00+00:00"
}
]Lists up to 100 messages that are queued (pending) or being sent (sending), oldest first. A message leaves this list once the phone reports it as sent or failed.
GET/sent/{device_uuid}
Retrieve the last 100 successfully sent messages from the specified device.
This endpoint returns the most recent SMS messages that have been successfully sent from a specific connected device.
Path parameter:
device_id- The UUID of the connected device. Obtain it from the/devicesendpoint.
The response includes delivery timestamps and status for up to the last 100 sent messages.
Example
curl -X GET https://smsflow.app/api/v1/sent/8d23e2f5-8a9d-4a1b-9112-fdb71b3e0451 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
[
{
"id": 18730,
"recipient": "+40712345678",
"body": "Your order 1042 has shipped.",
"sent_at": "2026-10-16T14:12:09+00:00"
}
]Use this endpoint to sync your own database with messages that were successfully sent from the device.
GET/received/{device_uuid}
Retrieve the last 100 SMS messages received by the specified device.
This endpoint returns the most recent SMS messages received on a connected device. You can use it to display inbound messages in your system or trigger workflows.
Path parameter:
device_id- The UUID of the connected device that received the messages.
The response includes sender numbers, message content, and timestamps (limited to the latest 100 received messages).
Example
curl -X GET https://smsflow.app/api/v1/received/8d23e2f5-8a9d-4a1b-9112-fdb71b3e0451 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
[
{
"id": 18741,
"from": "+40712345678",
"body": "STOP",
"received_at": "2026-10-16T14:31:40+00:00"
}
]With the Full app, received messages can also be forwarded to your server (Settings, Forwarding). A reply of STOP adds the sender to your opt-out list.
GET/lists
Retrieve all your contact lists.
This endpoint returns all the contact lists you've created in your account. Each list includes its name, description, and number of contacts.
Example
curl -X GET https://smsflow.app/api/v1/lists \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
[
{
"id": 1,
"name": "VIP Clients",
"description": "High-value returning customers",
"contacts_count": 42,
"created_at": "2026-10-16T14:20:00+00:00"
},
{
"id": 2,
"name": "Newsletter Subscribers",
"description": "Users subscribed to monthly updates",
"contacts_count": 188,
"created_at": "2026-10-16T14:20:00+00:00"
}
]Use this endpoint to display your lists in dashboards or to get list IDs for sending bulk messages.
POST/lists
Create a new contact list.
Create a new contact list by specifying its name and optional description.
Required fields:
name- The name of the list (string).description- Optional short description (max 200 characters).
Example
curl -X POST https://smsflow.app/api/v1/lists \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "New Leads",
"description": "Contacts collected from our landing page"
}'Response
{
"id": 8,
"name": "New Leads",
"description": "Contacts collected from our landing page",
"contacts_count": 0,
"created_at": "2026-10-16T14:20:00+00:00"
}The list is created instantly and can be used right away for adding contacts or sending messages.
PUT/lists/{id}
Update the name or description of an existing list.
Modify a contact list's name or description. Partial updates are allowed, you can send only the fields you want to change.
Path parameter:
id- The numeric ID of the list you want to update.
Optional fields:
name, description
Example
curl -X PUT https://smsflow.app/api/v1/lists/8 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated List Name",
"description": "Refined group for top leads"
}'Response
{
"id": 8,
"name": "Updated List Name",
"description": "Refined group for top leads",
"contacts_count": 0,
"updated_at": "2026-10-16T14:20:00+00:00"
}The list details are updated instantly and available for use in the next API request.
DELETE/lists/{id}
Delete an existing contact list and all its contacts.
Permanently deletes a contact list and all contacts stored in it. This action cannot be undone, so it should be used carefully.
Path parameter:
id: The ID of the list you want to delete.
Deleting a list automatically removes all contacts it contains.
Example
curl -X DELETE https://smsflow.app/api/v1/lists/8 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
{
"message": "List deleted successfully",
"deleted_list_id": 8,
"deleted_contacts": 42
}This action is permanent. All contacts within the deleted list are removed automatically.
GET/lists/{id}/contacts
Retrieve all contacts from a specific list.
Returns all contacts that belong to a specific list. Each contact includes basic identification data and metadata such as notes and creation timestamps.
Path parameter:
id- The ID of the list you want to fetch contacts from.
You can use this to display or sync contacts with your own system.
Example
curl -X GET https://smsflow.app/api/v1/lists/8/contacts \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
[
{
"id": 101,
"first_name": "John",
"last_name": "Doe",
"phone": "+40729302845",
"created_at": "2026-10-16T14:20:00+00:00"
},
{
"id": 102,
"first_name": "Jane",
"last_name": "Smith",
"phone": "+40712345678",
"created_at": "2026-10-16T14:20:00+00:00"
}
]Contacts are returned in descending order by creation date. Pagination may be added in a future version for large lists.
POST/lists/{id}/contacts
Add a new contact to a specific list.
Adds a new contact to an existing list. If the phone number already exists in the list, the contact will not be duplicated.
Path parameter:
id- The ID of the list you want to add the contact to.
Required fields:
first_name- Contact's first name (string).last_name- Contact's last name (optional, string).phone- Contact's phone number in international format (e.g.+40729302845).
Example
curl -X POST https://smsflow.app/api/v1/lists/8/contacts \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"first_name": "John",
"last_name": "Doe",
"phone": "+40729302845"
}'Response
{
"id": 205,
"first_name": "John",
"last_name": "Doe",
"phone": "+40729302845",
"created_at": "2026-10-16T14:20:00+00:00"
}Adding a number that is already in the list answers 409 Duplicate phone number in the same list.
PUT/lists/{id}/contacts/{contact_id}
Update an existing contact in a specific list.
Updates a contact's details such as name, phone number, or notes. You only need to include the fields you want to change.
Path parameters:
id- The ID of the list the contact belongs to.contact_id- The ID of the contact to update.
Optional fields:
first_name, last_name, phone
Example
curl -X PUT https://smsflow.app/api/v1/lists/8/contacts/205 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"first_name": "John"
}'Response
{
"id": 205,
"first_name": "John",
"last_name": "Doe",
"phone": "+40729302845",
"updated_at": "2026-10-16T14:20:00+00:00"
}Updated contact data is available immediately for sending messages or campaign targeting.
DELETE/lists/{id}/contacts/{contact_id}
Remove a specific contact from a list.
Deletes a single contact from a list. This is useful for removing outdated or unsubscribed phone numbers.
Path parameters:
id: The ID of the list the contact belongs to.contact_id: The ID of the contact to delete.
Example
curl -X DELETE https://smsflow.app/api/v1/lists/8/contacts/205 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
{
"message": "Contact deleted successfully",
"deleted_contact_id": 205,
"list_id": 8
}Contacts deleted from a list can be added again later using POST /lists/{id}/contacts.
GET/campaigns
Retrieve all campaigns created in your account.
Returns a list of all SMS campaigns, including their scheduling time, delivery status, and current statistics such as sent and failed message counts.
Example
curl -X GET https://smsflow.app/api/v1/campaigns \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
[
{
"id": 31,
"name": "Black Friday 2025",
"device_uuid": "8d23e2f5-8a9d-4a1b-9112-fdb71b3e0451",
"contact_list_id": 12,
"message": "Weekend sale: 20% off in store until Sunday.",
"scheduled_at": "2025-11-29T08:00:00Z",
"status": "completed",
"sent_count": 245,
"failed_count": 3,
"skipped_suppressed": 2
},
{
"id": 32,
"name": "Welcome Series",
"device_uuid": "3b44d12e-9d1f-4012-a2b1-09e3e3b4e7e5",
"contact_list_id": 9,
"message": "Welcome to our community!",
"scheduled_at": "2025-11-01T07:00:00Z",
"status": "scheduled",
"sent_count": 0,
"failed_count": 0
}
]Campaigns are sorted by scheduled_at in descending order.
You can use this endpoint to show active and past campaigns in your dashboard.
POST/campaigns
Create a new SMS campaign.
Creates a new campaign that will send the specified message to all contacts in a list, using a selected device. The campaign can be scheduled for a specific time (UTC).
Required fields:
device_uuid: The UUID of the connected device used to send messages.contact_list_id: The ID of the contact list targeted by the campaign.name: Campaign name (string).message: SMS content (max 500 characters).scheduled_at: ISO 8601 datetime (UTC) for when the campaign should start.
Example
curl -X POST https://smsflow.app/api/v1/campaigns \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"device_uuid": "8d23e2f5-8a9d-4a1b-9112-fdb71b3e0451",
"contact_list_id": 12,
"name": "Winter Offers",
"message": "Winter Sale - up to 40% OFF!",
"scheduled_at": "2025-12-01T09:00:00Z"
}'Response
{
"id": 51,
"name": "Winter Offers",
"device_uuid": "8d23e2f5-8a9d-4a1b-9112-fdb71b3e0451",
"contact_list_id": 12,
"message": "Winter Sale - up to 40% OFF!",
"scheduled_at": "2025-12-01T09:00:00Z",
"status": "scheduled"
}The campaign will start automatically at the scheduled time.
You can monitor its status with GET /campaigns.
PUT/campaigns/{id}
Update campaign details (only for draft or scheduled campaigns).
Allows you to update an existing campaign's basic details,
but only if the campaign is still in draft or scheduled state.
Once a campaign has started (status running or completed), it cannot be modified.
The campaign status cannot be changed manually. It's automatically handled by the system based on scheduling and execution.
Editable fields:
name: Update the campaign's name.message: Update the SMS text (max 500 characters).scheduled_at: Update the scheduled time (ISO 8601, UTC).contact_list_id: Change the targeted contact list.device_uuid: Reassign to a different connected device.
If the campaign is already running or completed,
the request will return a 403 Forbidden response.
Example
curl -X PUT https://smsflow.app/api/v1/campaigns/51 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Campaign Name",
"message": "New message content with discount link",
"scheduled_at": "2025-12-02T10:00:00Z",
"contact_list_id": 14
}'Response
{
"id": 51,
"name": "Updated Campaign Name",
"message": "New message content with discount link",
"scheduled_at": "2025-12-02T10:00:00Z",
"contact_list_id": 14,
"device_uuid": "8d23e2f5-8a9d-4a1b-9112-fdb71b3e0451",
"status": "scheduled",
"updated_at": "2025-11-01T14:22:00Z"
}You can only update campaigns that are still in draft or scheduled status.
Attempting to edit a running or completed campaign will result in a 403 Forbidden error.
DELETE/campaigns/{id}
Delete a campaign (only for draft or scheduled campaigns).
Permanently deletes a campaign from your account. This operation is only allowed for campaigns that are in draft or scheduled state.
Campaigns that are already running or completed cannot be deleted,
as they are kept for historical and reporting purposes.
Example
curl -X DELETE https://smsflow.app/api/v1/campaigns/51 \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json"Response
{
"message": "Campaign deleted successfully",
"deleted_campaign_id": 51
}Only draft and scheduled campaigns can be deleted.
Deleting a campaign removes all its configuration but keeps no logs or statistics.
If you try to delete a running or completed campaign,
the API will return 403 Forbidden with the message:
{
"error": "Only draft or scheduled campaigns can be deleted."
}