---
url: https://textme-docs.matat.io/he/endpoints/send.md
description: >-
  sms: שליחת גוף הודעה אחד למספרי טלפון ולרשימות תפוצה, עם תזמון, קישורים
  מקוצרים, נספחי הסרה, סינון לפי מועד ושם קמפיין.
---

# שליחת SMS

שולחת **גוף הודעה אחד** לכל מספר יעדים. מספרי טלפון בודדים, רשימות תפוצה שלמות, או שילוב של שניהם. כשכל נמען צריך טקסט *שונה*, השתמשו ב-[`bulk`](./bulk.md) במקום. כדי שההודעה תישמע בשיחת טלפון ולא תישלח כ-SMS, צרפו בלוק [`tts`](./tts.md).

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

## `sms` שליחת הודעה

### פרמטרים {#parameters}

| שם | סוג | תיאור | חובה |
|---|---|---|---|
| `sms` | object | אלמנט השורש. | ✔️ |
| `user` | object | מכיל את אלמנט המשתמש. | ✔️ |
| `username` | string | שם המשתמש של החשבון שבו אתם מזוהים במערכת. | ✔️ |
| `source` | string | המספר או השם שההודעה תיראה כאילו נשלחה ממנו. עד 11 תווים, ספרות ואותיות באנגלית בלבד, בלי `+`. חייב להיות [שולח מאומת](./verified-senders.md). | ✔️ |
| `destinations` | object | מכיל את כל היעדים. יכול להחזיק כמה אלמנטי `phone` וכמה אלמנטי `cl_id`. | ✔️ |
| `phone` | string | מספר יעד, בפורמט `5xxxxxxx` או `05xxxxxxx`. | ✔️ |
| `id` | string | תכונה של `phone`. מזהה חיצוני משלכם ליעד הזה, כדי שתוכלו לשלוף את דוח המסירה שלו בהמשך. השמיטו אותו, או השאירו ריק, אם אינכם צריכים דוחות. | ➖ |
| `cl_id` | string | שליחה ל[רשימת תפוצה](./contact-lists.md) שלמה לפי המזהה שלה. חזרתי. | ➖ |
| `message` | string | גוף ההודעה. עד 1005 תווים. | ✔️ |
| `tag` | string | תחילית שמודבקת לראש ההודעה. מיועדת לאימות SMS האוטומטי של Google. `<tag>#</tag>` עם `<message>Hello world</message>` נמסר כ-`<#>Hello world`. | ➖ |
| `add_dynamic` | string | ערך `1` כדי לשלב את השדות הדינמיים של רשימת התפוצה בהודעה. כל ערך אחר נחשב "לא". דורש `cl_id` אחד בדיוק ואף אלמנט `phone` בודד. | ➖ |
| `timing` | string | תזמון השליחה, בפורמט `dd/mm/yy hh:mm`. נשלח מיד כשהשדה נעדר. | ➖ |
| `add_unsubscribe` | int | הוספת מנגנון הסרה: `3` לקישור הסרה, `2` להסרה בהודעה חוזרת. כל ערך אחר נחשב "לא". | ➖ |
| `temp_bl` | string | דילוג על יעדים שכבר קיבלו הודעה ב-*n* הימים האחרונים, כאשר *n* הוא 1 עד 14. | ➖ |
| `includes_international` | int | `1` כדי לאפשר יעדים מחוץ לישראל, `0` אחרת. | ➖ |
| `campaign_name` | string | שם שיוצג בדוחות המערכת, והידית ל[ביטול לפי שם](./campaigns.md). עד 50 תווים. | ➖ |
| `links` | object | מכיל את הקישורים לקיצור. יכול להחזיק כמה אלמנטי `link`. | ➖ |
| `link` | string | כתובת URL לקיצור. חייבת לשאת תכונת `id`; כתבו `[link-id]` בגוף ההודעה במקום שבו הקישור המקוצר צריך להופיע. | ➖ |

### דוגמת בקשה

::: code-group

