Skip to Content
חבילות מסרונים גדולות במחירים ממש קטנים - התקשרו 055-9-91-91-91
TextMe SMS API

SMS API for Israel: send & receive SMS from your code

A simple REST API to send SMS, receive replies via webhook, and track delivery. Built for developers and product teams shipping in Israel.

  • REST • JSON
  • Incoming-reply webhooks
  • Delivery callbacks
  • Hebrew & English

5-minute quickstart

  1. Buy an SMS package and open your account at my.textme.co.il.
  2. Create your API token in the account interface (API Token Management), then generate more via the API if needed.
  3. Send your first SMS with a POST request (see below).
  4. Receive replies by registering a webhook URL in your account.
curl -X POST https://my.textme.co.il/api \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "YOUR_ACCOUNT",
    "source": "MyBrand",
    "message": "Hello from my app",
    "destinations": { "phone": "0501234567" }
  }'

Replace YOUR_TOKEN and YOUR_ACCOUNT. source ≤ 11 chars; message ≤ 1005 chars.

Send SMS from your system

Authenticate with a Bearer token and POST to the API. Base URL: https://my.textme.co.il/api (sandbox: https://my.textme.co.il/api/test).

PHP

<?php
$ch = curl_init('https://my.textme.co.il/api');
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer YOUR_TOKEN',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => json_encode([
    'username' => 'YOUR_ACCOUNT',
    'source' => 'MyBrand',
    'message' => 'Hello from my app',
    'destinations' => ['phone' => '0501234567'],
  ]),
]);
$response = curl_exec($ch);
echo $response;

Python

import requests

resp = requests.post(
    "https://my.textme.co.il/api",
    headers={"Authorization": "Bearer YOUR_TOKEN"},
    json={
        "username": "YOUR_ACCOUNT",
        "source": "MyBrand",
        "message": "Hello from my app",
        "destinations": {"phone": "0501234567"},
    },
)
print(resp.text)

Node.js

const res = await fetch("https://my.textme.co.il/api", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    username: "YOUR_ACCOUNT",
    source: "MyBrand",
    message: "Hello from my app",
    destinations: { phone: "0501234567" },
  }),
});
console.log(await res.text());

Receive replies & delivery status in your system

Register a callback URL in your account. When a customer replies, or a message is delivered, TextMe sends an HTTP POST (application/x-www-form-urlencoded) to your URL. Your endpoint must return 200 OK.

Incoming reply → your webhook (PHP)

<?php
// TextMe POSTs application/x-www-form-urlencoded on each incoming reply.
$message = $_POST['message'] ?? '';   // reply text
$phone   = $_POST['phone']   ?? '';   // sender (customer) number
$dest    = $_POST['dest']    ?? '';   // your TextMe number
$date    = $_POST['date']    ?? '';

// ... store the reply in your system ...

http_response_code(200); // you MUST return 200 OK

Delivery status (DLR) → your webhook (PHP)

<?php
$external_id = $_POST['external_id'] ?? '';
$status      = $_POST['status']      ?? '';
$he_message  = $_POST['he_message']  ?? '';
$en_message  = $_POST['en_message']  ?? '';
$phone       = $_POST['phone']       ?? '';
$date        = $_POST['date']        ?? '';

// ... update the delivery status for external_id ...

http_response_code(200);

Register your callback URL in your account. On any non-200 response TextMe retries for a while, then stops.

API לשליחת SMS בעברית

TextMe מספקת ממשק API פשוט לשליחת SMS, קבלת תשובות נכנסות ישירות למערכת שלכם (webhook), ומעקב אחר מסירת הודעות. מתאים למפתחים, אנשי פיתוח ומערכות שרוצים לחבר סמס לקוד שלהם, כולל חיבור API לסמס, שליחת SMS דרך API, וקבלת הודעות נכנסות.

מידע נוסף על ה-API בעברית »

Developer FAQ

Do you have a REST SMS API in Israel?

Yes. TextMe offers a REST API at https://my.textme.co.il/api to send SMS, receive replies via webhook, and track delivery, with a Hebrew and English interface.

How do I receive SMS replies via the API?

Register a webhook (callback) URL in your account. TextMe POSTs each incoming reply to your URL with the sender number and message text, so replies flow straight into your system.

How do I get an API token?

Create your first token in the account interface (API Token Management), then generate additional tokens via the API. Tokens use Bearer authentication.

Back to top
היי, איך אפשר לעזור? נא לציין את כתובת הדוא"ל של המשתמש שלכם במערכת 16:12