דלג לתוכן הראשי

REST API - Add Contact

Add or update contacts in your account.

Endpoint

GET https://sms.deals/api/ws.php?service=add_contact

Parameters

ParameterTypeRequiredDescription
serviceStringRequiredMust be add_contact
tokenStringOptionalAccount identification token
sms_phoneStringRequiredContact phone number for SMS
emailStringRequiredUser's email
nameStringOptionalContact name (UTF-8, max 50 chars)
companyStringOptionalCompany name (UTF-8, max 50 chars)
phoneStringOptionalAdditional phone number
faxStringOptionalFax number
birthdayStringOptionalBirthday (format: DD/MM/YYYY)
anniversaryStringOptionalAnniversary (format: DD/MM/YYYY)
genderStringOptionalmale or female
Mailing_addressStringOptionalAddress (UTF-8, max 50 chars)
mailing_cityStringOptionalCity name (UTF-8, max 50 chars)
websiteStringOptionalWebsite URL
new_mobile_numberStringOptionalNew phone number (for updating)
user_field1, user_field2, user_field3StringOptionalCustom fields
tag_namesStringOptionalTags, delimited by semicolons (;)

Example Request

https://sms.deals/api/ws.php?service=add_contact&sms_phone=0521234567&[email protected]&company=My%20Company&token=YOUR_TOKEN

PHP Example

<?php
$company = urlencode("name of company");
$sms_phone = "0521234567";
$email = "[email protected]";
$token = "xxxxxx...";

$url = "https://sms.deals/api/ws.php?";
$url .= "service=add_contact";
$url .= "&sms_phone=".$sms_phone;
$url .= "&company=".$company;
$url .= "&email=".$email;

$options = array(
'http' => array(
'method' => 'GET',
'header' => 'Authorization: Bearer '.$token
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo($result);
?>

Updating Contacts

To update an existing contact, use the same endpoint with the contact's phone number and include the new values. Use new_mobile_number to change the primary phone number.

השפעות על המערכת

אנשי קשר הם הבסיס לשליחה מרוכזת וקמפיינים:

  • בסיס ל‑Bulk — אנשי קשר הם הרשימה שממנה בוחרים נמענים לקמפיינים; שינוי כאן משפיע ישירות על bulk עתידי
  • עדכון — שליחת אותו endpoint עם מספר קיים מבצעת update; new_mobile_number מעדכן את המספר הראשי
  • תגיות לאנשי קשר — פרמטר tag_names מאפשר קיבוץ נמענים לסגמנטים (מופרדים ב‑;)
  • שדות מותאמיםuser_field1..3 זמינים לשמירת מידע כמו מזהה חיצוני, שפה או סטטוס לקוח
  • פרטיות — נתונים אישיים (birthday, anniversary, Mailing_address) נשמרים בחשבון; וודאו עמידה ברגולציה המקומית

ראו גם