```xml [XML]
<?xml version="1.0" encoding="UTF-8"?>
<sms>
    <user>
        <username>Leeroy</username>
    </user>
    <source>DemoAPI</source>
    <destinations>
        <cl_id>21518</cl_id>
        <cl_id>21500</cl_id>
        <phone id="external id1">5xxxxxxxx</phone>
        <phone id="external id2">5xxxxxxxx</phone>
        <phone>5xxxxxxxx</phone>
        <phone id="">5xxxxxxxx</phone>
    </destinations>
    <tag>#</tag>
    <message>This is a sample message. [link-a1]</message>
    <add_dynamic>0</add_dynamic>
    <timing>30/03/14 10:10</timing>
    <add_unsubscribe>0</add_unsubscribe>
    <temp_bl>2</temp_bl>
    <includes_international>1</includes_international>
    <campaign_name>Sample Campaign</campaign_name>
    <links>
        <link id="a1">https://www.example.com/path/to/resource</link>
    </links>
</sms>
```

```json [JSON]
{
  "sms": {
    "user": {
      "username": "Leeroy"
    },
    "source": "DemoAPI",
    "destinations": {
      "cl_id": [
        "21518",
        "21500"
      ],
      "phone": [
        {
          "$": {
            "id": "external id1"
          },
          "_": "5xxxxxxxx"
        },
        {
          "$": {
            "id": "external id2"
          },
          "_": "5xxxxxxxx"
        },
        {
          "_": "5xxxxxxxx"
        },
        {
          "$": {
            "id": ""
          },
          "_": "5xxxxxxxx"
        }
      ]
    },
    "tag": "#",
    "message": "This is a sample message. [link-a1]",
    "add_dynamic": "0",
    "timing": "30/03/14 10:10",
    "add_unsubscribe": "0",
    "temp_bl": "2",
    "includes_international": "1",
    "campaign_name": "Sample Campaign",
    "links": {
      "link": [
        {
          "$": {
            "id": "a1"
          },
          "_": "https://www.example.com/path/to/resource"
        }
      ]
    }
  }
}
```

```bash [cURL]
curl --location 'https://my.textme.co.il/api' \
--header "Authorization: Bearer $TEXTME_API_TOKEN" \
--header 'Content-Type: application/json' \
--data '{
  "sms": {
    "user": {
      "username": "Leeroy"
    },
    "source": "DemoAPI",
    "destinations": {
      "cl_id": [
        "21518",
        "21500"
      ],
      "phone": [
        {
          "$": {
            "id": "external id1"
          },
          "_": "5xxxxxxxx"
        },
        {
          "$": {
            "id": "external id2"
          },
          "_": "5xxxxxxxx"
        },
        {
          "_": "5xxxxxxxx"
        },
        {
          "$": {
            "id": ""
          },
          "_": "5xxxxxxxx"
        }
      ]
    },
    "tag": "#",
    "message": "This is a sample message. [link-a1]",
    "add_dynamic": "0",
    "timing": "30/03/14 10:10",
    "add_unsubscribe": "0",
    "temp_bl": "2",
    "includes_international": "1",
    "campaign_name": "Sample Campaign",
    "links": {
      "link": [
        {
          "$": {
            "id": "a1"
          },
          "_": "https://www.example.com/path/to/resource"
        }
      ]
    }
  }
}'
```

```js [JavaScript]
// 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({
    sms: {
      user: {
        username: 'Leeroy',
      },
      source: 'DemoAPI',
      destinations: {
        cl_id: [
          '21518',
          '21500',
        ],
        phone: [
          {
            $: {
              id: 'external id1',
            },
            _: '5xxxxxxxx',
          },
          {
            $: {
              id: 'external id2',
            },
            _: '5xxxxxxxx',
          },
          {
            _: '5xxxxxxxx',
          },
          {
            $: {
              id: '',
            },
            _: '5xxxxxxxx',
          },
        ],
      },
      tag: '#',
      message: 'This is a sample message. [link-a1]',
      add_dynamic: '0',
      timing: '30/03/14 10:10',
      add_unsubscribe: '0',
      temp_bl: '2',
      includes_international: '1',
      campaign_name: 'Sample Campaign',
      links: {
        link: [
          {
            $: {
              id: 'a1',
            },
            _: 'https://www.example.com/path/to/resource',
          },
        ],
      },
    },
  }),
})

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]
<?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' => [
        'sms' => [
            'user' => [
                'username' => 'Leeroy',
            ],
            'source' => 'DemoAPI',
            'destinations' => [
                'cl_id' => [
                    '21518',
                    '21500',
                ],
                'phone' => [
                    [
                        '$' => [
                            'id' => 'external id1',
                        ],
                        '_' => '5xxxxxxxx',
                    ],
                    [
                        '$' => [
                            'id' => 'external id2',
                        ],
                        '_' => '5xxxxxxxx',
                    ],
                    [
                        '_' => '5xxxxxxxx',
                    ],
                    [
                        '$' => [
                            'id' => '',
                        ],
                        '_' => '5xxxxxxxx',
                    ],
                ],
            ],
            'tag' => '#',
            'message' => 'This is a sample message. [link-a1]',
            'add_dynamic' => '0',
            'timing' => '30/03/14 10:10',
            'add_unsubscribe' => '0',
            'temp_bl' => '2',
            'includes_international' => '1',
            'campaign_name' => 'Sample Campaign',
            'links' => [
                'link' => [
                    [
                        '$' => [
                            'id' => 'a1',
                        ],
                        '_' => 'https://www.example.com/path/to/resource',
                    ],
                ],
            ],
        ],
    ],
]);

$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 [Laravel]
<?php

use Illuminate\Support\Facades\Http;

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

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

logger()->info('TextMe', $result);
```

