SMS API

A plain REST API for SMSの送信

POST your sender, recipient and content with a Token header. Get a message ID straight back, and delivery reports pushed to your server.

最初の SMS を送信する

One request, one message

Authenticate with your access key, POST the message, and read the msgid from the response. Press the button to see it run.

curl -X POST https://secure.smslocal.com/api/service/enterprise-service/external/sms \
  -H "Token: $SMSLOCAL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "SMSLOCAL",
    "to": "14155550123",
    "content": "Your code is 481920."
  }'
POST /外部/SMS
役職/external/sms
応答

Run the request to see the response.

Built for developers

Nothing exotic to learn

Three ideas cover the whole API, which follows plain REST conventions.

  1. Authentication

    Token authentication

    Send your access key in a Token header on every request, with JSON in and JSON out.

    • No SDK required
    • Works from any language
    • Keep the key in an environment variable
  2. 応答

    Know it was accepted

    Every send returns a msgid and an errorcode immediately.

    • Store the msgid against your own record
    • errorcode 0 means accepted
    • Use the msgid to match reports later
  3. Replies

    Two-way by default

    Replies arrive on the same callback, marked as mobile originated.

    • Same message shape as reports
    • Tell directions apart with mt / mo
    • Route replies to your support tools
配信レポート

See what happened to every message

A status report is posted to your callback URL when a message reaches its final state.

  1. 1
    Match by msgidEvery report carries the ID you were given at send time.
  2. 2
    Final states onlyYou hear about a message when it is delivered or has failed.
  3. 3
    One callback URLThe same endpoint receives reports and replies.
Delivery log実例
  • 9f2a7c10+1 415 ••• 0123納品済みjust now
  • 9f2a7c11+91 98••• 43210納品済み3 s ago
  • 9f2a7c12+44 7••• 123456保留中5 s ago
  • 9f2a7c13+91 99••• 00012Failed9 s ago
Know before you send

See how a message is counted

Longer text and non-Latin characters change how many parts a message is billed as. Try your own wording, and look up a number before you send.

GSM746 キャラクター160 部位ごとに
1一部別途請求される
  • 一部 1
    46 / 160

1 つの部分には、GSM7 の場合は 160 文字、Unicode の場合は 70 文字が含まれます。絵文字やヒンディー語文字などの 1 つの非 GSM 文字により、メッセージ全体が Unicode に切り替わります。

API を使用する理由

メッセージを手作業で貼り付けるのはやめましょう

分割線をドラッグして比較します。

SMS APIを使用するYour appSMS APIone endpointCustomersdelivery reports and replies, pushed back
  • 独自のコードから送信されたメッセージ
  • すべてのメッセージのレポート
  • 応答がシステムにプッシュされる
メッセージング API を使用しない場合Your teamCSV exportSpreadsheetVendor portalShared inboxCustomers???
  • 手動でのエクスポートとアップロード
  • メッセージが届いたかどうかわからない
  • 返信が誰かの受信箱に届く
ライブに行く前に

短い発売前チェックリスト

0%0 の 9

途中で項目にチェックを入れます。ここでは何も保存されません。

01アカウント
02コンプライアンス (インド)
03テスト
あなたの質問への答え

SMS API — よくある質問

Content-Type: application/json とともに、すべてのリクエストの Token ヘッダーでアクセス キーを渡します。

送信するたびに msgid が返されます。コールバック URL を指定すると、メッセージが最終状態に達したときにステータス レポートがその URL に投稿されます。

GSM7 エンコードでは 160 文字、Unicode では 70 文字。長いメッセージは複数の部分から結合され、それぞれ個別に請求されます。

はい。受信応答は同じコールバック URL に配信され、モバイル発信としてマークされます。

はい。インドの番号への SMS では、承認されたエンティティ、送信者ヘッダー、およびテンプレートを使用する必要があります。私たちのチームは、オンボーディング中にそれらを登録するのをお手伝いします。

始めましょう

最初の SMS を数分で送信します

アカウントを作成し、アクセス キーを取得して、最初のリクエストを行ってください。