Skip to content

שליחה מרובה

שולחת הודעות שונות בקריאה אחת — כל אחת עם הטקסט שלה, השולח שלה והיעדים שלה. כשכל נמען מקבל את אותו גוף הודעה, sms היא הפעולה הנכונה; שליחת אצווה של הודעות זהות דרך bulk תעבוד אבל תבזבז את תקציב האצווה.

http
POST https://my.textme.co.il/api

bulk שליחת אצווה

גוף הבקשה עוטף אלמנט messages שמחזיק עד 2,500 אובייקטי sms. כל אחד מהם הוא גרסה מוקטנת של גוף הבקשה של sms: שולח, יעדים, טקסט וקישורים אופציונליים. הגדרות שחלות על האצווה כולה — תזמון, סינון לפי מועד שליחה אחרון, שם קמפיין — יושבות ברמה העליונה, מחוץ ל-messages.

פרמטרים

שםסוגתיאורחובה
bulkobjectאלמנט השורש.✔️
userobjectמכיל את אלמנט המשתמש.✔️
usernamestringשם המשתמש של החשבון שבו אתם מזוהים במערכת.✔️
messagesarray of objectsמכיל את כל אובייקטי ה-sms. מספר האובייקטים לא יעלה על 2500.✔️
messages.sms.sourcestringהשולח של ההודעה הזו. עד 11 תווים, ספרות ואותיות באנגלית בלבד, בלי +. חייב להיות שולח מאומת.✔️
messages.sms.destinationsobjectהיעדים של ההודעה הזו. יכול להחזיק כמה אלמנטי phone.✔️
messages.sms.phonestringמספר יעד, בפורמט 5xxxxxxx או 05xxxxxxx.✔️
messages.sms.idstringתכונה של phone. מזהה חיצוני משלכם ליעד הזה, לדוחות מסירה בהמשך.
messages.sms.messagestringגוף ההודעה הזו. עד 1005 תווים.✔️
messages.sms.linksobjectקישורים לקיצור בתוך ההודעה הזו. [link-id] בגוף ההודעה מסמן איפה כל אחד יופיע.
messages.sms.cl_idstringשליחת ההודעה הזו גם לרשימת תפוצה.
timingstringתזמון האצווה כולה, בפורמט dd/mm/yy hh:mm. נשלח מיד כשהשדה נעדר.
add_unsubscribeintמנגנון הסרה לאצווה: 3 לקישור, 2 להסרה בהודעה חוזרת.
temp_blstringדילוג על יעדים שקיבלו הודעה ב-n הימים האחרונים, 1–14.
includes_internationalint1 כדי לאפשר יעדים מחוץ לישראל, 0 אחרת.
campaign_namestringשם לאצווה בדוחות המערכת, והידית לביטול לפי שם. עד 50 תווים.

דוגמת בקשה

שתי הודעות, כל אחת ליעדים שלה, כשהשנייה נושאת קישור מקוצר:

xml
<?xml version="1.0" encoding="UTF-8"?>
<bulk>
    <user>
        <username>Leeroy</username>
    </user>
    <messages>
        <sms>
            <source>DemoAPI</source>
            <destinations>
                <phone id="external id1">5xxxxxxxx</phone>
                <phone id="external id2">5xxxxxxxx</phone>
                <phone>5xxxxxxxx</phone>
                <phone id="">5xxxxxxxx</phone>
            </destinations>
            <message>This is a sample message</message>
        </sms>
        <sms>
            <source>DemoAPI</source>
            <destinations>
                <phone id="">5xxxxxxxx</phone>
            </destinations>
            <message>This is a different message sent. [link-a1]</message>
            <links>
                <link id="a1">https://www.example.com/path/to/resource</link>
            </links>
        </sms>
    </messages>
    <timing>10/10/17 10:10</timing>
    <temp_bl>2</temp_bl>
    <includes_international>1</includes_international>
    <campaign_name>Sample Bulk Campaign</campaign_name>
