API Reference

SMSPorta API

A REST API that sends an SMS through your connected Android device. All requests are HTTPS and authenticated with an API key. Base URL:

https://smsporta.com/api/v1

Authentication

Every request must include your secret key in the Authorization header as a Bearer token. Create and manage keys from the API Keys page in your dashboard.

Authorization: Bearer smsp_3f9c...
POST

/messages

Queue an SMS message for delivery through a connected device. Messages move through queueddispatchedsent or failed.

Body parameters
to
required
Recipient phone number in E.164 format, e.g. +3512345678.
body
required
The text content of the message.
curl -X POST https://smsporta.com/api/v1/messages \
  -H "Authorization: Bearer smsp_3f9c..." \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+3512345678",
    "body": "Hello from SMSPorta"
  }'
POST /api/v1/messages HTTP/1.1
Host: smsporta.com
Authorization: Bearer smsp_3f9c...
Content-Type: application/json

{
  "to": "+3512345678",
  "body": "Hello from SMSPorta"
}
GET

/messages/:id

Fetch a single message you own by its id, including its current status and full body.

curl https://smsporta.com/api/v1/messages/:id \
  -H "Authorization: Bearer smsp_3f9c..."
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "uuid",
  "status": "sent",
  "to": "+3512345678",
  "body": "Hello from SMSPorta",
  "inserted_at": "2026-06-28T10:00:00Z",
  "updated_at": "2026-06-28T10:00:04Z"
}
GET

/messages?page=1&limit=20

List your messages, newest first, with simple page/limit pagination.

curl "https://smsporta.com/api/v1/messages?page=1&limit=20" \
  -H "Authorization: Bearer smsp_3f9c..."
HTTP/1.1 200 OK
Content-Type: application/json

{
  "data": [
    {
      "id": "uuid",
      "status": "sent",
      "to": "+3512345678",
      "inserted_at": "2026-06-28T10:00:00Z"
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 1
}

Phones

Register, list and remove the Android devices acting as your SMS gateways. Each device connects over MQTT using credentials issued at registration time.

POST

/phones

Body: { "name": "My Phone" }. The response includes one-time MQTT credentials — mqtt_password is shown only once and cannot be retrieved again.

curl -X POST https://smsporta.com/api/v1/phones \
  -H "Authorization: Bearer smsp_3f9c..." \
  -H "Content-Type: application/json" \
  -d '{ "name": "My Phone" }'
HTTP/1.1 201 Created
Content-Type: application/json

{
  "id": "uuid",
  "name": "My Phone",
  "mqtt_client_id": "phone_8f2c",
  "mqtt_username": "phone_8f2c",
  "mqtt_password": "shown-once-only",
  "mqtt_host": "mqtt.smsporta.com",
  "mqtt_port": 8883
}
GET

/phones

List your phones. Credentials are never included here.

curl https://smsporta.com/api/v1/phones \
  -H "Authorization: Bearer smsp_3f9c..."
DELETE

/phones/:id

Remove a phone gateway. Scoped to phones you own.

curl -X DELETE https://smsporta.com/api/v1/phones/:id \
  -H "Authorization: Bearer smsp_3f9c..."
DELETE

/account

GDPR endpoint — permanently deletes your account and all associated data (phones, messages, API keys, tokens).

curl -X DELETE https://smsporta.com/api/v1/account \
  -H "Authorization: Bearer smsp_3f9c..."
Integration

SMSPorta for Shopify

The SMSPorta app for Shopify sends transactional order SMS — order placed, shipped, delivered and cancelled — straight to your customers' phones. Messages go out through your own Android phone and SIM, the same gateway you already use with SMSPorta, so texts arrive from a real, local number.

Because it uses your own device, there's no shared sender pool, no per-message carrier surcharge from us, and delivery behaves exactly like a text you sent yourself.

Installing the app

1
Install SMSPorta SMS Notifications from the Shopify App Store onto your store.
2
A SMSPorta account is created automatically from your store's email — no separate signup.
3
Install the free SMSPorta Android app on the phone you want to send from, and pair it using the key shown in the setup wizard.
4
Turn on the order events you want and customize the message text. You're live.

Order events

Each event can be turned on or off independently from the app's settings screen inside Shopify.

order_created
A customer places a new order.
order_cancelled
An order is cancelled.
order_shipped
An order is marked fulfilled by the store.
order_delivered
The carrier reports the order as delivered.

Message templates

Each event has an editable template. Drop in any of these variables and they're filled in automatically when the text is sent:

{{shop_name}}
Your store's name.
{{customer_first_name}}
The customer's first name.
{{order_number}}
The order number, e.g. #1001.
{{order_total}}
The order total, e.g. 49.90.
{{tracking_number}}
Carrier tracking number (shipped/delivered events only).
{{tracking_url}}
Carrier tracking link (shipped/delivered events only).
Hi {{customer_first_name}}, your {{shop_name}} order {{order_number}} has shipped! Track it: {{tracking_url}}

Requires Android 7.0 or newer and a phone with an active SIM. You're the sender of record for messages sent through your own device — please follow your local rules on marketing and transactional SMS.

Status codes

201
Created — message queued or phone registered.
200
OK — request succeeded.
401
Missing or invalid API key.
404
Not found — resource does not exist or isn't yours.
422
Validation error, or monthly rate limit reached — {"error":"rate_limited"}.
Ready to send your first message?
Create an API key in your dashboard.
Get an API key