Skip to content

שליחת SMS

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

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

sms שליחת הודעה

פרמטרים

שםסוגתיאורחובה
smsobjectאלמנט השורש.✔️
userobjectמכיל את אלמנט המשתמש.✔️
usernamestringשם המשתמש של החשבון שבו אתם מזוהים במערכת.✔️
sourcestringהמספר או השם שההודעה תיראה כאילו נשלחה ממנו. עד 11 תווים, ספרות ואותיות באנגלית בלבד, בלי +. חייב להיות שולח מאומת.✔️
destinationsobjectמכיל את כל היעדים. יכול להחזיק כמה אלמנטי phone וכמה אלמנטי cl_id.✔️
phonestringמספר יעד, בפורמט 5xxxxxxx או 05xxxxxxx.✔️
idstringתכונה של phone. מזהה חיצוני משלכם ליעד הזה, כדי שתוכלו לשלוף את דוח המסירה שלו בהמשך. השמיטו אותו, או השאירו ריק, אם אינכם צריכים דוחות.
cl_idstringשליחה לרשימת תפוצה שלמה לפי המזהה שלה. חזרתי.
messagestringגוף ההודעה. עד 1005 תווים.✔️
tagstringתחילית שמודבקת לראש ההודעה — מיועדת לאימות SMS האוטומטי של Google. <tag>#</tag> עם <message>Hello world</message> נמסר כ-<#>Hello world.
add_dynamicstringערך 1 כדי לשלב את השדות הדינמיים של רשימת התפוצה בהודעה. כל ערך אחר נחשב "לא". דורש cl_id אחד בדיוק ואף אלמנט phone בודד.
timingstringתזמון השליחה, בפורמט dd/mm/yy hh:mm. נשלח מיד כשהשדה נעדר.
add_unsubscribeintהוספת מנגנון הסרה: 3 לקישור הסרה, 2 להסרה בהודעה חוזרת. כל ערך אחר נחשב "לא".
temp_blstringדילוג על יעדים שכבר קיבלו הודעה ב-n הימים האחרונים, כאשר n הוא 1–14.
includes_internationalint1 כדי לאפשר יעדים מחוץ לישראל, 0 אחרת.
campaign_namestringשם שיוצג בדוחות המערכת, והידית לביטול לפי שם. עד 50 תווים.
linksobjectמכיל את הקישורים לקיצור. יכול להחזיק כמה אלמנטי link.
linkstringכתובת URL לקיצור. חייבת לשאת תכונת id; כתבו [link-id] בגוף ההודעה במקום שבו הקישור המקוצר צריך להופיע.

דוגמת בקשה

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
{
  "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 --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
// 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
// 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
<?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
# 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
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 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
// .NET 8+ — 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
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
// [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(())
}

תשובה

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
{
  "status": 0,
  "message": "SMS will be sent",
  "shipment_id": "XXXXXXX"
}
שדהסוגתיאור
statusint0 — ההודעה נתקבלה לשליחה.
messagestringSMS will be sent.
shipment_idstringמזהה את הקמפיין שהקריאה הזו יצרה. שמרו אותו: זה מה שדוחות המסירה מתייחסים אליו.

"נתקבל" אינו "נמסר"

status: 0 אומר ש-TextMe קיבלה את ההודעה, לא שמכשיר קיבל אותה. המסירה מדווחת בנפרד ובאופן אסינכרוני — ראו מעקב אחר מסירה.

שגיאות

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

הרשימה המלאה נמצאת בקודי סטטוס.

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

שילוב מספרים ורשימות תפוצה

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

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

מזהים חיצוניים ודוחות מסירה

תכונת ה-id על <phone> היא שלכם לבחירה — מספר הזמנה, מזהה משתמש, UUID. זה המפתח שתמסרו בהמשך ל-dlr כדי לשאול מה קרה להודעה הספציפית הזו, והוא מוחזר בכל דוח שנדחף ב-Push.

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

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

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

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

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

סינון לפי מועד שליחה אחרון עם temp_bl

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

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

נספחי הסרה

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

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

הסרות נרשמות ברשימת החסימה של החשבון, ומאותו רגע מוחרגות משליחות עתידיות אוטומטית. ראו הסרה ורגולציה.

תזמון

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