</bulk>
json
{
  "bulk": {
    "user": {
      "username": "Leeroy"
    },
    "messages": {
      "sms": [
        {
          "source": "DemoAPI",
          "destinations": {
            "phone": [
              {
                "$": {
                  "id": "external id1"
                },
                "_": "5xxxxxxxx"
              },
              {
                "$": {
                  "id": "external id2"
                },
                "_": "5xxxxxxxx"
              },
              {
                "_": "5xxxxxxxx"
              },
              {
                "$": {
                  "id": ""
                },
                "_": "5xxxxxxxx"
              }
            ]
          },
          "message": "This is a sample message"
        },
        {
          "source": "DemoAPI",
          "destinations": {
            "phone": {
              "$": {
                "id": ""
              },
              "_": "5xxxxxxxx"
            }
          },
          "message": "This is a different message sent. [link-a1]",
          "links": {
            "link": [
              {
                "$": {
                  "id": "a1"
                },
                "_": "https://www.example.com/path/to/resource"
              }
            ]
          }
        }
      ]
    },
    "timing": "10/10/17 10:10",
    "temp_bl": "2",
    "includes_international": "1",
    "campaign_name": "Sample Bulk Campaign"
  }
}
bash
curl --location 'https://my.textme.co.il/api' \
--header "Authorization: Bearer $TEXTME_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
  "bulk": {
    "user": {
      "username": "Leeroy"
    },
    "messages": {
      "sms": [
        {
          "source": "DemoAPI",
          "destinations": {
            "phone": [
              {
                "$": {
                  "id": "external id1"
                },
                "_": "5xxxxxxxx"
              },
              {
                "$": {
                  "id": "external id2"
                },
                "_": "5xxxxxxxx"
              },
              {
                "_": "5xxxxxxxx"
              },
              {
                "$": {
                  "id": ""
                },
                "_": "5xxxxxxxx"
              }
            ]
          },
          "message": "This is a sample message"
        },
        {
          "source": "DemoAPI",
          "destinations": {
            "phone": {
              "$": {
                "id": ""
              },
              "_": "5xxxxxxxx"
            }
          },
          "message": "This is a different message sent. [link-a1]",
          "links": {
            "link": [
              {
                "$": {
                  "id": "a1"
                },
                "_": "https://www.example.com/path/to/resource"
              }
            ]
          }
        }
      ]
    },
    "timing": "10/10/17 10:10",
    "temp_bl": "2",
    "includes_international": "1",
    "campaign_name": "Sample Bulk Campaign"
  }
}'
js
// Node.js 18+ / דפדפנים — ללא תלויות
const response = await fetch('https://my.textme.co.il/api', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TEXTME_API_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    bulk: {
      user: {
        username: 'Leeroy',
      },
      messages: {
        sms: [
          {
            source: 'DemoAPI',
            destinations: {
              phone: [
                {
                  $: {
                    id: 'external id1',
                  },
                  _: '5xxxxxxxx',
                },
                {
                  $: {
                    id: 'external id2',
                  },
                  _: '5xxxxxxxx',
                },
                {
                  _: '5xxxxxxxx',
                },
                {
                  $: {
                    id: '',
                  },
                  _: '5xxxxxxxx',
                },
              ],
            },
            message: 'This is a sample message',
          },
          {
            source: 'DemoAPI',
            destinations: {
              phone: {
                $: {
                  id: '',
                },
                _: '5xxxxxxxx',
              },
            },
            message: 'This is a different message sent. [link-a1]',
            links: {
              link: [
                {
                  $: {
                    id: 'a1',
                  },
                  _: 'https://www.example.com/path/to/resource',
                },
              ],
            },
          },
        ],
      },
      timing: '10/10/17 10:10',
      temp_bl: '2',
      includes_international: '1',
      campaign_name: 'Sample Bulk Campaign',
    },
  }),
})

const result = await response.json()

// גם שגיאה חוזרת כ-HTTP 200 — הסטטוס שבגוף התשובה הוא הקובע
if (Number(result.status) !== 0) {
  throw new Error(`TextMe ${result.status}: ${result.message}`)
}

console.log(result)
php
<?php
// composer require guzzlehttp/guzzle