```python [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={
        "sms": {
            "user": {
                "username": "Leeroy",
            },
            "source": "DemoAPI",
            "destinations": {
                "cl_id": [
                    "21518",
                    "21500",
                ],
                "phone": [
                    {
                        "$": {
                            "id": "external id1",
                        },
                        "_": "5xxxxxxxx",
                    },
                    {
                        "$": {
                            "id": "external id2",
                        },
                        "_": "5xxxxxxxx",
                    },
                    {
                        "_": "5xxxxxxxx",
                    },
                    {
                        "$": {
                            "id": "",
                        },
                        "_": "5xxxxxxxx",
                    },
                ],
            },
            "tag": "#",
            "message": "This is a sample message. [link-a1]",
            "add_dynamic": "0",
            "timing": "30/03/14 10:10",
            "add_unsubscribe": "0",
            "temp_bl": "2",
            "includes_international": "1",
            "campaign_name": "Sample Campaign",
            "links": {
                "link": [
                    {
                        "$": {
                            "id": "a1",
                        },
                        "_": "https://www.example.com/path/to/resource",
                    },
                ],
            },
        },
    },
)
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 [Go]
package main

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

func main() {
	payload, _ := json.Marshal(map[string]any{
		"sms": map[string]any{
			"user": map[string]any{
				"username": "Leeroy",
			},
			"source": "DemoAPI",
			"destinations": map[string]any{
				"cl_id": []any{
					"21518",
					"21500",
				},
				"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",
					},
				},
			},
			"tag": "#",
			"message": "This is a sample message. [link-a1]",
			"add_dynamic": "0",
			"timing": "30/03/14 10:10",
			"add_unsubscribe": "0",
			"temp_bl": "2",
			"includes_international": "1",
			"campaign_name": "Sample Campaign",
			"links": map[string]any{
				"link": []any{
					map[string]any{
						"$": map[string]any{
							"id": "a1",
						},
						"_": "https://www.example.com/path/to/resource",
					},
				},
			},
		},
	})

	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]
// 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 TextMeSendSms {
    public static void main(String[] args) throws Exception {
        String body = """
            {
              "sms": {
                "user": {
                  "username": "Leeroy"
                },
                "source": "DemoAPI",
                "destinations": {
                  "cl_id": [
                    "21518",
                    "21500"
                  ],
                  "phone": [
                    {
                      "$": {
                        "id": "external id1"
                      },
                      "_": "5xxxxxxxx"
                    },
                    {
                      "$": {
                        "id": "external id2"
                      },
                      "_": "5xxxxxxxx"
                    },
                    {
                      "_": "5xxxxxxxx"
                    },
                    {
                      "$": {
                        "id": ""
                      },
                      "_": "5xxxxxxxx"
                    }
                  ]
                },
                "tag": "#",
                "message": "This is a sample message. [link-a1]",
                "add_dynamic": "0",
                "timing": "30/03/14 10:10",
                "add_unsubscribe": "0",
                "temp_bl": "2",
                "includes_international": "1",
                "campaign_name": "Sample Campaign",
                "links": {
                  "link": [
                    {
                      "$": {
                        "id": "a1"
                      },
                      "_": "https://www.example.com/path/to/resource"
                    }
                  ]
                }
              }
            }
            """;

        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 [C#]
// .NET 8+ using System.Net.Http
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;

var payload = """
    {
      "sms": {
        "user": {
          "username": "Leeroy"
        },
        "source": "DemoAPI",
        "destinations": {
          "cl_id": [
            "21518",
            "21500"
          ],
          "phone": [
            {
              "$": {
                "id": "external id1"
              },
              "_": "5xxxxxxxx"
            },
            {
              "$": {
                "id": "external id2"
              },
              "_": "5xxxxxxxx"
            },
            {
              "_": "5xxxxxxxx"
            },
            {
              "$": {
                "id": ""
              },
              "_": "5xxxxxxxx"
            }
          ]
        },
        "tag": "#",
        "message": "This is a sample message. [link-a1]",
        "add_dynamic": "0",
        "timing": "30/03/14 10:10",
        "add_unsubscribe": "0",
        "temp_bl": "2",
        "includes_international": "1",
        "campaign_name": "Sample Campaign",
        "links": {
          "link": [
            {
              "$": {
                "id": "a1"
              },
              "_": "https://www.example.com/path/to/resource"
            }
          ]
        }
      }
    }
    """;

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 [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({
  "sms" => {
    "user" => {
      "username" => "Leeroy",
    },
    "source" => "DemoAPI",
    "destinations" => {
      "cl_id" => [
        "21518",
        "21500",
      ],
      "phone" => [
        {
          "$" => {
            "id" => "external id1",
          },
          "_" => "5xxxxxxxx",
        },
        {
          "$" => {
            "id" => "external id2",
          },
          "_" => "5xxxxxxxx",
        },
        {
          "_" => "5xxxxxxxx",
        },
        {
          "$" => {
            "id" => "",
          },
          "_" => "5xxxxxxxx",
        },
      ],
    },
    "tag" => "#",
    "message" => "This is a sample message. [link-a1]",
    "add_dynamic" => "0",
    "timing" => "30/03/14 10:10",
    "add_unsubscribe" => "0",
    "temp_bl" => "2",
    "includes_international" => "1",
    "campaign_name" => "Sample Campaign",
    "links" => {
      "link" => [
        {
          "$" => {
            "id" => "a1",
          },
          "_" => "https://www.example.com/path/to/resource",
        },
      ],
    },
  },
})

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 [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!({
          "sms": {
            "user": {
              "username": "Leeroy"
            },
            "source": "DemoAPI",
            "destinations": {
              "cl_id": [
                "21518",
                "21500"
              ],
              "phone": [
                {
                  "$": {
                    "id": "external id1"
                  },
                  "_": "5xxxxxxxx"
                },
                {
                  "$": {
                    "id": "external id2"
                  },
                  "_": "5xxxxxxxx"
                },
                {
                  "_": "5xxxxxxxx"
                },
                {
                  "$": {
                    "id": ""
                  },
                  "_": "5xxxxxxxx"
                }
              ]
            },
            "tag": "#",
            "message": "This is a sample message. [link-a1]",
            "add_dynamic": "0",
            "timing": "30/03/14 10:10",
            "add_unsubscribe": "0",
            "temp_bl": "2",
            "includes_international": "1",
            "campaign_name": "Sample Campaign",
            "links": {
              "link": [
                {
                  "$": {
                    "id": "a1"
                  },
                  "_": "https://www.example.com/path/to/resource"
                }
              ]
            }
          }
        }))
        .send()
        .await?
        .json()
        .await?;

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

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

:::

### תשובה

::: code-group

```xml [XML]
<?xml version="1.0" encoding="UTF-8"?>
<sms>
    <status>0</status>
    <message>SMS will be sent</message>
    <shipment_id>xxxxxxx</shipment_id>
