# MesserGo API — תיעוד מלא (Full) > כל מסמכי התיעוד של מסר גו מאוחדים לקובץ אחד, להזרקה כ-context לכלי AI. מקור: https://docs.message.co.il --- # אימות וכללי יסוד — מסר גו API מסמך זה מגדיר את כללי היסוד המשותפים לכל קריאות ה-API של **מסר גו (MesserGo)**: כתובת בסיס, אימות, קודי סטטוס, מגבלות קצב והעלאת קבצים. --- ## כתובת בסיס (Base URL) ``` https://capi.mesergo.co.il ``` כל ה-endpoints בתיעוד (SMS, מיילים, אנשי קשר) פועלים תחת דומיין זה. הבקשות הן `HTTPS` בלבד וקידוד התוכן הוא **UTF-8**. --- ## אימות (Authentication) האימות מבוצע בשיטת **HTTP Basic Authentication**: שם המשתמש והטוקן שקיבלתם ממערכת מסר גו נשלחים בכותרת `Authorization`. - **Username** — שם המשתמש שלכם במערכת. - **Token** — טוקן ה-API שהופק עבורכם. הערך בכותרת הוא `Base64` של המחרוזת `Username:Token`: ```http Authorization: Basic Content-Type: application/json ``` ### דוגמת cURL ```bash curl https://capi.mesergo.co.il/api/v2/SMS/SendSms \ -u "USERNAME:TOKEN" \ -H "Content-Type: application/json" \ -d '{ "Data": { "Message": "שלום", "Recipients": [{ "Phone": "0501234567" }] } }' ``` ### דוגמת C# ```csharp string username = "YOUR_USERNAME"; string token = "YOUR_TOKEN"; string creds = Convert.ToBase64String(Encoding.ASCII.GetBytes(username + ":" + token)); request.Headers.Add("Authorization", "Basic " + creds); ``` ### דוגמת PHP ```php $username = "YOUR_USERNAME"; $token = "YOUR_TOKEN"; $ch = curl_init(); curl_setopt($ch, CURLOPT_USERPWD, $username . ":" . $token); ``` > 💡 אפשר לנסות את כל הקריאות אונליין בעזרת [הסימולטור](playground.html) — מזינים שם משתמש וטוקן ושולחים בקשה חיה. --- ## מגבלת קצב (Rate Limit) מגבלת הקצב היא **30 קריאות בשנייה**. קריאות מעבר ל-30 בשנייה יחזירו שגיאה `-429 Too many requests`. --- ## קודי סטטוס בתגובה (Response Status Codes) התגובה כוללת שדה `StatusId` (או `Status`) עם משמעות הסטטוס: | קוד | משמעות | |-----|--------| | `1` | Success — הצלחה | | `-1` | Failed — כשל כללי | | `-2` | Bad user name or password — שם משתמש/סיסמה שגויים | | `-6` | RecipientsDataNotExists — אין נתוני נמענים | | `-9` | MessageTextNotExists — חסר טקסט הודעה | | `-13` | UserQuotaExceeded — חריגת מכסת משתמש | | `-14` | ProjectQuotaExceeded — חריגת מכסת פרויקט | | `-15` | CustomerQuotaExceeded — חריגת מכסת לקוח | | `-16` | WrongDateTime — תאריך/שעה שגויים | | `-17` | WrongNumberParameter — פרמטר מספרי שגוי | | `-18` | No valid recipients — אין נמענים תקינים | | `-21` | InvalidSenderName — שם שולח לא תקין | | `-22` | UserBlocked — משתמש חסום | | `-26` | UserAuthenticationError — שגיאת אימות משתמש | | `-90` | InvalidSenderIdentification — זיהוי שולח לא תקין | | `-94` | SenderId is not in allow list — שם השולח אינו ברשימת ההיתר | | `-96` | MessageLengthExceeded — חריגה מ-1000 תווים | | `-180` | Illegal Custom Field Name — תו לא חוקי בשם שדה מותאם | | `-181` | Missing Custom Field Value — חסר ערך לשדה מותאם | | `-230` | Invalid Url — כתובת URL לא תקינה | | `-291` | Unverified Sender ID — שם שולח לא מאומת | | `-429` | Too many requests — חריגת מגבלת קצב | | `-524` | MaxAmountOfSmsInOneMinuteReached — חריגת כמות SMS בדקה | | `-1159` | Invalid TemplateComponents — תו לא חוקי בתבנית/כפתורים | --- ## העלאת קבצים (File Upload) לשליחת מדיה/קבצים (למשל צרופות למייל) ניתן להעלות קובץ ולקבל מזהה/כתובת לשימוש בבקשות. ```http POST https://capi.mesergo.co.il/api/v2/Files/Upload Authorization: Basic ``` הגוף הוא `multipart/form-data` עם שדה הקובץ. פרטים מלאים ל-Base64 כצרופה מופיעים בדוגמת המייל *Example Base64 File attached* ב-[email.md](email.md). --- ## בדיקת מכסה (Get Quota) ```http POST https://capi.mesergo.co.il/api/v2/Admin/GetQuota Authorization: Basic Content-Type: application/json ``` מחזיר את יתרת המכסה הזמינה לחשבון. --- ## מסמכי המשך - [sms.md](sms.md) — שליחת SMS, DLR, קבלת הודעות, OTP ודוחות. - [email.md](email.md) — שליחת מיילים וניהול קמפיינים. - [contacts.md](contacts.md) — ניהול אנשי קשר, קבוצות והסרה מרשימת תפוצה. - [playground.html](playground.html) — סימולטור אונליין לניסוי הקריאות. --- # שליחת SMS — מסר גו API > חלק ממערך התיעוד של **מסר גו (MesserGo)**. כל ה-endpoints פועלים מול הדומיין `capi.mesergo.co.il`. > אימות: HTTP Basic — ראו [authentication.md](authentication.md). תיעוד שליחת מסרונים (SMS), אישורי מסירה (DLR), קבלת הודעות, OTP/Whitelist ודוחות. Using InfoUMobile's API, you can send outgoing SMS messages world wide. ### Send SMS MesserGo's Programmable SMS API helps you add robust messaging capabilities to your applications. Using this API, you can send SMS messages using json, xml , web service and parameters. In order to send the API request you need the User and Token from MesserGo system (can use this explanation to create a token ) . Link to Response Status Codes #### Send SMS using json Client should perform Http Post . The encoding should be UTF-8. The Authentication method is basic authentication link for explanation You can see the code example and change the coding language in the field up here. ### Simple example Parameters Required \ Optional Type Value Message required string SMS message that needs to be sent. Phone required string The recipient phone number. Sender required string The ID that will be displayed in the recipient's phone as the sender. The "Sender" field is restricted to a maximum of 11 characters (Consecutive characters, no spaces) or a Phone number that contains maximum 14 digits (no characters)that allowed in the white list in the system(to insert the phone to the white list go to the folder Whitelist - Sender ). You can also write an asterisk (*) at the beginning of the identifier. ```http POST https://capi.mesergo.co.il/api/v2/SMS/SendSms Content-Type: application/json; charset=utf-8 Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "Message": "Hello world", "Recipients": [ { "Phone": "0541234567" } ], "Settings": { "Sender": "MyBrand" } } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/SMS/SendSms", "RequestId": "sFmbyVGdulmL1J3bm5WauEjMnR3ckV3bsNWPl1WYOR3cvhkJxETQzUSO1E0MlkDMrgTMtATMtEjMwITPw1WY0NVZtlGVmcjM4MDMwETPklkclNXV", "Data": { "Recipients": 1, "Errors": null } } ``` ### Advanced example Parameters Parameters Required\Optional Type Value Message required string SMS message that needs to be sent. SavedMessageId Optional integer Send saved message in your account by id. (if you use this tag, don't use Message tag) Recipients    array You can send the message to multiple recipients in array. The message can be sent to recipients or groups FirstName Optional string The first name of the customer(can be used for personalization in the sending SMS) LastName Optional string The last name of the customer(can be used for personalization in the sending SMS) Representative Optional string You can add custom fields for any recipients and use this fields in the SMS message Phone required string The recipient phone number. GroupNumbers    array   GroupNumber Optional integer Use this parameter in order to send messages to a group according to the group number defined in your account ExcludeGroupNumbers    array   GroupNumber Optional integer Use this parameter in order to exclude this group from all recipients you want to send the message to Settings       Sender required string The ID that will be displayed in the recipient's phone as the sender. The "Sender" field is restricted to a maximum of 11 characters (Consecutive characters, no spaces) or a Phone number that contains maximum 14 digits (no characters)that allowed in the white list in the system(to insert the phone to the white list go to the folder Whitelist - Sender ). You can also write an asterisk (\\\\\\\\\*) at the beginning of the identifier. CampaignName Optional string The campaign name which will appear in your campaign reports. The messaged will be aggregate to this campaign TimeToSend Optional date time Date and time on which the messages will be sent. Please use the following format: yyyy-mm-dd hh:mm:ss. If left blank, the message will be sent immediately. DelayInSeconds Optional integer > 60 Number of seconds of delay from receiving the request in the system and up to sending the message (use this parameter as long as the TimeToSend parameter is not in use). CustomerMessageID Optional string Message ID on the client application. When confirmation on delivery is sent back to the client, the message ID is also sent for synchronization. CustomerParameter Optional string Parameter set by the client that can be seen in the detail message reports, later. Can be used to mark each message by activity segmentation, for example. DeliveryNotificationUrl Optional string Enter the URL address to which the DLR will be sent via a POST request Priority Optional string In order to prioritize your messages, you can use the priority tag, when 0 means normal priority, -1 high priority (used only for a single message), and then 1,2 and so on. The higher the value, the lower the priority. MaxSegments Optional string When sending long messages, this parameter allows the client to set the maximum number of segments per message. Value 0 means unlimited segments. IgnoreUnsubscribeCheck Optional boolean Set true for ignore blacklist check. ExpireDate Optional date time In case of delay in sending the messages the cellular company will check if the date in this parameter has passed. If the date has passed the message will not be sent. IgnorePossibleSendingTime Optional boolean Set true for ignore the time sending that you set in your account CheckTimeRestiction Optional boolean Set true to not send the message to recipient that already received a message in the last X days (default x is 14, you can change the number in your account) ShortenUrlEnable Optional boolean Set true for replace the URL addresses in the message to shorten the URLs AllowDuplicates Optional boolean Set true to allow to send message to the same recipient in same request. TrackPurchaseTData Optional boolean Set true to associate purchasing with this campaign. If you set true the CampaignName is required. This function is paid extra ```http POST https://capi.mesergo.co.il/api/v2/SMS/SendSms Content-Type: application/json; charset=utf-8 Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "Message": "Hello [#FirstName#] [#LastName#], reminder for meeting with [#Representative#]", "Recipients": [ { "FirstName": "John", "LastName": "Smith", "Representative": "David", "CustomerMessageID": "33", "CustomerParameter": "44", "Phone": "0541234567" }, { "FirstName": "Danni", "LastName": "levi", "Representative": "Mike", "CustomerMessageID": "55", "CustomerParameter": "66", "Phone": "0581234567" } ], "GroupNumbers": [ { "GroupNumber": 7 } ], "ExcludeGroupNumbers": [ { "GroupNumber": 29 } ], "Settings": { "Sender": "info", "CampaignName": "Advance sending", "TimeToSend": "2022-11-13 13:00:00", "DelayInSeconds": 65, "CustomerMessageID": "AF7864348", "CustomerParameter": "sms", "DeliveryNotificationUrl": "https://mysite.co.il/DeliveryNotification.aspx", "Priority": 0, "MaxSegments": 0, "IgnoreUnsubscribeCheck": false, "ExpireDate": "2022-11-13 13:00:00", "IgnorePossibleSendingTime": false, "CheckTimeRestiction": false, "ShortenUrlEnable": true, "AllowDuplicates": false, "TrackPurchaseTData": true } } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/SMS/SendSms", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJyETQzUyN1E0MlATMrgTMtATMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "Recipients": 1, "Errors": null } } ``` #### Send SMS using xml For sending SMS using xml click on the link and see Pages 1-9 https://www.mesergo.co.il/wp-content/uploads/2020/12/SMS_API-6.1.pdf #### Send SMS + Voice failover ### Send SMS + Voice failover This function sends a client-generated OTP message to a single recipient via SMS, Voice, or SMS with Voice failover. The OTP code is generated by the client and must be provided in the request using the OtpCode parameter. The system does not generate the OTP code. When using SMS_WITH_VOICE_FAILOVER, the system sends the OTP via SMS when SMS delivery is available. If the recipient's number requires Voice delivery, such as a landline or kosher phone, the message is delivered as a Voice call instead. For Voice delivery, the client can require the recipient to press a specified digit before the OTP code is played. OTP messages sent through this endpoint are prioritized by the system. The client should perform an HTTPS POST request to the following URL using UTF-8 encoding. Parameters Parameter Required\Optional Type Value Channel Required string Delivery channel. Supported values: SMS, VOICE, SMS_WITH_VOICE_FAILOVER CampaignName Optional string Campaign name for identification and reporting IgnorePossibleSendingTime Optional bool false by default. Set to true to ignore sending-time limitations IgnoreUnsubscribeCheck Optional bool false by default. Set to true to ignore the recipient's subscription status OtpCode Required string OTP code generated by the client Phone Required string Recipient phone number. Only one recipient can be supplied per request CustomerMessageID Optional string Customer-defined message identifier VoiceSettings.CampaignRefId Optional string / integer Customer campaign reference identifier VoiceSettings.CallerId Optional string Caller ID used for Voice delivery. Can also be PRIVATE VoiceSettings.Language Optional string Voice language and gender, e.g. he-male, he-female, en-male, ru-female, ar-male VoiceSettings.RequireDigitPress Optional bool false by default. When true, the recipient must press the configured digit before the Voice OTP message is played. Ignored for SMS delivery VoiceSettings.Digit Conditional string Digit from 0 to 9. Required when RequireDigitPress is true VoiceSettings.PreMessage Conditional string Message played before the OTP. Required when RequireDigitPress is true. Use {Digit} as the digit placeholder VoiceSettings.Message Conditional string Voice message content. Required for VOICE and SMS_WITH_VOICE_FAILOVER. Use {OtpCode} as the OTP placeholder SMSSettings.Sender Optional string Sender used for SMS delivery SMSSettings.Message Conditional string SMS message content. Required for SMS and SMS_WITH_VOICE_FAILOVER. Use {OtpCode} as the OTP placeholder Required fields by Channel Channel Required fields SMS Phone, OtpCode, SMSSettings.Message VOICE Phone, OtpCode, VoiceSettings.Message SMS_WITH_VOICE_FAILOVER Phone, OtpCode, SMSSettings.Message, VoiceSettings.Message When VoiceSettings.RequireDigitPress is true, VoiceSettings.Digit and VoiceSettings.PreMessage are also required. RequireDigitPress applies only to Voice delivery and does not affect SMS delivery. For Voice delivery, the message content is taken from VoiceSettings.Message. For SMS delivery, the message content is taken from SMSSettings.Message. ```http POST https://cloud.mesergo.co.il/api/v2/Otp/Message/Send Authorization: Your Base Credentials Content-Type: application/json ``` **גוף הבקשה (Request Body):** ```json { "Data": { "Channel": "SMS_WITH_VOICE_FAILOVER", "CampaignName": "OTP Test", "IgnorePossibleSendingTime": false, "IgnoreUnsubscribeCheck": false, "OtpCode": "123455", "Phone": "0509999999", "CustomerMessageID": "OTP-Test-001", "VoiceSettings": { "CampaignRefId": 0, "CallerId": "039415550", "Language": "he-male", "RequireDigitPress": true, "Digit": "1", "PreMessage": "נשלחה אליך הודעת OTP. לשמיעת ההודעה הקש {Digit}", "Message": "הקוד שלך הוא {OtpCode}" }, "SMSSettings": { "Sender": "039415550", "Message": "הקוד שלך הוא {OtpCode}" } } } ``` **דוגמת תגובה:** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Otp/Message/Send", "RequestId": "sFmbyVGdulmL1J3bm5WauATMpBXYj1TZtFmT0N3bIZCOzE0MlcDNBNTJxEzK0ITL2ATL2IDMy0DctFGdTVWbpRlJzUjMwMTPklkclNXV", "Data": { "RecipientsSMS": 1, "RecipientsVoice": 0, "Errors": null } } ``` #### Send SMS Using Web Service Interface For sending SMS using Web Service Interface click on the link and see Pages 10-11 https://www.mesergo.co.il/wp-content/uploads/2020/12/SMS_API-6.1.pdf #### Send SMS Using Email to SMS For sending SMS using Email to SMS Interface click on the link https://www.mesergo.co.il/wp-content/uploads/2013/03/Email2SMS.pdf #### Send SMS Using Parameters ### Send SMS using parameters ```http GET https://api.mesergo.co.il/inforufrontend/WebInterface/SendMessageByNumber.aspx?UserName=string&ApiToken=string&SenderCellNumber=string&CellNumber=string&MessageString=string&IgnoreUnsubscribeCheck=boolean ``` #### Send SMS using Email For sending SMS using Email click on the link below: https://www.mesergo.co.il/wp-content/uploads/2013/03/Email2SMS.pdf ### Utilities #### Delivery Notification ##### Pull option using json This function gets a list of Delivery Notification In order to pull notifications you need to enter the following address under the DeliveryNotificationUrl tag in send SMS. https://api.mesergo.co.il/InsertNotificationsToPullQueue.ashx NOTE: Once pulled, the notification entries are removed from our system queue The Authentication method is basic authentication link for explanation ### Pull DLR using json Parameters Parameters Required\Optional Type Value Type required string For pull the Delivery Notification use Type: DeliveryNotificationSMS PhoneNumber optional string For pull the receiving messages of this phone number only BatchSize optional string The number of notifications transferred An explanation of the return parameters: • PhoneNumber – The number of the recipient. • Network – The network of the recipient. • Status – The status of the message: (2) – Delivered. (-2) – Not delivered. (-4) – Blocked by MesserGo. (6) - Clicked (-107) - Convert to IVR • StatusDescription – If not delivered, contains the reason. • ProjectId – The project ID Below describes the user who sent the message. • CustomerMessageId – The client message ID. • CustomerParam – The client parameter. • SenderNumber – The ID of the sender who sent the message. • SegmentsNumber – The amount of segments in the message (See "Message character length"). • SentMessage– The content of the sent message. • InsertDate – Time of receiving the notification from the cellular operator. • OperatorResultId - Represents the operator-specific result code for the message delivery. In case of non-delivery, this field indicates the failure reason. ```http POST https://capi.mesergo.co.il/api/v2/PullData Content-Type: application/json Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "Type": "DeliveryNotificationSMS", "BatchSize": 500 } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/PullData", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJxITQzUyMxE0MlMTMrUTMtETMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "Count": 3, "List": [ { "PartnerId": null, "CustomerId": null, "ProjectId": 1040177, "UserId": null, "InsertDate": "2021-11-15T13:12:34.617", "PullDataType": "DeliveryNotificationSMS", "PullData": { "PhoneNumber": "0541234657", "Network": "053", "Status": 2, "StatusDescription": "Delivered", "OperatorResultId": "2", "CustomerMessageId": 3, "CustomerParam": "sms", "SenderNumber": "ar", "SegmentsNumber": 1, "SentMessage": "Hello this is send sms api https://zapier.com/app/zap/137759827/history", "NotificationDate": "2021-11-15T13:12:23" } }, { "PartnerId": null, "CustomerId": null, "ProjectId": 1040177, "UserId": null, "InsertDate": "2021-11-15T13:12:35.15", "PullDataType": "DeliveryNotificationSMS", "PullData": { "PhoneNumber": "0541234567", "Network": "053", "Status": 2, "StatusDescription": "Delivered", "OperatorResultId": "2", "CustomerMessageId": 3, "CustomerParam": "sms", "SenderNumber": "ar", "SegmentsNumber": 1, "SentMessage": "Hello this is send sms api", "NotificationDate": "2021-11-15T13:12:25" } }, { "PartnerId": null, "CustomerId": null, "ProjectId": 1040177, "UserId": null, "InsertDate": "2021-11-15T13:13:05.537", "PullDataType": "DeliveryNotificationSMS", "PullData": { "PhoneNumber": "0541234567", "Network": "053", "Status": 2, "StatusDescription": "Delivered", "OperatorResultId": "2", "CustomerMessageId": 3, "CustomerParam": "sms", "SenderNumber": "ar", "SegmentsNumber": 1, "SentMessage": "Hello this is send sms api ", "NotificationDate": "2021-11-15T13:12:55" } } ] } } ``` ##### Pull option using xml For Pull Delivery Notification using xml click on the link and see Pages 14-15 https://www.mesergo.co.il/wp-content/uploads/2020/12/SMS_API-6.1.pdf ##### Push option using xml For Push Delivery Notification using xml click on the link and see Pages 13 https://www.mesergo.co.il/wp-content/uploads/2020/12/SMS_API-6.1.pdf ##### Push option using json The client can receive confirmation on delivery on each message sent. When sending the message the client should use the CustomerMessageID and the DeliveryNotificationUrl parameters. The system performs an HTTP Post request to this URL regarding any message. To configure push DLR in json format, contact the support department. Data exmaple : [ { "InforuId": "SQLQ1_7ecf79b4-7581-4eb1-8693-612ff75bf251", "PhoneNumber": "0543266290", "Network": "054", "Status": 2, "OperatorResultId": 2, "StatusDescription": "Delivered", "ProjectId": 1040177, "CustomerMessageId": "", "CustomerParam": "", "id": "", "SenderNumber": "0537038376", "BillingCodeId": 1, "Price": 0, "SegmentsNumber": 1, "ActionType": "", "OriginalMessage": "בדיקה\n\nלהסרה השב הסר", "NotificationDate": "2024-09-30T13:26:00", "RetriesNumber": 0 } ] An explanation of the return parameters: • InforuId– The Id of the message in Inforumobile system. • PhoneNumber – The number of the recipient. • Network – The network of the recipient. • Status – The status of the message. (2) – Delivered. (-2) – Not delivered. (-4) – Blocked by MesserGo. (6) – Clicked. • StatusDescription – If not delivered, contains the reason. • ProjectId – The project ID Below describes the user who sent the message. • CustomerMessageId – The client message ID. • CustomerParam – The client parameter. • SenderNumber – The ID of the sender who sent the message. • SegmentsNumber – The amount of segments in the message (See "Message character length"). • OriginalMessage – The content of the sent message. • InsertDate – Time of receiving the notification from the cellular operator. • OperatorResultId - Represents the operator-specific result code for the message delivery. *The parameters that not in the explanaton is unrellevant . #### Receiving SMS ##### Pull option using json The Authentication method is basic authentication link for explanation. NOTE: Once pulled, the Messages are removed from our system queue, you can allways see all incoming message in system reports. In order to activate this option, refer to the support department which will enable it for you. ### Pull Receiving SMS using json Parameters Parameters Required\Optional Type Value Type required string For pull Incoming Messages use Type: IncomingMessagesSMS PhoneNumber optional string For pull the receiving messages of this phone number only BatchSize optional string The number of Messages transferred ```http POST https://capi.mesergo.co.il/api/v2/PullData Content-Type: application/json Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "Type": "IncomingMessagesSMS", "BatchSize": 500 } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/PullData", "RequestId": ",wWYuJXZ05WauUncvZmbp5CZ19Gbj1TZtFmT0N3bIZyM0E0MlAzMBNTJ2EzK5ATLyATLyIDMy0DctFGdTVWbpRlJzUjMwMTPklkclNXV", "Data": { "Count": 2, "List": [ { "PartnerId": null, "CustomerId": null, "ProjectId": 25312, "UserId": null, "InsertDate": "2026-02-09T16:28:14.837", "PullDataType": "incomingmessagessms", "PullData": { "PhoneNumber": "0521234567", "Network": "052", "Status": "", "StatusDescription": "", "OperatorResultId": "", "CustomerMessageId": "", "CustomerParam": "", "SenderNumber": "0521234567", "SegmentsNumber": "", "SentMessage": "T10", "NotificationDate": "2022-02-09T16:28:14" } }, { "PartnerId": null, "CustomerId": null, "ProjectId": 25312, "UserId": null, "InsertDate": "2026-02-09T16:28:17.687", "PullDataType": "incomingmessagessms", "PullData": { "PhoneNumber": "0521234567", "Network": "052", "Status": "", "StatusDescription": "", "OperatorResultId": "", "CustomerMessageId": "", "CustomerParam": "", "SenderNumber": "0529999999", "SegmentsNumber": "", "SentMessage": "T10", "NotificationDate": "2022-02-09T16:28:17" } } ] } } ``` ##### Push Option using json In this option you have to provide a URL To our support department. The support department will set up to send a post request on every incoming WhatsApp message JSON Example { "CustomerId":28132, "ProjectId":1042593, "Data":[{ "Channel":"SMS_MO", "Type":"PhoneNumber", "Value":"0522222229", "Keyword":"הסר", "Message":"הסר", "Network":"SMS", "ShortCode":"+97233769182", "ApplicationID":"11542", "CustomerParam":"SMf14104210035723ecab943567b4ad4b5", "MoSessionId":"SMf14104210035723ecab943567b4ad4b5" } ] } An explanation of the return parameters: • Channel– The source of the message • CustomerID – Customer ID in our system. • ProjectID – Project ID in our system. • PhoneNumber – The phone number of the message. • Keyword – First word in the message. • Message – The message incoming message. • Network – The source network. • ShortCode – Phone number to which the incoming message was sent. • ApplicationID – Application ID in our system. • CustomerParam– Not in use • MoSessionId– Not in use ##### Pull option using xml For Pull Receiving SMS using xml click on the link and see Pages 17-18 https://www.mesergo.co.il/wp-content/uploads/2020/12/SMS_API-6.1.pdf ##### Push option using xml For Push Receiving SMS using xml click on the link and see Pages 16 https://www.mesergo.co.il/wp-content/uploads/2020/12/SMS_API-6.1.pdf #### Delete Future Messages ### Delete Future Messages SMS This function deletes future messages by phone number or customer parameter or customer message id. One of these fields must contain a value, the condition is AND, so if the request contains 2 or 3 parameters, so the message will be deleted only if when you send the message you provided same values in this parameters. Parameters Required\Optional Type Value PhoneNumber Optional string The phone number for which you want to delete future messages CustomerParameter Optional string The customer paramter that sent in the send sms request CustomerMessageID Optional string The customer message ID that sent in the send sms request *A single phone can also be deleted by sending the SMS message to many recipients at the same time, but in this case the quota will not be refunded. ```http POST https://capi.mesergo.co.il/api/v2/SMS/DeleteFutureMessages Content-Type: application/json Authorization: Your Base Credential ``` **גוף הבקשה (Request Body):** ```json { "Data": { "PhoneNumber": "0549999999", "CustomerMessageID": "123456", "CustomerParameter": "123456" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/SMS/DeleteFutureMessages", "RequestId": ",wWYuJXZ05WauUncvZmbp5CMykGchNWPl1WYOR3cvhkJzETQzUyN0E0MlQTMrITMtcDMtMjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "DeletedCount": 1 } } ``` #### Check if Sender allowed ### SenderIdIsAllowed using json This function checks if sender id is allowed to send SMS The Authentication method is basic authentication link for explanation Parameters Parameters Required\Optional Type Value SenderId Required string The Sender id do you want to check CustomerId Optional integer If you want to check for another CustomerId under your account Username Optional string If you want to check for another username under your account ```http POST https://capi.mesergo.co.il/api/v2/SMS/Whitelist/SenderIdIsAllowed Authorization: Your Base Credentials Content-Type: application/json; charset=utf-8 ``` **גוף הבקשה (Request Body):** ```json { "Data": { "SenderId": "0529999999", "CustomerId": 123, "Username": "user123" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/SMS/Whitelist/SenderIdIsAllowed", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJzATQzUSOyE0MlQTMrUDMtITMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "CustomerId": 26745, "SenderId": "0529999999", "IsAllowed": false } } ``` #### Whitelist - Sender ##### Whitelist - Send OTP ### SendOtp This function sends SMS/Call OTP for Submit a request to whitelist To use this function contact our customer support. The Authentication method is basic authentication link for explanation Parameters Parameter Required\Optional Type Value SenderId Required string The Sender id do you want to whiten UserId Optional string If you want to whiten for another UserId under your account Username Optional string If you want to whiten for another username under your account. OtpType Optional string AUTO/SMS/VOICE – If you do not provide this parameter the default setting will be AUTO, meaning that if the Sender ID is a landline or a Kosher phone a Voice OTP will be sent, for all other phone types the OTP will be sent as text by SMS. ```http POST https://capi.mesergo.co.il/api/v2/SMS/Whitelist/SendOtp content-type: application/json Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "SenderId":"0529999999", "UserId": "12346", "Username": "Username", "OtpType": "SMS/VOICE/AUTO" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/SMS/Whitelist/SendOtp", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJ3MTQzUSOzE0MlkDMrMTMtITMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "Sent": true, "SenderId": "0529999999", "UserId": 1044244 } } ``` ##### Whitelist – Authenticate OTP ### AuthenticateOtp This function Authenticate OTP and do whitelist The Authentication method is basic authentication link for explanation Parameters Parameter Required\Optional Type Value SenderId Required string The Sender id do you want to whiten OtpCode Required string The code you received on your device UserId Optional string If you want to whiten for another UserId under your account Username Optional string If you want to whiten for another username under your account Comments Optional string If you want to save Comment in our system ```http POST https://capi.mesergo.co.il/api/v2/SMS/Whitelist/AuthenticateOtp? content-type: application/json Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "SenderId": "0529999999", "OtpCode": "750930", "UserId": "12346", "Username": "Username", "Comments": "Comments" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/SMS/Whitelist/AuthenticateOtp", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJ0MTQzUCN0E0MlkDMrMTMtITMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "SenderId": "0529999999", "CustomerId": 26745 } } ``` ##### List of Possible Statuses 1 OK, OTP sent -3040 Sender Id is already Allowed or whitelist not required -3015 You not allowed to use this function #### Reports ##### Get Sent Messages ### Get Sent Messages This function gets the sent messages report by phone number. *To use this function please contact to sales department Parameters Required\Optional Type Value Phone Required string The phone number you want to receive the report on FromDate Required date Start report date (incloud this day) ToDate Required date End report date (incloud this day) Level Required string Customer /Project /User If you choose level "customer\Project" then you will also receive in the report messages sent by other users in the same customer or project, provided you have the appropriate permissions. ```http POST https://capi.mesergo.co.il/api/v2/SMS/GetSentMessages Content-Type: application/json Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "Phone": "0543266290", "FromDate": "2021-08-03", "ToDate": "2021-08-03", "Level": "User" } } ``` **דוגמת תגובה:** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/SMS/GetSentMessages", "RequestId": ",,Abh5mclRnbp5yZul2ZhR3cuEjMkV3bsN2Z0NXPl1WYOR3cvhkJ3QTQzUyNxE0MlUTMrITMtcDMtMjMwITPw1WY0NVZtlGVmQzM4QDMwETPklkclNXV", "Data": { "List": [ { "CustomerId": 3, "ProjectId": 24, "UserId": 1004834, "TimeSent": "2021-08-03T13:53:43.31", "TimeOfConfirmation": "2021-08-03T13:53:44", "SenderId": "ariellevi", "DeliveryNotificationStatusId": 2, "DeliveryNotificationReasonName": "Delivered", "PhoneNumber": "0549999999", "ContactId": 0, "CustomerMessageId": "", "ContactFullName": null, "CustomerParameter": "", "InforuApplicationParameter": "9W0GJB6311K0KJCB", "Message": "This is a test SMS Message", "NumberOfSegments": 1 }, { "CustomerId": 3, "ProjectId": 24, "UserId": 1004834, "TimeSent": "2021-08-03T13:58:14.123", "TimeOfConfirmation": "2021-08-03T13:58:15", "SenderId": "ariellevi", "DeliveryNotificationStatusId": 2, "DeliveryNotificationReasonName": "Delivered", "PhoneNumber": "0549999999", "ContactId": 0, "CustomerMessageId": "", "ContactFullName": null, "CustomerParameter": "", "InforuApplicationParameter": "9W0GJB6311K0KJCB", "Message": "This is a test SMS Message ", "NumberOfSegments": 1 } ], "LastFetch": { "DateTime": "2021-08-03T13:58:14.123", "Id": 10224 } } } ``` #### Get Unsubscribe Link ### Get Unsubscribe Link StartFragment This function gets the sms unsubscribe link StartFragment Parameters EndFragment Parameters Required\Optional type Value Username Required string Enter the username that you want to get his unsubscibe link Withphonenumber optional boolean Set true to "_phnx" will be added to the link. (This addition means that when sending the SMS, the system encodes the recipient's phone number at the end of the link so that he does not have to enter it. ```http POST https://capi.mesergo.co.il/api/v2/Admin/GetBlockLink Content-Type: application/json Authorization: Your Base Credential ``` **גוף הבקשה (Request Body):** ```json { "Data": { "Username": "Username", "WithPhoneNumber": "1" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Admin/GetBlockLink", "RequestId": ",wWYuJXZ05WauUncvZmbp5CMxkGchNWPl1WYOR3cvhkJ4ETQzUSNwE0MlcTMrMTMtcDMtMjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "BlockText": "להסרה https://l5k.me/Zh1ef_#phnx", "BlockLink": "https://l5k.me/Zh1ef" } } ``` --- ## קודי שגיאה > שדה `StatusDescription` עשוי להשתנות מעת לעת — אין לבסס לוגיקה על הטקסט שלו, אלא רק על `StatusId` או על קוד ה-HTTP. **דוגמת תגובת שגיאה:** ```json { "StatusId": -2, "StatusDescription": "Bad user name or password", "DetailedDescription": "", "FunctionName": "api/v2/SMS/SendSms", "Data": null } ``` ### קודי סטטוס לשליחת SMS | קוד | משמעות | |-----|--------| | `1` | הצלחה (Success) | | `-1` | כשל כללי (Failed) | | `-2` | שם משתמש או סיסמה שגויים | | `-6` | אין נתוני נמענים | | `-9` | חסר טקסט הודעה | | `-13` | חריגת מכסת משתמש | | `-14` | חריגת מכסת פרויקט | | `-15` | חריגת מכסת לקוח | | `-16` | תאריך/שעה שגויים | | `-17` | פרמטר מספרי שגוי | | `-18` | אין נמענים תקינים | | `-21` | שם שולח לא תקין | | `-22` | משתמש חסום | | `-26` | שגיאת אימות משתמש | | `-90` | זיהוי שולח לא תקין | | `-94` | שם השולח אינו ברשימת ההיתר | | `-96` | חריגה מ-1000 תווים | | `-180` | תו לא חוקי בשם שדה מותאם | | `-181` | חסר ערך לשדה מותאם | | `-230` | כתובת URL לא תקינה | | `-291` | שם שולח לא מאומת | | `-429` | יותר מדי בקשות (חריגת קצב) | | `-524` | חריגת כמות SMS בדקה | | `-1159` | רכיבי תבנית לא תקינים | ### סטטוסי Whitelist (SMS) | קוד | משמעות | |-----|--------| | `1` | תקין — OTP נשלח | | `-3040` | שם השולח כבר מאושר / אין צורך ב-whitelist | | `-3015` | אין הרשאה להשתמש בפונקציה זו | --- # שליחת מיילים (Email) — מסר גו API > חלק ממערך התיעוד של **מסר גו (MesserGo)**. כל ה-endpoints פועלים מול הדומיין `capi.mesergo.co.il`. > אימות: HTTP Basic — ראו [authentication.md](authentication.md). תיעוד שליחת דיוור אלקטרוני: קמפיין קיים, קמפיין חדש, ניהול קמפיינים והתראות. ### Send Email MesserGo's Programmable Mail API helps you add robust messaging capabilities to your applications. Using this API, you can send Email using json . In order to send the API request you need the User and Token from MesserGo system (can use this explanation to create a token ) . Important note: References must be encoded in UTF-8 You can see the code example and change the coding language in the field up here. #### Send Existing Campaign ### Simple example You need to use this function when you want to send via API a predefined email template (optionally with placeholders) you created on MesserGo user interface.First, you need to create the email template on on MesserGo user interface, get a template Id and then use the API to send it. Parameters Required\Optional type Value CampaignId Required string The NewsLetter ID in MesserGo system Duplicate Required bool Create a duplicate campaign. FirstName Optional string The first name of the contact Email Required string The email of the contact ```http POST https://capi.mesergo.co.il/api/v2/Umail/Campaign/Send/ Content-Type: application/json; charset=utf-8 Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "CampaignId": "57934763", "Duplicate": 0, "IncludeContacts": [ { "FirstName": "string", "Email": "example1@example.com" } ] } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "CampaignId": 57934763, "Recipients": 0, "token": "5fyhqwlehsf9" } ``` ### Advanced example To send an existing campaign to contacts/groups submit the following request. Parameters Required\Optional type Value CampaignId Required string The NewsLetter ID in MesserGo system Duplicate Required bool Create a duplicate campaign. IgnoreUnsubscribeCheck Optional bool Check if the contact id is in the unsubscribe list in MesserGo system. True or False DuplicateName Optional string The name of the duplicate campaign  ScheduledSending Optional DateTime In order to send a future campaign StringReplace-Fields Optional string The object where you want to make the replacement - CampaignName/Subject/Body \*The Duplicate field must to be true StringReplace-Search Optional string The current value you want to replace StringReplace-Replace Optional string The new value AllowDuplicates Optional bool Allow to send the newsletter multiple times to the same contact. if the contact exist few times in the contact list. UpdateContacts Optional bool True will update the contact fields in MesserGo system. IncludeGroupNumbers Optional int The group numbers to send the newsletter ExludeGroupNumbers Optional int The group numbers to exclude the sending the newsletter IncludeGroupIds Optional int The group ID to send the newsletter ExludeGroupId Optional int The group ID to exclude the sending the newsletter InclodeContacts Optional string Contacts parameters ContactId Optional int The Contact's unique ID in the MesserGo system. ContactRefId Optional int The Contact's unique ID in the calling system. FirstName Optional string The first name of the contact - You can inject this entry in the email (and so all contact fields) LastName Optional string The last name of the contact PhoneNumber Optional string The phone number of the contact Email Optional string The email of the contact GenderId Optional int 1=Male , 2 = Female BirthDate Optional DateTime The BirthDay of the contact Text1 Optional sting You can use 20 text fields (Text1 - Text20) Number1 Optional int You can use 4 number fields (Number1 - Number4) Date1 Optional date You can use 8 number fields (Date1- Date8) Attachment Optional sting The URL address of the file. Only PDF files allowed, maximum number per campaign – 2, up to 300K each. For full JSON options please click on bellow link: https://capi.mesergo.co.il/api/v2/Umail/Campaign/Send?view=json Notes: 1.In case of using String replace option the 3 parameters are required (Field, Search, Replace). 2.It is no possible to send ContactId and ContactRefId together. 3.If you send to contact Email address is required. ```http POST https://capi.mesergo.co.il/api/v2/Umail/Campaign/Send/ Content-Type: application/json; charset=utf-8 Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "CampaignId": "43520719", "Duplicate": 0, "IgnoreUnsubscribeCheck": 0, "ScheduledSending": "_DATETIME_", "StringReplace": [ { "Field": "CampaignName/Subject/Body", "Search": "_STRING_", "Replace": "_STRING_" } ], "AllowDuplicates": "_BOOL_", "UpdateContacts": "_BOOL_", "IncludeGroupNumbers": [ "_INT_" ], "ExcludeGroupNumbers": [ "_INT_" ], "IncludeGroupIds": [ "_INT_" ], "ExcludeGroupIds": [ "_INT_" ], "IncludeContacts": [ { "FirstName": "string", "LastName": "string", "Email": "email@adress.com", "PhoneNumber": "string", "GenderId": 1/2, "BirthDate": "1980-07-23", "AdditionalDate": "2012-05-02", "Text1": "", "Text2": "", "Number1": "", "Number2": "", "Date1": "", "Date2": "", "Attachment": "" }, { "FirstName": "string", "LastName": "string", "Email": "email@adress.com", "PhoneNumber": "string", "GenderId": 1/2, "BirthDate": "1980-07-23", "AdditionalDate": "2012-05-02", "Text1": "", "Text2": "", "Number1": "", "Number2": "", "Date1": "", "Date2": "", "Attachment": "" } ], "ExcludeContacts": [ { "ContactRefId": 100001, "Email": "one@mesergo.co.il", "PhoneNumber": "0501234567" } ], "IgnorePossibleSendingTime": "_BOOL_" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "CampaignId": 52765355, "Recipients": 0, "token": "5fyhqwlehsf9" } ``` #### Send New Campaign ### Simple example You need to use this function if you want to control the email structure via API only and set the body and subject of the email without using a predefined template on the user interface. Parameter Required\Optional type Value CampaignName Required string The campaign name that you want to the newsletter CampaignRefId Optional string The campaign unique ID. If you want to aggregate data in the system reports on the same campaign number, send the same CampaignRefId. If you do not send this parameter, the system will use default value and aggregate all the mails of that month in one campaign. (if it sent from same sender) FromAddress Required string The mail address that you send from this address have to be in white list in the system Subject Required string The email subject Body Required string The email content IncludeContacts Email Required string The email of the contact ```http POST https://capi.mesergo.co.il/api/v2/Umail/Message/Send Content-Type: application/json; charset=utf-8 Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "CampaignName": "My First Email", "CampaignRefId": "123456", "FromAddress": "ariel.l@mesergo.co.il", "ReplyAddress": "ariel@abc.co.il", "FromName": "Abc Company", "Subject": "Summer Sale", "Body": "test...", "IncludeContacts": [ { "Email": "ohad@mesergo.co.il" } ] } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Umail/Message/Send", "RequestId": "sFmbyVGdulmL1J3bm5WauEzMkV3bsNWPl1WYOR3cvhkJ1ETQzUiM1E0MlITMrAjMtYDMtIjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "Recipients": 1, "CampaignId": 68111217, "token": "56b2yu67qg5r" } } ``` ### Advanced example To send a new campaign to contacts\groups submit the following request. Parameter Required\Optional type Value CampaignName Required string The campaign name that you want to the newsletter CampaignRefId Optional string The campaign unique ID. If you want to aggregate data in the system reports on the same campaign number, send the same CampaignRefId. If you do not send this parameter, the system will use default value and aggregate all the mails of that month in one campaign. (if it sent from same sender) FromAddress Required string The mail address that you send from this address have to be in white list in the system ReplyAddress Optional string The mail address that the replay email will sent to. The address have to be in white list in the system FromName Required string The name that the sender (My Company) IgnoreUnsubscribeCheck Optional bool Set true for ignore blacklist check. (Contact customer support for this option). IgnorePossibleSendingTime Optional bool Set true for ignore the time sending that you set in your account TrackPurchaseTData Optional bool Set true to associate purchasing with this campaign. If you set true the CampaignName is required. This function is paid extra. EmbeddedImages Optional bool Set true if you want that the images in the mail will be embedded (for this function contact to our support ) ScheduledSending Optional DateTime In order to send a future campaign Subject Required string The email subject Body Required string The email content AllowDuplicates Optional bool Allow to send the newsletter multiple times to the same contact if the contact exist few times in the contact list. UpdateContacts Optional bool True will update the contact fields in MesserGo system. Attachments Name Optional string The attachments name Url Optional string The link to the attachments ContentType Optional string The Base64 file type FileData Optional string The file contents in Base64 IncludeGroupNumbers Optional int The group numbers to send the newsletter ExludeGroupNumbers Optional int The group numbers to exclude the sending the newsletter IncludeGroupIds Optional int The group ID to send the newsletter ExludeGroupId Optional int The group ID to exclude the sending the newsletter IncludeContacts Contacts parameters ContactId Optional int The Contact's unique ID in the MesserGo system. ContactRefId Optional int The Contact's unique ID in the calling system. Email Optional string The email of the contact PhoneNumber Optional string The phone number of the contact GenderId Optional int 1=Male , 2 = Female BirthDate Optional Date The BirthDay of the contact Text1 Optional sting You can use 20 text fields (Text1 - Text20) Number1 Optional int You can use 4 number fields (Number1 - Number4) Date1 Optional date You can use 8 number fields (Date1- Date8) For full JSON options please click on bellow link: https://capi.mesergo.co.il/api/v2/Umail/Message/Send?view=json Notes: 1.It is no possible to send ContactId and ContactRefId together. 2.If you send to contact Email address is required. ```http POST https://capi.mesergo.co.il/api/v2/Umail/Message/Send Content-Type: application/json; charset=utf-8 Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "CampaignName": "_STRING_", "CampaignRefId": "_STRING_", "FromAddress": "_STRING_", "FromName": "_STRING_", "IgnoreUnsubscribeCheck": "_BOOL_", "EmbeddedImages": "_BOOL_", "ScheduledSending": "_DATETIME_", "Subject": "_STRING_", "Body": "_STRING_", "Attachments": [ { "Name": "_STRING_", "Url": "_STRING_" } ], "AllowDuplicates": "_BOOL_", "UpdateContacts": "_BOOL_", "IncludeGroupNumbers": [ "_INT_" ], "IncludeContacts": [ { "ContactId": 100001, "ContactRefId": 100001, "FirstName": "David", "LastName": "Levi", "Email": "one@mesergo.co.il", "PhoneNumber": "0501234567", "GenderId": 1, "BirthDate": "1980-07-23", "AdditionalDate": "2012-05-02", "Text1": "", "Number1": "", "Date1": "" } ], "IgnorePossibleSendingTime": "_BOOL_", "TrackPurchaseTData": "_BOOL_" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "CampaignId": 52765355, "Recipients": 0, "token": "5fyhqwlehsf9" } ``` ### Example Base64 File attached ```http POST https://capi.mesergo.co.il/api/v2/Umail/Message/Send Content-Type: application/json Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json { "Data": { "CampaignName": "_STRING_", "FromAddress": "_STRING_", "ReplyAddress": "_STRING_", "FromName": "_STRING_", "Subject": "_STRING_", "Body": "