$client = new \GuzzleHttp\Client([
    'headers' => [
        'Authorization' => 'Bearer '.getenv('TEXTME_API_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

$response = $client->post('https://my.textme.co.il/api', [
    'json' => [
        'bulk' => [
            'user' => [
                'username' => 'Leeroy',
            ],
            'messages' => [
                'sms' => [
                    [
                        'source' => 'DemoAPI',
                        'destinations' => [
                            'phone' => [
                                [
                                    '$' => [
                                        'id' => 'external id1',
                                    ],
                                    '_' => '5xxxxxxxx',
                                ],
                                [
                                    '$' => [
                                        'id' => 'external id2',
                                    ],
                                    '_' => '5xxxxxxxx',
                                ],
                                [
                                    '_' => '5xxxxxxxx',
                                ],
                                [
                                    '$' => [
                                        'id' => '',
                                    ],
                                    '_' => '5xxxxxxxx',
                                ],
                            ],
                        ],
                        'message' => 'This is a sample message',
                    ],
                    [
                        'source' => 'DemoAPI',
                        'destinations' => [
                            'phone' => [
                                '$' => [
                                    'id' => '',
                                ],
                                '_' => '5xxxxxxxx',
                            ],
                        ],
                        'message' => 'This is a different message sent. [link-a1]',
                        'links' => [
                            'link' => [
                                [
                                    '$' => [
                                        'id' => 'a1',
                                    ],
                                    '_' => 'https://www.example.com/path/to/resource',
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'timing' => '10/10/17 10:10',
            'temp_bl' => '2',
            'includes_international' => '1',
            'campaign_name' => 'Sample Bulk Campaign',
        ],
    ],
]);

$result = json_decode($response->getBody()->getContents(), true);

// גם שגיאה חוזרת כ-HTTP 200 — הסטטוס שבגוף התשובה הוא הקובע
if ((int) $result['status'] !== 0) {
    throw new RuntimeException("TextMe {$result['status']}: {$result['message']}");
}

print_r($result);
php
<?php

use Illuminate\Support\Facades\Http;

$result = Http::withToken(config('services.textme.token'))
    ->acceptJson()
    ->post('https://my.textme.co.il/api', [
        'bulk' => [
            'user' => [
                'username' => 'Leeroy',
            ],
            'messages' => [
                'sms' => [
                    [
                        'source' => 'DemoAPI',
                        'destinations' => [
                            'phone' => [
                                [
                                    '$' => [
                                        'id' => 'external id1',
                                    ],
                                    '_' => '5xxxxxxxx',
                                ],
                                [
                                    '$' => [
                                        'id' => 'external id2',
                                    ],
                                    '_' => '5xxxxxxxx',
                                ],
                                [
                                    '_' => '5xxxxxxxx',
                                ],
                                [
                                    '$' => [
                                        'id' => '',
                                    ],
                                    '_' => '5xxxxxxxx',
                                ],
                            ],
                        ],
                        'message' => 'This is a sample message',
                    ],
                    [
                        'source' => 'DemoAPI',
                        'destinations' => [
                            'phone' => [
                                '$' => [
                                    'id' => '',
                                ],
                                '_' => '5xxxxxxxx',
                            ],
                        ],
                        'message' => 'This is a different message sent. [link-a1]',
                        'links' => [
                            'link' => [
                                [
                                    '$' => [
                                        'id' => 'a1',
                                    ],
                                    '_' => 'https://www.example.com/path/to/resource',
                                ],
                            ],
                        ],
                    ],
                ],
            ],
            'timing' => '10/10/17 10:10',
            'temp_bl' => '2',
            'includes_international' => '1',
            'campaign_name' => 'Sample Bulk Campaign',
        ],
    ])
    ->throw()
    ->json();

// גם שגיאה חוזרת כ-HTTP 200 — הסטטוס שבגוף התשובה הוא הקובע
throw_if((int) $result['status'] !== 0, RuntimeException::class,
    "TextMe {$result['status']}: {$result['message']}");

logger()->info('TextMe', $result);
python
# pip install httpx
import os

import httpx

response = httpx.post(
    "https://my.textme.co.il/api",
    headers={"Authorization": f"Bearer {os.environ['TEXTME_API_TOKEN']}"},
    json={
        "bulk": {
            "user": {
                "username": "Leeroy",
            },
            "messages": {
                "sms": [
                    {
                        "source": "DemoAPI",
                        "destinations": {
                            "phone": [
                                {
                                    "$": {
                                        "id": "external id1",
                                    },
                                    "_": "5xxxxxxxx",
                                },
                                {
                                    "$": {
                                        "id": "external id2",
                                    },
                                    "_": "5xxxxxxxx",
                                },
                                {
                                    "_": "5xxxxxxxx",
                                },
                                {
                                    "$": {
                                        "id": "",
                                    },
                                    "_": "5xxxxxxxx",
                                },
                            ],
                        },
                        "message": "This is a sample message",
                    },
                    {
                        "source": "DemoAPI",
                        "destinations": {
                            "phone": {
                                "$": {
                                    "id": "",
                                },
                                "_": "5xxxxxxxx",
                            },
                        },
                        "message": "This is a different message sent. [link-a1]",
                        "links": {
                            "link": [
                                {
                                    "$": {
                                        "id": "a1",
                                    },
                                    "_": "https://www.example.com/path/to/resource",
                                },
                            ],
                        },
                    },
                ],
            },
            "timing": "10/10/17 10:10",
            "temp_bl": "2",
            "includes_international": "1",
            "campaign_name": "Sample Bulk Campaign",
        },
    },
)
response.raise_for_status()
result = response.json()

# גם שגיאה חוזרת כ-HTTP 200 — הסטטוס שבגוף התשובה הוא הקובע
if int(result["status"]) != 0:
    raise RuntimeError(f"TextMe {result['status']}: {result['message']}")

print(result)
go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
)

func main() {
	payload, _ := json.Marshal(map[string]any{
		"bulk": map[string]any{
			"user": map[string]any{
				"username": "Leeroy",
			},
			"messages": map[string]any{
				"sms": []any{
					map[string]any{
						"source": "DemoAPI",
						"destinations": map[string]any{
							"phone": []any{
								map[string]any{
									"$": map[string]any{
										"id": "external id1",
									},
									"_": "5xxxxxxxx",
								},
								map[string]any{
									"$": map[string]any{
										"id": "external id2",
									},
									"_": "5xxxxxxxx",
								},
								map[string]any{
									"_": "5xxxxxxxx",
								},
								map[string]any{
									"$": map[string]any{
										"id": "",
									},
									"_": "5xxxxxxxx",
								},
							},
						},
						"message": "This is a sample message",
					},
					map[string]any{
						"source": "DemoAPI",
						"destinations": map[string]any{
							"phone": map[string]any{
								"$": map[string]any{
									"id": "",
								},
								"_": "5xxxxxxxx",
							},
						},
						"message": "This is a different message sent. [link-a1]",
						"links": map[string]any{
							"link": []any{
								map[string]any{
									"$": map[string]any{
										"id": "a1",
									},
									"_": "https://www.example.com/path/to/resource",
								},
							},
						},
					},
				},
			},
			"timing": "10/10/17 10:10",
			"temp_bl": "2",
			"includes_international": "1",
			"campaign_name": "Sample Bulk Campaign",
		},
	})

	req, _ := http.NewRequest("POST", "https://my.textme.co.il/api", bytes.NewReader(payload))
	req.Header.Set("Authorization", "Bearer "+os.Getenv("TEXTME_API_TOKEN"))
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	var result struct {
		Status  json.Number `json:"status"`
		Message string      `json:"message"`
	}
	if err := json.NewDecoder(res.Body).Decode(&result); err != nil {
		panic(err)
	}

	// גם שגיאה חוזרת כ-HTTP 200 — הסטטוס שבגוף התשובה הוא הקובע
	if result.Status.String() != "0" {
		panic(fmt.Sprintf("TextMe %s: %s", result.Status, result.Message))
	}

	fmt.Println(result.Message)
}
java
// Java 17+ — java.net.http, ללא תלויות (פענוח עם Jackson/Gson)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class TextMeSendBulk {
    public static void main(String[] args) throws Exception {
        String body = """
            {
              "bulk": {
                "user": {
                  "username": "Leeroy"
                },
                "messages": {
                  "sms": [
                    {
                      "source": "DemoAPI",
                      "destinations": {
                        "phone": [
                          {
                            "$": {
                              "id": "external id1"
                            },
                            "_": "5xxxxxxxx"
                          },
                          {
                            "$": {
                              "id": "external id2"
                            },
                            "_": "5xxxxxxxx"
                          },
                          {
                            "_": "5xxxxxxxx"
                          },
                          {
                            "$": {
                              "id": ""
                            },
                            "_": "5xxxxxxxx"
                          }
                        ]
                      },
                      "message": "This is a sample message"
                    },
                    {
                      "source": "DemoAPI",
                      "destinations": {
                        "phone": {
                          "$": {
                            "id": ""
                          },
                          "_": "5xxxxxxxx"
                        }
                      },
                      "message": "This is a different message sent. [link-a1]",
                      "links": {
                        "link": [
                          {
                            "$": {
                              "id": "a1"
                            },
                            "_": "https://www.example.com/path/to/resource"
                          }
                        ]
                      }
                    }
                  ]
                },
                "timing": "10/10/17 10:10",
                "temp_bl": "2",
                "includes_international": "1",
                "campaign_name": "Sample Bulk Campaign"
              }
            }
            """;

        HttpRequest request = HttpRequest.newBuilder(URI.create("https://my.textme.co.il/api"))
            .header("Authorization", "Bearer " + System.getenv("TEXTME_API_TOKEN"))
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(body))
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());

        // גם שגיאה חוזרת כ-HTTP 200 — הסטטוס שבגוף התשובה הוא הקובע
        System.out.println(response.body());
    }
}
csharp
// .NET 8+ — System.Net.Http
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;

var payload = """
    {
      "bulk": {
        "user": {
          "username": "Leeroy"
        },
        "messages": {
          "sms": [
            {
              "source": "DemoAPI",
              "destinations": {
                "phone": [
                  {
                    "$": {
                      "id": "external id1"
                    },
                    "_": "5xxxxxxxx"
                  },
                  {
                    "$": {
                      "id": "external id2"
                    },
                    "_": "5xxxxxxxx"
                  },
                  {
                    "_": "5xxxxxxxx"
                  },
                  {
                    "$": {
                      "id": ""
                    },
                    "_": "5xxxxxxxx"
                  }
                ]
              },
              "message": "This is a sample message"
            },
            {
              "source": "DemoAPI",
              "destinations": {
                "phone": {
                  "$": {
                    "id": ""
                  },
                  "_": "5xxxxxxxx"
                }
              },
              "message": "This is a different message sent. [link-a1]",
              "links": {
                "link": [
                  {
                    "$": {
                      "id": "a1"
                    },
                    "_": "https://www.example.com/path/to/resource"
                  }
                ]
              }
            }
          ]
        },
        "timing": "10/10/17 10:10",
        "temp_bl": "2",
        "includes_international": "1",
        "campaign_name": "Sample Bulk Campaign"
      }
    }
    """;

using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
    "Bearer", Environment.GetEnvironmentVariable("TEXTME_API_TOKEN"));

var response = await http.PostAsync("https://my.textme.co.il/api",
    new StringContent(payload, Encoding.UTF8, "application/json"));

var result = JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement;
var status = result.GetProperty("status").ToString();

// גם שגיאה חוזרת כ-HTTP 200 — הסטטוס שבגוף התשובה הוא הקובע
if (status != "0")
{
    var message = result.GetProperty("message").ToString();
    throw new Exception($"TextMe {status}: {message}");
}

Console.WriteLine(result);
ruby
require "net/http"
require "json"

uri = URI("https://my.textme.co.il/api")

request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer #{ENV.fetch('TEXTME_API_TOKEN')}"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "bulk" => {
    "user" => {
      "username" => "Leeroy",
    },
    "messages" => {
      "sms" => [
        {
          "source" => "DemoAPI",
          "destinations" => {
            "phone" => [
              {
                "$" => {
                  "id" => "external id1",
                },
                "_" => "5xxxxxxxx",
              },
              {
                "$" => {
                  "id" => "external id2",
                },
                "_" => "5xxxxxxxx",
              },
              {
                "_" => "5xxxxxxxx",
              },
              {
                "$" => {
                  "id" => "",
                },
                "_" => "5xxxxxxxx",
              },
            ],
          },
          "message" => "This is a sample message",
        },
        {
          "source" => "DemoAPI",
          "destinations" => {
            "phone" => {
              "$" => {
                "id" => "",
              },
              "_" => "5xxxxxxxx",
            },
          },
          "message" => "This is a different message sent. [link-a1]",
          "links" => {
            "link" => [
              {
                "$" => {
                  "id" => "a1",
                },
                "_" => "https://www.example.com/path/to/resource",
              },
            ],
          },
        },
      ],
    },
    "timing" => "10/10/17 10:10",
    "temp_bl" => "2",
    "includes_international" => "1",
    "campaign_name" => "Sample Bulk Campaign",
  },
})

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

result = JSON.parse(response.body)

# גם שגיאה חוזרת כ-HTTP 200 — הסטטוס שבגוף התשובה הוא הקובע
raise "TextMe #{result['status']}: #{result['message']}" unless result["status"].to_i.zero?

pp result
rust
// [dependencies]
// reqwest = { version = "0.12", features = ["json"] }
// tokio = { version = "1", features = ["full"] }
// serde_json = "1"
use serde_json::{json, Value};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let result: Value = reqwest::Client::new()
        .post("https://my.textme.co.il/api")
        .bearer_auth(std::env::var("TEXTME_API_TOKEN")?)
        .json(&json!({
          "bulk": {
            "user": {
              "username": "Leeroy"
            },
            "messages": {
              "sms": [
                {
                  "source": "DemoAPI",
                  "destinations": {
                    "phone": [
                      {
                        "$": {
                          "id": "external id1"
                        },
                        "_": "5xxxxxxxx"
                      },
                      {
                        "$": {
                          "id": "external id2"
                        },
                        "_": "5xxxxxxxx"
                      },
                      {
                        "_": "5xxxxxxxx"
                      },
                      {
                        "$": {
                          "id": ""
                        },
                        "_": "5xxxxxxxx"
                      }
                    ]
                  },
                  "message": "This is a sample message"
                },
                {
                  "source": "DemoAPI",
                  "destinations": {
                    "phone": {
                      "$": {
                        "id": ""
                      },
                      "_": "5xxxxxxxx"
                    }
                  },
                  "message": "This is a different message sent. [link-a1]",
                  "links": {
                    "link": [
                      {
                        "$": {
                          "id": "a1"
                        },
                        "_": "https://www.example.com/path/to/resource"
                      }
                    ]
                  }
                }
              ]
            },
            "timing": "10/10/17 10:10",
            "temp_bl": "2",
            "includes_international": "1",
            "campaign_name": "Sample Bulk Campaign"
          }
        }))
        .send()
        .await?
        .json()
        .await?;

    // גם שגיאה חוזרת כ-HTTP 200 — הסטטוס שבגוף התשובה הוא הקובע
    if result["status"] != 0 {
        return Err(format!("TextMe {}: {}", result["status"], result["message"]).into());
    }

    println!("{result}");
    Ok(())
}

תשובה

xml
<?xml version="1.0" encoding="UTF-8"?>
<sms>
    <status>0</status>
    <message>SMS bulk will be sent</message>
    <shipment_id>xxxxxxx</shipment_id>
</sms>
json
{
  "status": 0,
  "message": "SMS bulk will be sent",
  "shipment_id": "XXXXXXX"
}
שדהסוגתיאור
statusint0 — האצווה נתקבלה.
messagestringSMS bulk will be sent.
shipment_idstringמזהה את הקמפיין שנוצר עבור האצווה כולה.

מזהה אחד לאצווה כולה

shipment_id מזהה את האצווה, לא את ההודעות הבודדות שבתוכה. כדי להתאים נתונים לכל יעד בנפרד, הגדירו תכונת id על כל phone ושלפו דוחות מסירה לפי מזהה חיצוני.

שגיאות

Statusמתי
2חסר אלמנט חובה; ה-message מציין איזה.
4אין מספיק יתרה לאצווה.
5מחוץ לשעות השליחה המותרות לחשבון.
8כל היעדים באצווה ברשימת החסימה.
9יעד קצר או ארוך מדי.
515אחד ה-source אינו שולח מאומת.
714temp_bl מחוץ לטווח 1–14.
715כל היעדים סוננו על ידי temp_bl.
989גוף הודעה ריק או עובר 1005 תווים, או ש-campaign_name עובר 50.

הערות על השדות

מגבלות האצווה

התקרה הקשיחה היא 2,500 אובייקטי sms לכל קריאה — אובייקטים, לא נמענים. אובייקט בודד שמופנה ל-400 מספרים נחשב כאחד. פיצול ריצה גדולה לכמה קריאות הוא בסדר; כל אחת מחזירה shipment_id משלה, ומתן אותו campaign_name לכולן מאפשר לבטל את כל הריצה בבקשה אחת.

הגדרות ברמת ההודעה מול הגדרות ברמת האצווה

זו החלוקה שמבלבלת:

הגדרהאיפה היא יושבת
source, message, destinations, linksבתוך כל אובייקט sms
timing, temp_bl, includes_international, campaign_name, add_unsubscribeעל שורש ה-bulk

אי אפשר לתזמן הודעות בודדות בתוך אצווה לשעות שונות. שעות שונות פירושן קריאות שונות.

ממשק ה-SOAP מתנהג אחרת כאן

sendBulkSms דרך SOAP מתעלם מ-timing לחלוטין. פעולת bulk המתועדת בעמוד הזה מכבדת אותו ברמת האצווה.

פרסונליזציה

bulk מבצעת פרסונליזציה מעצם המבנה: אתם בונים את הטקסט המדויק לכל נמען. זה הכלי הנכון כשהחלק המשתנה מגיע ממסד הנתונים שלכם — מספר הזמנה, חלון מסירה, קוד חד-פעמי.

כשהחלק המשתנה כבר שמור ב-TextMe, sms עם add_dynamic דורשת פחות עבודה: שמרו את ערכי המיזוג כשדות דינמיים ברשימת תפוצה ושלחו הודעה אחת עם תבנית. ראו שליחה מרובה ופרסונליזציה כדי לבחור.