</sms>
```

```json [JSON]
{
  "status": 0,
  "message": "SMS will be sent",
  "shipment_id": "XXXXXXX"
}
```

:::

| שדה | סוג | תיאור |
|---|---|---|
| `status` | int | `0`. ההודעה נתקבלה לשליחה. |
| `message` | string | `SMS will be sent`. |
| `shipment_id` | string | מזהה את הקמפיין שהקריאה הזו יצרה. שמרו אותו: זה מה ש[דוחות המסירה](./reports.md) מתייחסים אליו. |

::: warning "נתקבל" אינו "נמסר"
`status: 0` אומר ש-TextMe קיבלה את ההודעה, לא שמכשיר קיבל אותה. המסירה מדווחת בנפרד ובאופן אסינכרוני. ראו [מעקב אחר מסירה](../use-cases/delivery-reports.md).
:::

### שגיאות

| Status | מתי |
|---|---|
| `2` | חסר אלמנט חובה; ה-`message` מציין איזה. |
| `4` | אין מספיק יתרה. |
| `5` | מחוץ לשעות השליחה המותרות לחשבון. |
| `7` | כמה הודעות שונות הועברו ל-`sms`; השתמשו ב-[`bulk`](./bulk.md). |
| `8` | כל היעדים ברשימת החסימה. |
| `9` | יעד קצר או ארוך מדי. |
| `515` | ה-`source` אינו שולח מאומת. |
| `714` | `temp_bl` אינו מספר שלם של ימים בין 1 ל-14. |
| `715` | כל היעדים סוננו על ידי `temp_bl`. |
| `980` | ערך `link` שאינו כתובת URL שמישה. |
| `981` | לא ניתן היה ליצור את הקישור המקוצר. |
| `986` | `add_unsubscribe` לא היה `2` ולא `3`. |
| `988` | `cl_id` שאינו קיים. |
| `989` | ההודעה ריקה או עוברת 1005 תווים, או ש-`campaign_name` עובר 50. |

הרשימה המלאה נמצאת ב[קודי סטטוס](../reference/status-codes.md).

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

### שילוב מספרים ורשימות תפוצה {#mixing-phones-and-contact-lists}

`destinations` מקבל כל שילוב של `phone` ו-`cl_id`. קריאה אחת יכולה להגיע לרשימת מספרים שבניתם בעצמכם ולשתי רשימות שמורות בבת אחת, וההודעה נשלחת פעם אחת לכל יעד ייחודי.

ההגבלה היחידה היא `add_dynamic`: פרסונליזציה מרשימה דורשת `cl_id` אחד בדיוק ואף אלמנט `phone` בודד, כי שדות המיזוג מגיעים מהשורות של אותה רשימה.

### מזהים חיצוניים ודוחות מסירה {#external-ids-and-delivery-reports}

תכונת ה-`id` על `<phone>` היא שלכם לבחירה. מספר הזמנה, מזהה משתמש, UUID. זה המפתח שתמסרו בהמשך ל-[`dlr`](./reports.md) כדי לשאול מה קרה להודעה הספציפית הזו, והוא מוחזר בכל [דוח שנדחף ב-Push](./push.md).

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

### קישורים מקוצרים

לכל `link` נדרש `id`, וגוף ההודעה מפנה אליו כ-`[link-id]`:

::: code-group

```xml [XML]
<message>Your order has shipped: [link-a1]</message>
<links>
    <link id="a1">https://www.example.com/orders/10052/tracking</link>