Base64image

Base64image

", "Attachments": [ { "Name": "file.pdf", "ContentType": "application/pdf", "FileData": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL01lZGlhQm94IFswIDAgNTk1IDg0Ml0KL1Jlc291cmNlcyAyIDAgUgovQ29udGVudHMgNCAwIFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwvTGVuZ3RoIDM1Pj4Kc3RyZWFtCkJUCi9GMSAyNCBUZgoxMDAgNzAwIFRkCihIZWxsbyBQREYpIFRqCkVUCmVuZHN0cmVhbQplbmRvYmoKMSAwIG9iago8PC9UeXBlIC9QYWdlcwovS2lkcyBbMyAwIFJdCi9Db3VudCAxCj4+CmVuZG9iagoyIDAgb2JqCjw8L0ZvbnQgPDwvRjEgPDwvVHlwZSAvRm9udAovU3VidHlwZSAvVHlwZTEKL0Jhc2VGb250IC9IZWx2ZXRpY2EKPj4+Pj4+CmVuZG9iago1IDAgb2JqCjw8L1R5cGUgL0NhdGFsb2cKL1BhZ2VzIDEgMCBSCj4+CmVuZG9iagp4cmVmCjAgNgowMDAwMDAwMDAwIDY1NTM1IGYKMDAwMDAwMDIwMSA2NTUzNSBuCjAwMDAwMDAyNTAgNjU1MzUgbgowMDAwMDAwMDE1IDY1NTM1IG4KMDAwMDAwMDExMCA2NTUzNSBuCjAwMDAwMDAzMjMgNjU1MzUgbgp0cmFpbGVyCjw8L1NpemUgNgovUm9vdCA1IDAgUgo+PgpzdGFydHhyZWYKMzcwCiUlRU9G" } ], "IncludeContacts": [ { "Email": "_STRING_" } ] } } ``` **דוגמת תגובה:** ```json { "StatusId": 1, "StatusDescription": "Success", "CampaignId": 52765355, "Recipients": 0, "token": "5fyhqwlehsf9" } ``` ### Campaign ### Get Campaign List The function retrieve a list of all the campaigns details under your account. Parameter Required\Optional Type Value CampaignIds Optional int For get details about couple campaigns enter array with the Campaign Ids StartDate Optional date For filter the campaigns by date enter start date EndDate Optional date For filter the campaigns by date enter end date ```http POST https://capi.mesergo.co.il/api/v2/Umail/Campaign/List/ Authorization: Your Base Credentials Content-Type: application/json; charset=utf-8 ``` **גוף הבקשה (Request Body):** ```json { "Data": { "CampaignIds": [ "30000810", "43561229" ], "StartDate": "2022-05-31", "EndDate": "2023-05-31" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Umail/Campaign/List", "RequestId": ",,Abh5mclRnbp5yZul2ZhR3cuEjMkV3bsN2Z0NXPl1WYOR3cvhkJwMTQzUSMzE0MlATMrEjMtYDMtIjMwITPw1WY0NVZtlGVmQzM4QDMwETPklkclNXV", "Data": { "List": [ { "id": 30000810, "name": "בדיקה (8)", "created": "2022-05-31 15:33:41", "status": "completed", "sent": 4, "opened": 3, "clicks": 2, "returned": "0", "blocked": "0", "url": "https://uclicks.inforustg.com/?page=webview&show=body&message=%2CUTM4ADMwAzM" } ] } } ``` ### Get Campaign The function retrieve a specific campaign details under your account. Parameter Required\Optional Type Value CampaignId Required int The Campaign Id that you want get details about ```http POST https://capi.mesergo.co.il/api/v2/Umail/Campaign/Get/ Authorization: Your Base Credentials Content-Type: application/json; charset=utf-8 ``` **גוף הבקשה (Request Body):** ```json { "Data": { "CampaignId": "30000809" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Umail/Campaign/Get", "RequestId": ",,Abh5mclRnbp5yZul2ZhR3cuEjMkV3bsN2Z0NXPl1WYOR3cvhkJyATQzUyNzE0MlATMrEjMtYDMtIjMwITPw1WY0NVZtlGVmQzM4QDMwETPklkclNXV", "Data": { "id": 30000809, "name": "בדיקה (7)", "created": "2022-05-31 15:23:31", "status": "completed", "sent": 4, "opened": 3, "clicks": 2, "returned": "0", "blocked": "0", "url": "https://uclicks.inforustg.com/?page=webview&show=body&message=%2CQTM4ADMwAzM" } } ``` ### Update Campaign The function use for duplicate and update an existing Campaign ParameterRequired\OptionaltypeValue DuplicateFromCampaignIdRequiredintcampaignId that will serve as a template for creating a new campaign in draft mode CampaignNameRequiredstringThe name of the new campaign FromAddressRequiredboolThe mail address that you send from this address have to be in white list in the system SubjectRequiredstringThe email subject BodyRequiredstringThe email content StringReplace-FieldsOptionalstringThe object where you want to make the replacement - Subject/Body StringReplace-SearchOptionalstringThe current value you want to replace StringReplace-ReplaceOptionalstringThe new value ```http POST https://capi.mesergo.co.il/api/v2/Umail/Campaign/Update Authorization: Your Base Credentials Content-Type: application/json; charset=utf-8 ``` **גוף הבקשה (Request Body):** ```json { "Data": { "DuplicateFromCampaignId": "30000810", "StringReplace": [ { "Field": "Subject", "Search": "param1", "Replace": "param2" } ] } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Umail/Campaign/Update", "RequestId": ",,Abh5mclRnbp5yZul2ZhR3cuEjMkV3bsN2Z0NXPl1WYOR3cvhkJwITQzUCOwE0MlETMrEjMtYDMtIjMwITPw1WY0NVZtlGVmQzM4QDMwETPklkclNXV", "Data": { "StatusId": 1, "StatusDescription": "Success", "CampaignId": 30000824 } } ``` ### Utilities ### Get job status The function return the campaign status after sending a campaign The optional statuses are: New, Pending, Ready , Progress, Success, Failed. Parameter Required\Optional type Value JobToken Required string The token from the campaign sending response Response Parameter Action: Dsn Open Click Return Unsubscribe Values 2.0.0/4.0.0/ 5.0.0 desktop / mobile http://www.example.com/ Customer Request 24/06/2015 14:54 request MoreInfo MoreInfo Sent/ deferred ```http POST https://capi.mesergo.co.il/api/v2/Umail/Campaign/Job Authorization: Your Base Credentials Content-Type: application/json; charset=utf-8 ``` **גוף הבקשה (Request Body):** ```json { "Data": { "JobToken": "715fzq90yzsi" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Umail/Campaign/Job", "RequestId": ",,Abh5mclRnbp5yZul2ZhR3cuEjMkV3bsN2Z0NXPl1WYOR3cvhkJ5QTQzUyMxE0MlETMrEjMtYDMtIjMwITPw1WY0NVZtlGVmQzM4QDMwETPklkclNXV", "Data": { "status": "pending", "description": "" } } ``` ### Get Mail Notification This function is used to receive information about recipients that received/not recived the email (DSN) and the recipients that opened / clicked on the email. required to pre-set the settings in the system to store the data. After pulling the data they are deleted from the queue. Parameter Required\Optional Type Value BatchSize Required string The number of Messages transferred Response Parameter Action Dsn Open Click Return Unsubscribe CustomerMessageId Values 2.0.0/4.0.0/5.0.0 desktop \mobile http://www.example.com Customer Request 24/06/2015 14:54 request Can be displayd if the parmeter sent in the sent email reques and the mail bodu conatin this parameter [#CustomerMessageId#] MoreInfo Sent/ deferred ```http POST https://capi.mesergo.co.il/api/v2/Umail/GetMailNotification Authorization: Your Base Credentials Content-Type: application/json; charset=utf-8 ``` **גוף הבקשה (Request Body):** ```json { "Data": { "BatchSize": "200" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Umail/GetMailNotification", "RequestId": ",wWYuJXZ05WauUncvZmbp5CMxkGchNWPl1WYOR3cvhkJxUTQzUSOwE0MlUTMrYDMtcDMtIjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "List": [ { "Datetime": "2022-07-04 09:35:47", "CampaignId": 69042121, "Email": "ariel.l@mesergo.co.il", "Action": "open", "Value": "desktop", "CustomerMessageId": 1234 }, { "Datetime": "2022-07-03 22:14:05", "CampaignId": 69042121, "Email": "ariel.l@mesergo.co.il", "Action": "dsn", "Value": "2.0.0", "MoreInfo": "sent", "AdditionalInformation": "250 2.0.0 OK 1656875494 ", "CustomerMessageId": 12345 }, { "Datetime": "2022-07-03 22:11:39", "CampaignId": 69042121, "Email": "ariel.l@mesergo.co.il", "Action": "open", "Value": "desktop", "CustomerMessageId": 12346 } ] } } ``` ### Notification On Unsubscribe If you are interested to receiving an update at the time of Unsubscribe of the recipient, please contact our customer service and provide us the URL It sends an update. ```http POST http://www.clienturl.co.il/demo.aspx ``` **גוף הבקשה (Request Body):** ``` ``` ### Stop Future Campaign The function stop future Campaign by Campaign ID Parameter Required\Optional type Value CampaignId Required string The Campaign ID to stop. The Campaign to stop should be future Campaign ```http POST https://capi.mesergo.co.il/api/v2/Umail/Campaign/Stop Content-Type: application/json Authorization: Your Base Credential ``` **גוף הבקשה (Request Body):** ```json { "Data": { "CampaignId": "91619263" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Umail/Campaign/Stop", "RequestId": ",wWYuJXZ05WauUncvZmbp5CMykGchNWPl1WYOR3cvhkJ4ITQzUyM0E0MlATMrEjMtMDMtQjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": null } ``` --- ## קודי שגיאה > שדה `StatusDescription` עשוי להשתנות מעת לעת — אין לבסס לוגיקה על הטקסט שלו, אלא רק על `StatusId` או על קוד ה-HTTP. **דוגמת תגובת שגיאה:** ```json { "StatusId": -13, "StatusDescription": "UserQuotaExceeded", "DetailedDescription": "", "Data": null } ``` ### קודי סטטוס לשליחת מייל | קוד | משמעות | |-----|--------| | `1` | הצלחה (Success) | | `-1` | כשל כללי (Failed) | | `-2` | שם משתמש או סיסמה שגויים | | `-13` | חריגת מכסת משתמש | | `-14` | חריגת מכסת פרויקט | | `-15` | חריגת מכסת לקוח | | `-26` | שגיאת אימות משתמש | | `-230` | כתובת URL לא תקינה | | `-429` | יותר מדי בקשות (חריגת קצב) | ### סטטוסי קמפיין (Get job status) | קוד | משמעות | |-----|--------| | `New` | נוצר, טרם התחיל | | `Pending` | ממתין | | `Ready` | מוכן לשליחה | | `Progress` | בתהליך שליחה | | `Success` | הושלם בהצלחה | | `Failed` | נכשל | --- # ממשק אנשי קשר (Contacts) — מסר גו API > חלק ממערך התיעוד של **מסר גו (MesserGo)**. כל ה-endpoints פועלים מול הדומיין `capi.mesergo.co.il`. > אימות: HTTP Basic — ראו [authentication.md](authentication.md). תיעוד ניהול אנשי קשר, קבוצות, שדות מותאמים והסרה מרשימת תפוצה (Unsubscribe). All functions in this document works in the same way. The URL contains version and function names. The authentication can be transmitted in the header in Base64, it can also be transmitted in the Body. The Body contains the JOSN data Response Status Codes In response to your request you will receive an Http code, as well as a StatusId & Status Description. Note: the Status Description may change from time to time, hence we do not recommend basing logic on it, only on StatusId or Http code. Http Code Statis Code Status Description 200 1 OK 401 -1 General failure 401 -2 Authentication failed or illegal IP address 403 -221 User Not Active 403 -222 Locked Out 403 -2010 Max records for this method is 100 403 -2011 Max records for this method is 5000 403 -2014 RequestToken not found 403 -2015 Job in progress ### Create or Update Contact This function creates or updates contacts. You can send up to 5000 items per request. (If you send up to 10 items, the response is final, if you send more, for final response use "Check Status Token" function). The key for update is Email address, or Phone number, or both. Email or Phone is mandatory all other fields are optional. Parameters Key Required\Optional type Value FirstName Optional string The first name of the contact LastName Optional string The last name of the contact PhoneNumber Required string The phone number of the contact Email Required string The email of the contact ContactRefId Optional string The Contact's unique ID in the calling system. FirebaseToken Optional string Use for sending notifications to Google devices and apple. If you send only FirebaseToken without Email or Phone, you should also send ContactRefId. Platform Optional string "ANDROID" / "IOS", If you use FirebaseToken you should also send Platform"ANDROID" / "IOS", If you use FirebaseToken you should also send Platform Device1StatusId Optional int Use for sending notifications to Google devices and apple. The parameter can set with an active or inactive contact token 1 = active -3 = inactive GenderId Optional int 1=Male , 2 = Female AddToGroupName Optional string Add to group by name, if the group does not exist it will be created automatically RemoveFromGroupName Optional string Remove from group by name RegistrationCampaign Optional string Allows you to record where the contact came from. You can enter a value in the field only when creating a new contact EmailSubscriberStatus Optional Subscribed / Unsubscribed Allows you to choose whether the contact's Email is added in a subscribed or unsubscribed state (default is subscribed) \\\\\\\\\\\\\\\\\\\\\*contact our support for configuration at support@mesergo.co.il PhoneSubscriberStatus Optional Subscribed / Unsubscribed Allows you to choose whether the contact's phone number is added in a subscribed or unsubscribed state (default is subscribed) \\\\\\\\\\\\\\\\\\\\\*contact our support for configuration at support@mesergo.co.il Note: To delete an existing means of contact (email or phone) you need to write "delete" in value. **\\\\\\\\* If you wish to use EmailSubscriberStatus or PhoneSubscriberStatus - please contact supprot@mesergo.co.il to configure before use. without configuration, existing status of a contact on your contacts list will remain the same regardless of what you pass in the parameters. Advanced options https://capi.mesergo.co.il/api/v2/Contact/CreateOrUpdateContacts?view=json ```http POST https://capi.mesergo.co.il/api/v2/Contact/CreateOrUpdateContacts Content-Type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "List": [ { "FirstName": "string", "LastName": "string", "PhoneNumber": "string", "Email": "string", "AddToGroupName": "string" } ] } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/CreateOrUpdateContacts", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJzETQzUyN1E0MlITMrETMtUDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "UploadToken": "BodyPart_a66bcef1-8b5a-4578-84ed-43bdb0a3402e", "Rows": 1, "ContactsUpdates": 0, "ContactsNew": 0, "ContactsExisting": 1, "RowsFailed": 0, "CountErrors": 0, "Errors": [] } } ``` ### Check Status Token This function checks the final result received in answer to your request (in the case you have created more than 10 contacts). Parameters Key Required\Optional type Value RequestToken Required string upload token from the response of the create contact request ```http POST https://capi.mesergo.co.il/api/v2/Contact/CheckJobStatusByToken content-type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "RequestToken": "BodyPart_a90e0d80-5653-4c33-ba1a-41ca86bae650" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/CheckJobStatusByToken", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJyUTQzUyNxE0MlETMrEzMtUDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "UploadToken": "BodyPart_a90e0d80-5653-4c33-ba1a-41ca86bae650", "Rows": 1, "ContactsUpdates": 0, "ContactsNew": 0, "ContactsExisting": 1, "RowsFailed": 0, "CountErrors": 1, "Errors": [ { "RowNumber": 1, "ErrorCode": -92, "FieldName": "Email", "ActualFieldName": "Email", "ErrorValue": "Cohen@test ", "ErrorMessage": "UploadError.InvalidValueForFieldEmail" } ] } } ``` ### Delete Contact This function deletes contacts by Phone/Email/ContactRefId/ContactId. The contacts that t you delete removed from all groups. You can send up to 100 items per request. The request should be POST Parameters Key Required\Optional type Value Type Required string Phone/ Email/ ContactRefId/ ContactId Value Required string The value of the type Advanced options https://capi.mesergo.co.il/api/v2/Contact/DeleteContacts?view=json ```http POST https://capi.mesergo.co.il/api/v2/Contact/DeleteContacts Content-Type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "List": [ { "Type": "Phone", "Value": "0541234567" } ] } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/DeleteContacts", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJ0UTQzUCNzE0MlATMrEzMtUDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "DeletedCount": 1 } } ``` ### GetContact This function finds contacts by Phone/Email/ContactRefId/ContactId. You can find more than one contact at a time if there is more than one contact based on your search. The request should be POST Parameters Key Required\Optional type Value Type Required string Phone/Email/ContactRefId/ContactId Value Required string Value of the type Configuration Required string WithGroups/WithoutGroups Response fieldes: ContactId - (int) The system contact number. ContactRefId - (string) The ID you provided for the contact (could be null). EmailStatusId / PhoneStatusId - (int) The Phone / Email status. • 1 - Active • -2 - Unsubscribe • 0 - WithOutStatus (if Email or Phone is empty) ```http POST https://capi.mesergo.co.il/api/v2/Contact/GetContact content-type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "Type": "Phone", "Value": "string", "Configuration": "WithoutGroups" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/GetContact", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJzATQzUCN1E0MlETMrEzMtUDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "Contacts": { "Count": 1, "List": [ { "ContactId": 585578002, "ContactRefId": "", "Email": "cohen@test.com", "EmailStatusId": 1, "PhoneNumber": "0541234567", "PhoneStatusId": 1, "DateCreated": "2021-05-31 11:08:31", "UpdateDate": "2021-05-31 11:08:31", "FirstName": "David", "LastName": "Cohen", "GenderId": null, "BirthDate": "", "AdditionalDate": "", "Text1": "", "Text2": "", "Text3": "", "Text4": "", "Text5": "", "Text6": "", "Text7": "", "Text8": "", "Text9": "", "Text10": "", "Text11": "", "Text12": "", "Text13": "", "Text14": "", "Text15": "", "Text16": "", "Text17": "", "Text18": "", "Text19": "", "Text20": "", "Number1": null, "Number2": null, "Number3": null, "Number4": null, "Date1": null, "Date2": null, "Date3": null, "Date4": null, "Date5": null, "Date6": null, "Date7": null, "Date8": null } ] } } } ``` ### Get contact list This function Gets the list of contacts. The request is to be by POST. Parameters Key Required\Optional type Value FilterBy Required string CreatedDate/UpdatedDate FromDate Required Date From Date includes this date ToDate Required Date To Date include this date OnlyForGroupId Optional int If you want to get contacts on specific group LastFetchedId Optional int Get batch starting with ID larger than xxx(if a first request is made use 0 or null) ```http POST https://capi.mesergo.co.il/api/v2/Contact/GetContactList content-type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "FilterBy": "CreatedDate", "FromDate": "2021/05/15", "ToDate": "2021/05/30", "OnlyForGroupId": "300226604", "LastFetchedId": 0 } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/GetContactList", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJ1QTQzUCO0E0MlMTMrEzMtUDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "LastFetchedId": 578674342, "Count": 1, "List": [ { "ContactId": 578674342, "ContactRefId": null, "Email": null, "EmailStatusId": 0, "PhoneNumber": "0732224536", "PhoneStatusId": 1, "DateCreated": "2021-05-18 09:25:55", "UpdateDate": "2021-05-24 09:48:03", "FirstName": "אריאל", "LastName": "Levi", "GenderId": null, "BirthDate": "", "AdditionalDate": "", "Text1": "", "Text2": null, "Text3": null, "Text4": null, "Text5": null, "Text6": null, "Text7": null, "Text8": null, "Text9": null, "Text10": null, "Text11": null, "Text12": null, "Text13": null, "Text14": null, "Text15": null, "Text16": null, "Text17": null, "Text18": null, "Text19": null, "Text20": null, "Number1": null, "Number2": null, "Number3": null, "Number4": null, "Date1": null, "Date2": null, "Date3": null, "Date4": null, "Date5": null, "Date6": null, "Date7": null, "Date8": null } ] } } ``` ### Create or Update Group This function creates or update group. The request should be POST Parameters Key Required\Optional type Value GroupName Required string The name of new/existing group GroupId Required int use 0 or null for new group, number for update exist group. Advanced Options https://capi.mesergo.co.il/api/v2/Contact/CreateOrUpdateGroup?view=json ```http POST https://capi.mesergo.co.il/api/v2/Contact/CreateOrUpdateGroup content-type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "GroupName": "New Groupe", "GroupId": 300230515 } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/CreateOrUpdateGroup", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJwITQzUyN1E0MlQTMrEzMtUDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "GroupId": 300230515, "GroupTypeId": 1, "GroupNumber": 15, "GroupName": "New Groupe", "Description": "", "CountActiveContacts": null, "CountActiveContactsMail": null, "CountActiveContactsSms": null, "CountActiveContactsDevice1": null, "CountActiveContactsDevice2": null, "DateCreated": "2021-05-31 14:57:21", "UpdateDate": "2021-05-31 14:57:21" } } ``` ### Delete Group This function delete group by name or id. If you delete by name, multiple groups may be deleted The request should be POST Parameters Key Required\Optional type Value DeleteGroupBy Required string GroupId /GroupNumber /GroupName Value Required int The value of the delete group by Configuration Optional string WithoutDeleteContacts/ WithDeleteContacts/ EmptyGroupOnly DeleteBy – key for delete group. (if you choose by GroupName, can delete Capel groups) . Advanced Options https://capi.mesergo.co.il/api/v2/Contact/DeleteGroup?view=json ```http POST https://capi.mesergo.co.il/api/v2/Contact/DeleteGroup Content-Type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "DeleteGroupBy": "GroupName", "Value": "group", "Configuration": "WithoutDeleteContacts" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/DeleteGroup", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJwMTQzUSOwE0MlATMrEDMtYDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "Count": 1, "Configuration": "WithoutDeleteContacts", "List": [ { "GroupId": 300230716, "GroupNumber": 16, "GroupName": "group" } ] } } ``` ### Get Group This function finds group by GroupId/GroupNumber/GroupName. You can find more than one Group at a time if you use by GroupName. The request should be POST Parameters Key Required\Optional type Value GetGroupBy Required string GroupId/GroupNumber/GroupName Value Required int The value of the get group by ```http POST https://capi.mesergo.co.il/api/v2/Contact/GetGroup Content-Type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "GetGroupBy": "GroupNumber", "Value": "7" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/GetGroup", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJ2UTQzUSNxE0MlATMrEDMtYDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "Count": 1, "List": [ { "GroupId": 300226604, "GroupTypeId": 1, "GroupNumber": 7, "GroupName": 1805, "Description": "", "CountActiveContacts": 1, "CountActiveContactsMail": 0, "CountActiveContactsSms": 1, "CountActiveContactsDevice1": 0, "CountActiveContactsDevice2": 0, "DateCreated": "2021-05-18 09:25:37", "UpdateDate": "2021-05-18 09:29:48" } ] } } ``` ### Get group list This function Gets the list of Groups. The request is to be by POST. Parameters Key Required\Optional type Value FromDate Optional date From Date includes this date ToDate Optional date To Date include this date Type Optional string Can be Regular/Dynamic/All LastFetchedId Optional int Get batch starting with ID larger than X (if a first request is made use 0 or null). Advanced Options https://capi.mesergo.co.il/api/v2/Contact/GetGroupList?view=json ```http POST https://capi.mesergo.co.il/api/v2/Contact/GetGroupList content-type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/GetGroupList", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJwITQzUiNyE0MlATMrEDMtYDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "LastFetchedId": 300230515, "Count": 7, "List": [ { "GroupId": 300222716, "GroupNumber": 1, "GroupName": "בדיקה", "GroupTypeId": 1, "Description": "", "CountActiveContactsMail": 7, "CountActiveContactsSms": 7, "CountActiveContactsDevice1": 0, "CountActiveContactsDevice2": 0, "DateCreated": "2021-05-03 10:40:03", "UpdateDate": "2021-05-10 10:33:24" }, { "GroupId": 300224145, "GroupNumber": 3, "GroupName": "תמיכה", "GroupTypeId": 1, "Description": null, "CountActiveContactsMail": 3, "CountActiveContactsSms": 3, "CountActiveContactsDevice1": 0, "CountActiveContactsDevice2": 0, "DateCreated": "2021-05-09 10:09:19", "UpdateDate": "2021-05-09 10:09:19" }, { "GroupId": 300226604, "GroupNumber": 7, "GroupName": 1805, "GroupTypeId": 1, "Description": "", "CountActiveContactsMail": 0, "CountActiveContactsSms": 1, "CountActiveContactsDevice1": 0, "CountActiveContactsDevice2": 0, "DateCreated": "2021-05-18 09:25:37", "UpdateDate": "2021-05-18 09:29:48" }, { "GroupId": 300228339, "GroupNumber": 11, "GroupName": "TEST123456", "GroupTypeId": 1, "Description": "", "CountActiveContactsMail": 29143, "CountActiveContactsSms": 0, "CountActiveContactsDevice1": 0, "CountActiveContactsDevice2": 0, "DateCreated": "2021-05-24 10:37:09", "UpdateDate": "2021-05-24 10:37:09" }, { "GroupId": 300228432, "GroupNumber": 12, "GroupName": "cxz", "GroupTypeId": 1, "Description": "", "CountActiveContactsMail": 0, "CountActiveContactsSms": 0, "CountActiveContactsDevice1": 0, "CountActiveContactsDevice2": 0, "DateCreated": "2021-05-24 12:03:20", "UpdateDate": "2021-05-24 12:03:20" }, { "GroupId": 300230511, "GroupNumber": 14, "GroupName": "test", "GroupTypeId": 1, "Description": null, "CountActiveContactsMail": 0, "CountActiveContactsSms": 0, "CountActiveContactsDevice1": 0, "CountActiveContactsDevice2": 0, "DateCreated": "2021-05-31 14:42:02", "UpdateDate": "2021-05-31 14:42:02" }, { "GroupId": 300230515, "GroupNumber": 15, "GroupName": "New Groupe", "GroupTypeId": 1, "Description": null, "CountActiveContactsMail": 0, "CountActiveContactsSms": 0, "CountActiveContactsDevice1": 0, "CountActiveContactsDevice2": 0, "DateCreated": "2021-05-31 14:57:21", "UpdateDate": "2021-05-31 14:57:21" } ] } } ``` ### Unsubscribe This function unsubscribes Phones and Emails. You may send up to 100 communication items per request. The request is to be by POST. Parameters Key Required\Optional type Value UnsubscribeReason Required string The reason for which you request the communication items to be unsubscribed UnsubscribeName Optional string The system name which executes the request (optional - default API). Type Required string Can be Email / Phone. Value Required string The Email / Phone. Advanced Options https://capi.mesergo.co.il/api/v2/Contact/Unsubscribe?view=json ```http POST https://capi.mesergo.co.il/api/V2/Contact/Unsubscribe Content-Type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "UnsubscribeReason": "Customer request", "List": [ { "Type": "Phone", "Value": "0541234567" } ] } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/V2/Contact/Unsubscribe", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJzATQzUyM0E0MlATMrEDMtYDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "Success": { "Count": 1 }, "Failed": { "Count": 0, "List": [] } } } ``` ### Reactivate Unsubscribe This function reactivates unsubscribed items. You may send up to 100 items (Phones or Emails) per request. The request is to by POST. Parameters Key Required\Optional type Value ReactivationReason Required string – The reason for which you wish to reactivate the unsubscribed UnsubscribeName Optional string The system name which executes the request (optional - default API). Type Required string Can be Email / Phone. Value Required string The Email / Phone. Advanced Options https://capi.mesergo.co.il/api/v2/Contact/ReactivateUnsubscribe?view=json ```http POST https://capi.mesergo.co.il/api/v2/Contact/ReactivateUnsubscribe content-type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "ReactivationReason": "Customer request", "List": [ { "Type": "Phone", "Value": "0541234567" } ] } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/ReactivateUnsubscribe", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJ3ITQzUSOyE0MlQTMrEDMtYDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "Success": { "Count": 1 }, "Failed": { "Count": 0, "List": [] } } } ``` ### Get Unsubscribe List This function Gets the list of Unsubscribed. The request is to be by POST. Parameters Key Required\Optional type Value FromDate Required date From Date includes this date ToDate Required date To Date include this date Type Required string Can be Email / Phone. LastFetchedId Optional int Get batch starting with ID larger than X (if a first request is made use 0 or null). Advanced Options https://capi.mesergo.co.il/api/v2/Contact/GetUnsubscribeList?view=json ```http POST https://capi.mesergo.co.il/api/v2/Contact/GetUnsubscribeList Content-Type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json {"Data" :{"FromDate":"2021/06/01", "ToDate": "2021/06/01","Type": "Phone", "LastFetchedId": 0 } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/GetUnsubscribeList", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJ5UTQzUCNzE0MlcTMrEDMtYDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "LastFetchedId": 35709398, "Count": 1, "List": [ { "Type": "Phone", "Value": "0541234567", "UnsubscribeDatetime": "2021-06-01 17:34:38" } ] } } ``` ### GetUnsubscribeHistory This function get unsubscribed or Reactivated history for Phone/Emails. The request is to by POST. Parameters Key Required\Optional type Value Type Required string Phone /Email /ContactRefId /ContactId Value Required string Value of the type ```http POST https://capi.mesergo.co.il/api/v2/Contact/GetUnsubscribeHistory Content-Type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "Type": "Phone", "Value": "0541234567" } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/GetUnsubscribeHistory", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJwETQzUSNyE0MlETMrMDMtYDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "Count": 10, "List": [ { "Type": "Phone", "Value": "0541234567", "Action": "Reactivate", "ActionDatetime": "2021-06-01 17:31:55", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0541234567", "Action": "Optout", "ActionDatetime": "2021-06-01 17:31:12", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0543266290", "Action": "Reactivate", "ActionDatetime": "2021-06-01 14:29:27", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0543266290", "Action": "Optout", "ActionDatetime": "2021-06-01 10:43:03", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0541234567", "Action": "Reactivate", "ActionDatetime": "2021-05-18 14:41:23", "ActionSource": "manual", "ActionReason": "test", "DoActionName": "ariel" }, { "Type": "Phone", "Value": "0543266290", "Action": "Optout", "ActionDatetime": "2021-05-09 14:27:37", "ActionSource": "InforuContacts", "ActionReason": "test -", "DoActionName": "ariel" }, { "Type": "Phone", "Value": "0543266290", "Action": "Reactivate", "ActionDatetime": "2021-05-09 14:23:03", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0543266290", "Action": "Optout", "ActionDatetime": "2021-05-09 14:22:07", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0543266290", "Action": "Reactivate", "ActionDatetime": "2021-05-09 14:21:01", "ActionSource": "manual", "ActionReason": "tesy", "DoActionName": "ariel" }, { "Type": "Phone", "Value": "0543266290", "Action": "Optout", "ActionDatetime": "2021-05-09 14:20:36", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" } ] } } ``` ### Get Unsubscribe History List This function get unsubscribed history List for all Phones / Emails. The request is to by POST. Parameters Key Required\Optional type Value Type Required string Phone/Email FromDate Required Date From Date includes this date ToDate Required Date To Date include this date Action Required string Unsubscribe/Reactivate/All LastFetchedId Optional int Get batch starting with ID larger than X ```http POST https://capi.mesergo.co.il/api/v2/Contact/GetUnsubscribeHistoryList Content-Type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "Type": "Phone", "FromDate": "2021/05/08", "ToDate": "2021/06/10", "Action": "All", "LastFetchedId": 0 } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/GetUnsubscribeHistoryList", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJ5MTQzUyMzE0MlkDMrIDMtYDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "LastFetchedId": 94121250, "Count": 11, "List": [ { "Type": "Phone", "Value": "0543266290", "Action": "Unsubscribe", "ActionDateTime": "2021-05-09 14:20:36", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0543266290", "Action": "Reactivate", "ActionDateTime": "2021-05-09 14:21:01", "ActionSource": "manual", "ActionReason": "tesy", "DoActionName": "ariel" }, { "Type": "Phone", "Value": "0543266290", "Action": "Unsubscribe", "ActionDateTime": "2021-05-09 14:22:07", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0543266290", "Action": "Reactivate", "ActionDateTime": "2021-05-09 14:23:03", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0543266290", "Action": "Unsubscribe", "ActionDateTime": "2021-05-09 14:27:37", "ActionSource": "InforuContacts", "ActionReason": "test -", "DoActionName": "ariel" }, { "Type": "Phone", "Value": "0543266290", "Action": "Reactivate", "ActionDateTime": "2021-05-18 14:41:23", "ActionSource": "manual", "ActionReason": "test", "DoActionName": "ariel" }, { "Type": "Phone", "Value": "0543266290", "Action": "Unsubscribe", "ActionDateTime": "2021-06-01 10:43:03", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0543266290", "Action": "Reactivate", "ActionDateTime": "2021-06-01 14:29:27", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0543266290", "Action": "Unsubscribe", "ActionDateTime": "2021-06-01 17:31:12", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0543266290", "Action": "Reactivate", "ActionDateTime": "2021-06-01 17:31:55", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" }, { "Type": "Phone", "Value": "0541234567", "Action": "Unsubscribe", "ActionDateTime": "2021-06-01 17:34:38", "ActionSource": "api", "ActionReason": "Customer request", "DoActionName": "API" } ] } } ``` ### Check if Unsubscribed This function checks if list is Unsubscribe. You can send up to 100 items per request. The request is to be by POST. Parameters Key Required\Optional type Value Type Required string Phone /Email/ ContactRefId/ ContactId Value Required string the value of the type ```http POST https://capi.mesergo.co.il/api/v2/Contact/CheckIfUnsubscribe Content-Type: application/json Authorization: Basic USER:TOKEN (Encode Base64) ``` **גוף הבקשה (Request Body):** ```json { "Data": { "List": [ { "Type": "Phone", "Value": "0541234567" } ] } } ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/CheckIfUnsubscribe", "RequestId": ",,Abh5mclRnbp5Sdy9mZulmLkV3bsNWPl1WYOR3cvhkJ1QTQzUiM1E0MlITMrcDMtYDMtEjMwITPw1WY0NVZtlGVmQDNyQDNwETPklkclNXV", "Data": { "Unsubscribe": { "Count": 0, "List": [] }, "NotUnsubscribe": { "Count": 1, "List": [ { "Type": "Phone", "Value": "0541234567" } ] } } } ``` ### Get Fields This function Gets the list of contact fields The request is to be by POST Response Parameters Parameter type Description FieldId int The filed ID in MesserGo system ActualFieldName string The API Filed Name Caption string The filed name in MesserGo system FieldType string The filed type ```http POST https://capi.mesergo.co.il/api/v2/Contact/GetFields/ Content-Type: application/json Authorization: Your Base Credentials ``` **גוף הבקשה (Request Body):** ```json {} ``` **דוגמת תגובה (HTTP 200):** ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/Contact/GetFields", "RequestId": ",wWYuJXZ05WauUncvZmbp5CMykGchNWPl1WYOR3cvhkJwATQzUyNzE0MlkDMrAzMtcDMtQjMwITPw1WY0NVZtlGVmcjNzQjNwETPklkclNXV", "Data": { "Count": 21, "List": [ { "FieldId": 1, "ActualFieldName": "FirstName", "Caption": "שם פרטי", "FieldType": "string" }, { "FieldId": 2, "ActualFieldName": "LastName", "Caption": "שם משפחה", "FieldType": "string" }, { "FieldId": 3, "ActualFieldName": "PhoneNumber", "Caption": "טלפון", "FieldType": "string" }, { "FieldId": 5, "ActualFieldName": "Email", "Caption": "אימייל", "FieldType": "string" }, { "FieldId": 42, "ActualFieldName": "BirthDate", "Caption": "תאריך לידה", "FieldType": "date" }, { "FieldId": 46, "ActualFieldName": "GenderId", "Caption": "מגדר", "FieldType": "gender" }, { "FieldId": 48, "ActualFieldName": "AdditionalDate", "Caption": "תאריך נוסף", "FieldType": "date" }, { "FieldId": 153, "ActualFieldName": "ContactRefId", "Caption": "מספר אסמכתא", "FieldType": "string" }, { "FieldId": 162, "ActualFieldName": "Device1Id", "Caption": "מזהה מכשיר 1", "FieldType": "string" }, { "FieldId": 164, "ActualFieldName": "Device2Id", "Caption": "מזהה מכשיר 2", "FieldType": "string" }, { "FieldId": 166, "ActualFieldName": "Device1Type", "Caption": "סוג מכשיר 1", "FieldType": "string" }, { "FieldId": 168, "ActualFieldName": "Device2Type", "Caption": "סוג מכשיר 2", "FieldType": "string" }, { "FieldId": 170, "ActualFieldName": "Device1StatusId", "Caption": "סטטוס מכשיר 1", "FieldType": "int" }, { "FieldId": 172, "ActualFieldName": "Device2StatusId", "Caption": "סטטוס מכשיר 2", "FieldType": "int" }, { "FieldId": 183, "ActualFieldName": "ContactScoring", "Caption": "דירוג", "FieldType": "int" }, { "FieldId": 16522, "ActualFieldName": "Text1", "Caption": "קישור", "FieldType": "string" }, { "FieldId": 16907, "ActualFieldName": "Text25", "Caption": "טקסט חדש", "FieldType": "string" }, { "FieldId": 16908, "ActualFieldName": "Text26", "Caption": "מספר חדש", "FieldType": "string" }, { "FieldId": 16909, "ActualFieldName": "Text27", "Caption": "תאריך חדש", "FieldType": "string" }, { "FieldId": 16910, "ActualFieldName": "Date25", "Caption": "תאריך", "FieldType": "date" }, { "FieldId": 17765, "ActualFieldName": "Number25", "Caption": "מספרי", "FieldType": "int" } ] } } ``` --- ## קודי שגיאה > שדה `StatusDescription` עשוי להשתנות מעת לעת — אין לבסס לוגיקה על הטקסט שלו, אלא רק על `StatusId` או על קוד ה-HTTP. **דוגמת תגובת שגיאה:** ```json HTTP/1.1 403 Forbidden { "StatusId": -2015, "StatusDescription": "Job in progress", "Data": null } ``` ### קודי סטטוס לאנשי קשר | HTTP | StatusId | משמעות | |------|----------|--------| | `200` | `1` | תקין (OK) | | `401` | `-1` | כשל כללי | | `401` | `-2` | אימות נכשל או כתובת IP לא חוקית | | `403` | `-221` | המשתמש אינו פעיל | | `403` | `-222` | חשבון נעול | | `403` | `-2010` | מקסימום 100 רשומות לפעולה זו | | `403` | `-2011` | מקסימום 5000 רשומות לפעולה זו | | `403` | `-2014` | RequestToken לא נמצא | | `403` | `-2015` | עבודה בתהליך (Job in progress) | --- # WhatsApp — שליחת הודעת תבנית מערכת הווטסאפ של מסר גו פועלת בכתובת נפרדת: `https://wa.message.co.il`. האימות בשיטת GET עם טוקן ב-query string. ``` GET https://wa.message.co.il/api/360/{endpoint}/send ``` פרמטרים (query): - `phone` (חובה) — מספר הנמען בפורמט בינלאומי ללא +, למשל 972585050000. - `template` (חובה) — שם התבנית כפי שאושרה. - `token` (חובה) — טוקן האימות (מהתמיכה). - `language` (רשות) — קוד שפת התבנית (he, en_US, ar...). ברירת מחדל: עברית (he) אם לא נשלח. - `params[0]`, `params[1]`... (רשות) — ערכים למשתני גוף התבנית ({{1}}, {{2}}...), לפי סדר. - `header[0][0][link]` (רשות) — קישור למדיה בכותרת. - `header[0][1]` (רשות) — סוג המדיה: image / video / document. - `ns` (רשות) — טוקן 360 פנימי (רק לחבילת 360). את מזהה ה-Endpoint ואת הטוקן מקבלים מצוות התמיכה של מסר גו.