← All integrations

Send SMS from Zapier

Zapier connects thousands of apps, and Webhooks by Zapier lets any Zap call the NS SMS API. Your Android phone sends the text, so there is no per-message fee on top of your SIM plan.

Who this is for

  • Zapier users who want to text customers or staff when something happens in another app.
  • Teams that already pay for Zapier and want SMS without another SMS subscription.

Before you start

  • An Android phone (8.0 or newer) with a SIM card that can send SMS.
  • The NS SMS app from Google Play, set as the default SMS app, with "Accept API requests" turned on in the API tab.
  • Your phone ID (device_id) and API key (nss_...) from the API tab. Below they appear as YOUR_DEVICE_ID and nss_YOUR_API_KEY.
  • A Zapier plan that includes Webhooks by Zapier (it is a premium app, available on paid plans and trials).

No account, email or password. Install the app, turn on the API and copy your phone ID and API key.

Setup, step by step

  1. Step 1.Add the action

    In your Zap add an action step, search for Webhooks by Zapier and choose the Custom Request event.

  2. Step 2.Fill in the request

    Set the method, URL and headers as below.

    Webhooks by Zapier > Custom Request
    Method:               POST
    URL:                  https://sms-api.n-soft.pl/v1/sms/send
    Data Pass-Through?:   False
    Data:                 see below
    Basic Auth:           leave empty
    Headers:
      Authorization       Bearer nss_YOUR_API_KEY
      Content-Type        application/json
  3. Step 3.Paste the data

    Paste the JSON into Data and replace PHONE and MESSAGE with fields from earlier steps, using the insert data menu. Keep the quotes around them.

    Data
    {
      "device_id": "YOUR_DEVICE_ID",
      "to": "PHONE",
      "text": "MESSAGE"
    }

    If the text can contain quotes or line breaks, use the POST event instead: Payload Type json, and add device_id, to and text as Data rows plus the same Authorization header. Zapier then builds valid JSON for you.

  4. Step 4.Test the step

    Test the step. Zapier shows the response with an id and status accepted, and the phone sends the SMS.

Check the status and receive webhooks

The send request answers 202 with a message ID right away. The status then moves through received (the phone has it), sent and delivered, or failed with an error code. You can ask for it with GET /v1/sms/{id}, or let the server POST every change to a webhook address that you set in the app (API tab). Webhooks work on every plan and also report usage.warning, usage.limit_reached, device.offline and device.online.

For webhooks, create a new Zap with Webhooks by Zapier > Catch Hook as the trigger and copy its URL into the NS SMS app (API tab). Send a test SMS, then find the event in the trigger test. Zapier shows nested fields such as sms status as separate fields:

Webhooks by Zapier > Catch Hook (output)
Event              sms.status, usage.warning, usage.limit_reached,
                   device.offline or device.online
Sms Id             message ID from the send response
Sms Status         received, sent, delivered, failed ...
Sms Error Code     for example no_service (failed only)

Add a Filter step so the Zap continues only when, for example, Event is sms.status and Sms Status is failed. Catch Hook does not check the X-NS-Signature header; keep the URL private.

Troubleshooting

  • Numbers without a country code: add a Formatter by Zapier step (Numbers > Format Phone Number) and pick the E.164 format (+15558001212) before the webhook step.
  • The data is not valid JSON: a mapped field contains quotes or a line break. Switch to the POST event as described above.
  • 401 unauthorized: the Authorization header must be "Bearer " followed by the key, and device_id must belong to that key.
  • 403 api_disabled: open the app and turn on "Accept API requests" in the API tab.
  • 422 validation_failed: the number must be in international E.164 format, with + and the country code (for example +14155550123), and the text at most 1,600 characters.
  • 429: more than 30 requests a minute, or the daily or monthly cap of your plan (Free 50 a day, Pro 500, Business 1,000). The response says which one.

SMS API reference → SMS error codes → Plans and daily limits →

Use cases for Zapier

Other integrations