</links>
```

```json [JSON]
{
  "message": "Your order has shipped: [link-a1]",
  "links": {
    "link": [
      { "$": { "id": "a1" }, "_": "https://www.example.com/orders/10052/tracking" }
    ]
  }
}
```

:::

הקיצור מונע מכתובות מעקב ארוכות לבלוע את תקציב התווים, והופך את ההקלקות למדידות. כתובת פגומה מכשילה את כל השליחה בסטטוס `980`.

### סינון לפי מועד שליחה אחרון עם `temp_bl` {#recency-filtering-with-temp-bl}

`temp_bl` מדלג על יעדים שכבר שמעו מכם ב-*n* הימים האחרונים (1 עד 14). הסינון מתבצע לכל יעד בזמן השליחה, כך שערך אחד מגן על קהל שהורכב מכמה רשימות.

אם הסינון מסלק *את כולם*, הקריאה נכשלת בסטטוס `715` ולא שולחת כלום בשקט.

### נספחי הסרה {#opt-out-footers}

`add_unsubscribe` מוסיף את מנגנון ההסרה שההודעה צריכה לשאת:

| ערך | תוצאה |
|---|---|
| `3` | מוסיף **קישור** הסרה. |
| `2` | מוסיף הוראות הסרה בהודעה חוזרת. |
| כל ערך אחר | לא מתווסף דבר. |

הסרות נרשמות ב[רשימת החסימה](./blacklist.md) של החשבון, ומאותו רגע מוחרגות משליחות עתידיות אוטומטית. ראו [הסרה ורגולציה](../use-cases/opt-out-and-compliance.md).

### תזמון {#scheduling}

`timing` מקבל `dd/mm/yy hh:mm` ודוחה את השליחה. קמפיין מתוזמן אפשר לעצור עד לרגע שהוא יוצא. עם [`cancel`](./campaigns.md), באמצעות ה-`shipment_id` שקיבלתם או ה-`campaign_name` שהגדרתם.
