REST API - Add Contact
Add or update contacts in your account.
Endpoint
GET https://sms.deals/api/ws.php?service=add_contact
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service | String | Required | Must be add_contact |
token | String | Optional | Account identification token |
sms_phone | String | Required | Contact phone number for SMS |
email | String | Required | User's email |
name | String | Optional | Contact name (UTF-8, max 50 chars) |
company | String | Optional | Company name (UTF-8, max 50 chars) |
phone | String | Optional | Additional phone number |
fax | String | Optional | Fax number |
birthday | String | Optional | Birthday (format: DD/MM/YYYY) |
anniversary | String | Optional | Anniversary (format: DD/MM/YYYY) |
gender | String | Optional | male or female |
Mailing_address | String | Optional | Address (UTF-8, max 50 chars) |
mailing_city | String | Optional | City name (UTF-8, max 50 chars) |
website | String | Optional | Website URL |
new_mobile_number | String | Optional | New phone number (for updating) |
user_field1, user_field2, user_field3 | String | Optional | Custom fields |
tag_names | String | Optional | Tags, 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) נשמרים בחשבון; וודאו עמידה ברגולציה המקומית