# Sendmsg API 4.5 REST API for managing subscribers and mailing lists and for sending email and SMS campaigns. Base URL: `https://gconvertrest.sendmsg.co.il/api/Sendmsg` ## Authentication POST your SiteID and API password to `/token`. Send the returned token as the `Authorization` header on every other request. Tokens last 12 hours. Append `?full=true` to the token request for its metadata. The API password comes from support at send.help@comstar.co.il. ## Conventions - **Encode as UTF-8.** Send strings as UTF-8. This is required for Hebrew to survive the round trip. - **PHP requires Content-Length.** PHP clients must set Content-Length to the byte length of the JSON body. - **Tokens last 12 hours.** Renew well before expiry rather than waiting for a call to fail. - **Every code carries detail.** Whatever the status, result.ResultMessage explains it. ## API Support Support requests are only accepted on the proper template. 1. Copy the template into your mail client. 2. Fill it in with the details it asks for. 3. Send it to send.help@comstar.co.il. Template: https://gconvertrest.sendmsg.co.il/views/apisupport.html Email: send.help@comstar.co.il ## About SMS SMS can be sent through this API. Restrictions on `SenderPhone`: - Any special character or space is deleted. - Any word longer than 11 characters is trimmed. - Letters must be English only. ## Status codes | Code | Meaning | | --- | --- | | 200 or 10000 | Success. | | 201–299 | Success, with a message in the result. | | 410 | Did not find what you were looking for. | | 500 | An error occurred. | | 530 | Try again later. | | 531 | The data was inserted, but the message was not sent. | | 550 | An error occurred during data extraction. Try again later. | Every status code returns detail in `result.ResultMessage`. ## Response envelope Every endpoint wraps its result in `success`, `res` and a `result` object holding `ResultID`, `ResultMessage` and the deprecated, always-empty `Tin`. The endpoint's own payload sits alongside them under its own key. ## Getting started Obtain a token and confirm it works. Every other endpoint needs one. ### Get a token `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/token` Exchange your account SiteID and API password for a bearer token. SiteID is your Sendmsg account number. The API password comes from the support team. Send the token as the Authorization header on every other call. Does not require a token. Request: ```json { "siteID": 1687, "password": "0123456789" } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/token' \ -H 'Content-Type: application/json' \ -d '{ "siteID": 1687, "password": "0123456789" }' ``` Response: ```json { "Token": "34234-34234234-fsdgdfg-34r5t343f334f" } ``` Notes: - The token is valid for 12 hours. Renewing it well before expiry is recommended. - Append ?full=true to receive the token metadata, such as its timestamp and expiry date. ### Test authentication `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/ping` Confirms that your token is valid. Useful as a first call when wiring up an integration. Requires an Authorization header. ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/ping' \ -H 'Authorization: YOUR_TOKEN' ``` Response: ```json { "isSuccess": true, "msg": "hello user: 11111 test works! you are now validated.." } ``` ## Subscribers Add, update, inspect and change the status of the people you send to. ### Add or update subscribers `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersOnly` Adds subscribers to your account, or updates them if they already exist. The body is an array of user objects. Requires an Authorization header. #### By email **User object, identified by email** Identifies a subscriber by email address. If both UserID and EmailAddress are supplied and populated, the result is based on the email. | Field | Type | Required | Description | | --- | --- | --- | --- | | `EmailAddress` | string | yes | Subscriber email address. | | `Cellphone` | string | no | Subscriber mobile number. | | `FirstName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `LastName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `userSystemFields` | array | no | Custom account fields to store permanently against the subscriber. | Request: ```json [ { "EmailAddress": "comstar@comstar.com", "Cellphone": "0501234567", "FirstName": "Client First Name", "LastName": "Client Last Name", "userSystemFields": [ { "Key": "Custom Field Name In Sendmsg", "Value": "Value" } ] } ] ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersOnly' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '[ { "EmailAddress": "comstar@comstar.com", "Cellphone": "0501234567", "FirstName": "Client First Name", "LastName": "Client Last Name", "userSystemFields": [ { "Key": "Custom Field Name In Sendmsg", "Value": "Value" } ] } ]' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": 1, "message": 0 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: user count - `data.message`: message ID #### By UserID **User object, identified by UserID** Identifies an existing subscriber by their Sendmsg UserID. | Field | Type | Required | Description | | --- | --- | --- | --- | | `UserID` | number | yes | UserID from your Sendmsg account. | | `Cellphone` | string | no | Subscriber mobile number. | | `FirstName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `LastName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `userSystemFields` | array | no | Custom account fields to store permanently against the subscriber. | Request: ```json [ { "UserID": 19407, "Cellphone": "0501234567", "userSystemFields": [ { "Key": "Custom Field Name In Sendmsg", "Value": "Value" } ] } ] ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersOnly' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '[ { "UserID": 19407, "Cellphone": "0501234567", "userSystemFields": [ { "Key": "Custom Field Name In Sendmsg", "Value": "Value" } ] } ]' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": 1, "message": 0 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: user count - `data.message`: message ID Notes: - If UserID and EmailAddress are both present and populated, the email wins. - To create a custom field before referencing it, use CreateField. Undocumented at source: - The blueprint also shows a wrapped { users: [...], Message: {...} } body for this endpoint, which contradicts the array body in its own request examples. The array form is documented here because that is what the request examples send. ### Get subscriber details `GET https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetUserDetails` Returns every stored detail for one subscriber. Requires an Authorization header. Query parameters: | Name | Type | Required | Description | | --- | --- | --- | --- | | `userID` | number | yes | ID of the subscriber in your Sendmsg account. | ```bash curl -X GET 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetUserDetails?userID=43998' \ -H 'Authorization: YOUR_TOKEN' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "user": { "Cellphone": "0501234567", "DeleteUser": false, "EmailAddress": "comstar2@comstar2.com", "IsUserSelfRemoved": false, "UndeleteUserIfExists": false, "UserID": 43998, "UserSendFields": [ { "Key": "Custom Field for this message", "Value": "Value" } ], "UserSystemFields": [ { "Key": "Custom Field Name In Sendmsg", "Value": "Value" } ] } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty ### List users by request type `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetSystemUsers` Returns the subscribers who unsubscribed, were deleted, or were flagged with a bad email address. Requires an Authorization header. Request: ```json { "requestType": "SelfRemUsers" } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetSystemUsers' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "requestType": "SelfRemUsers" }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "users": [ { "Cellphone": "0501234567", "DeleteUser": false, "EmailAddress": "comstar2@comstar2.com", "IsUserSelfRemoved": false, "UndeleteUserIfExists": false, "UserID": 43998, "UserSendFields": [], "UserSystemFields": [ { "Key": "Custom Field Name In Sendmsg", "Value": "Value" } ] } ] } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty Notes: - requestType accepts SelfRemUsers (unsubscribed), DelUsers (deleted), or wrongMails (flagged as a wrong address). ### Change a subscriber's send status `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/ChangeUpdateStatus` Changes the send status of one subscriber in your account. Requires an Authorization header. #### By email Request: ```json { "EmailAddress": "comstar@comstar.com", "StatusEmail": "Active" } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/ChangeUpdateStatus' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "EmailAddress": "comstar@comstar.com", "StatusEmail": "Active" }' ``` #### By UserID Request: ```json { "UserID": "1773", "StatusEmail": "Active" } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/ChangeUpdateStatus' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "UserID": "1773", "StatusEmail": "Active" }' ``` Notes: - StatusEmail accepts Active, Inactive, AskedRemoval, or BadEmail. - If the subscriber is already set to AskedRemoval, updating their email status is restricted. Undocumented at source: - The blueprint documents no response for this endpoint. ## Mailing lists Create lists, read their members, and move subscribers in and out. ### Create a mailing list `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/CreateMalingList` Creates a new, empty mailing list in your account. Requires an Authorization header. **New mailing list** | Field | Type | Required | Description | | --- | --- | --- | --- | | `IsNewList` | boolean | yes | Always true. | | `NewListName` | string | yes | Name of the list. | | `NewListDescription` | string | no | Description of the list. | Request: ```json { "IsNewList": true, "NewListName": "my new mailing list", "NewListDescription": "this is the description of the mailing list" } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/CreateMalingList' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "IsNewList": true, "NewListName": "my new mailing list", "NewListDescription": "this is the description of the mailing list" }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [], "mailingLists": [ 172595 ] } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs - `data.mailingLists`: array of mailing list IDs ### List all mailing lists `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetMailingListNames` Returns every mailing list in your account with its ID, name, description and subscriber counts. Takes no body. Requires an Authorization header. ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetMailingListNames' \ -H 'Authorization: YOUR_TOKEN' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "listNames": [ { "ActiveUserCount": 128, "ExistingListID": 172595, "IsNewList": false, "NewListDescription": "List from Another Galaxy", "NewListName": "Andromeda", "UserCount": 140 } ] } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `listNames.ActiveUserCount`: count of active users only - `listNames.ExistingListID`: list ID - `listNames.IsNewList`: new list flag - `listNames.UserCount`: count of all users in the list ### Get a mailing list's subscribers `GET https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetMailingListByID` Returns the subscribers of one mailing list, filtered by type. Requires an Authorization header. Query parameters: | Name | Type | Required | Description | | --- | --- | --- | --- | | `listID` | number | yes | ID of the mailing list in your Sendmsg account. | | `type` | number | yes | Which subscribers to return. 0 = all (deleted, wrong, active, unsubscribed), 1 = deleted, 2 = unsubscribed, 3 = wrong emails, 4 = active. | ```bash curl -X GET 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetMailingListByID?listID=172595&type=4' \ -H 'Authorization: YOUR_TOKEN' ``` Undocumented at source: - The blueprint documents no response for this endpoint. ### Add subscribers to mailing lists `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersToLists` Adds existing subscribers to one or more existing mailing lists. Requires an Authorization header. #### By email **Existing mailing list reference** | Field | Type | Required | Description | | --- | --- | --- | --- | | `ExistingListID` | number | yes | ID of a mailing list already in your account. | Request: ```json { "users": [ { "EmailAddress": "comstar@comstar.com" } ], "mailingLists": [ { "ExistingListID": 5 } ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersToLists' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "users": [ { "EmailAddress": "comstar@comstar.com" } ], "mailingLists": [ { "ExistingListID": 5 } ] }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "mailingLists": [ 5 ] } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs - `data.mailingLists`: array of mailing list IDs #### By UserID **Existing mailing list reference** | Field | Type | Required | Description | | --- | --- | --- | --- | | `ExistingListID` | number | yes | ID of a mailing list already in your account. | Request: ```json { "users": [ { "UserID": 19407 } ], "mailingLists": [ { "ExistingListID": 5 } ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersToLists' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "users": [ { "UserID": 19407 } ], "mailingLists": [ { "ExistingListID": 5 } ] }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 19407 ], "mailingLists": [ 5 ] } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs - `data.mailingLists`: array of mailing list IDs ### Empty mailing lists `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/TruncateMailingLists` Removes every subscriber from the given mailing lists. The body is a plain array of list IDs. Requires an Authorization header. Request: ```json [ 1, 2, 3, 4, 5 ] ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/TruncateMailingLists' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '[ 1, 2, 3, 4, 5 ]' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": null } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty ### Remove subscribers from mailing lists `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/RemoveFromMailingLists/ManyToMany` Removes specific subscribers from specific mailing lists. Subscribers may be identified by UserID, EmailAddress or Cellphone. Requires an Authorization header. #### By UserID Request: ```json { "users": [ { "UserID": "4" }, { "UserID": "3" }, { "UserID": "9" } ], "mailingLists": [ { "ExistingListID": 5 }, { "ExistingListID": 7 }, { "ExistingListID": 9 } ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/RemoveFromMailingLists/ManyToMany' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "users": [ { "UserID": "4" }, { "UserID": "3" }, { "UserID": "9" } ], "mailingLists": [ { "ExistingListID": 5 }, { "ExistingListID": 7 }, { "ExistingListID": 9 } ] }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": null } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty #### By email Request: ```json { "users": [ { "EmailAddress": "comstar@comstar.com" } ], "mailingLists": [ { "ExistingListID": 5 } ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/RemoveFromMailingLists/ManyToMany' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "users": [ { "EmailAddress": "comstar@comstar.com" } ], "mailingLists": [ { "ExistingListID": 5 } ] }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": null } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty #### By cellphone Request: ```json { "users": [ { "Cellphone": "0501234567" } ], "mailingLists": [ { "ExistingListID": 5 } ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/RemoveFromMailingLists/ManyToMany' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "users": [ { "Cellphone": "0501234567" } ], "mailingLists": [ { "ExistingListID": 5 } ] }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": null } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty Notes: - Add only one mailing list per user. Any extra type is dismissed. - Where several identifiers are supplied, the API always prefers UserID and ignores the rest. ## Sending Send email and SMS, either to subscribers you supply inline or to whole mailing lists. Messages can be composed inline, reused from history, or taken from a draft. ### Add subscribers and send an email `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersAndSend` Adds or updates subscribers and sends them an email in a single call. The message may be composed inline, or taken from a past send or a draft. Requires an Authorization header. #### New message **User object, identified by email** Identifies a subscriber by email address. If both UserID and EmailAddress are supplied and populated, the result is based on the email. | Field | Type | Required | Description | | --- | --- | --- | --- | | `EmailAddress` | string | yes | Subscriber email address. | | `Cellphone` | string | no | Subscriber mobile number. | | `FirstName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `LastName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `userSystemFields` | array | no | Custom account fields to store permanently against the subscriber. | **Per-message field values** Values that apply to this message only, rather than being stored on the subscriber. Referenced in message content as [|[yourKey]|]. | Field | Type | Required | Description | | --- | --- | --- | --- | | `userSendFields` | array | no | Field values scoped to this send. Supports simple emoji (UTF-8 only, excluding utf8mb4). | **New email message** | Field | Type | Required | Description | | --- | --- | --- | --- | | `MessageContent` | string | yes | Body of the message. Text in square brackets is treated as a field name and replaced at render time; unmatched keys are removed. | | `MessageSubject` | string | yes | Subject line. | | `MessageInnerName` | string | yes | Name of the message inside your Sendmsg account. | | `SenderEmailAddress` | string | no | From address. Default: comstar@sendmsg.co.il. | | `SenderName` | string | no | Display name shown beside the from address. The blueprint sends this in its worked examples but never lists it in a parameter table, so its exact behaviour is undocumented. | | `MessageBackColor` | string | no | Background colour, as a hex value. Default: #ffffff. The blueprint labels this default both 'Black' and 'White' in different tables. The value itself is #ffffff. | | `MessageDirection` | number | yes | Text direction. RTL = 1, LTR = 2. | | `AddFacebook` | boolean | no | Add a link for sharing the message to Facebook. Default: false. | | `AddForward` | boolean | no | Add a link for forwarding the message. Default: false. | | `AddShowMessage` | boolean | no | Add a link for viewing the message in a browser. Default: false. | Request: ```json { "users": [ { "EmailAddress": "example@comstar.com", "userSendFields": [ { "Key": "companyName", "Value": "comstar" } ] } ], "Message": { "MessageContent": "Your [|[companyName]|] Name", "MessageSubject": "hello world", "MessageInnerName": "inner name", "SenderEmailAddress": "office@comstar.co.il", "SenderName": "comstar", "MessageBackColor": "black", "MessageDirection": 2, "AddFacebook": true, "AddForward": true, "AddShowMessage": true } } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersAndSend' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "users": [ { "EmailAddress": "example@comstar.com", "userSendFields": [ { "Key": "companyName", "Value": "comstar" } ] } ], "Message": { "MessageContent": "Your [|[companyName]|] Name", "MessageSubject": "hello world", "MessageInnerName": "inner name", "SenderEmailAddress": "office@comstar.co.il", "SenderName": "comstar", "MessageBackColor": "black", "MessageDirection": 2, "AddFacebook": true, "AddForward": true, "AddShowMessage": true } }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message #### Past message **User object, identified by email** Identifies a subscriber by email address. If both UserID and EmailAddress are supplied and populated, the result is based on the email. | Field | Type | Required | Description | | --- | --- | --- | --- | | `EmailAddress` | string | yes | Subscriber email address. | | `Cellphone` | string | no | Subscriber mobile number. | | `FirstName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `LastName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `userSystemFields` | array | no | Custom account fields to store permanently against the subscriber. | **Past message** Re-sends a message already in your send history. | Field | Type | Required | Description | | --- | --- | --- | --- | | `MessageID` | number | yes | ID of a message from your history of sent messages. | Request: ```json { "users": [ { "EmailAddress": "comstar@comstar.com" } ], "Message": { "MessageID": 2050763 } } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersAndSend' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "users": [ { "EmailAddress": "comstar@comstar.com" } ], "Message": { "MessageID": 2050763 } }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message #### Draft message **User object, identified by email** Identifies a subscriber by email address. If both UserID and EmailAddress are supplied and populated, the result is based on the email. | Field | Type | Required | Description | | --- | --- | --- | --- | | `EmailAddress` | string | yes | Subscriber email address. | | `Cellphone` | string | no | Subscriber mobile number. | | `FirstName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `LastName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `userSystemFields` | array | no | Custom account fields to store permanently against the subscriber. | **Draft message** Sends a message saved as a draft. | Field | Type | Required | Description | | --- | --- | --- | --- | | `UseDraftID` | number | yes | ID of a message from your drafts. | Request: ```json { "users": [ { "EmailAddress": "comstar@comstar.com" } ], "Message": { "UseDraftID": 2050763 } } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersAndSend' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "users": [ { "EmailAddress": "comstar@comstar.com" } ], "Message": { "UseDraftID": 2050763 } }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message Notes: - Square brackets in MessageContent name a field and are replaced at render time. Unmatched keys are removed. - userSendFields values are referenced as [|[yourKey]|] and apply to this message only. ### Add subscribers and send an SMS `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersAndSendSMS` Adds or updates subscribers and sends them an SMS in a single call. This has its own path, separate from the email send. Requires an Authorization header. #### New message **User object, identified by email** Identifies a subscriber by email address. If both UserID and EmailAddress are supplied and populated, the result is based on the email. | Field | Type | Required | Description | | --- | --- | --- | --- | | `EmailAddress` | string | yes | Subscriber email address. | | `Cellphone` | string | no | Subscriber mobile number. | | `FirstName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `LastName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `userSystemFields` | array | no | Custom account fields to store permanently against the subscriber. | **New SMS message** | Field | Type | Required | Description | | --- | --- | --- | --- | | `MessageContent` | string | yes | Body of the message. | | `SenderPhone` | string | yes | Sender number. Special characters and spaces are stripped. Words longer than 11 characters are trimmed. Letters must be English. | | `MessageInnerName` | string | yes | Name of the message inside your Sendmsg account. | | `MessageSubject` | string | no | Not used for SMS. Default: empty. | | `MessageType` | number | yes | Always 1. | | `TypeSms` | number | yes | 1 for a short SMS, 2 for a long SMS. | Request: ```json { "users": [ { "EmailAddress": "comstar@comstar.com", "Cellphone": "0501234567" } ], "Message": { "MessageContent": "Hello World", "SenderPhone": "0500000000", "MessageInnerName": "inner name", "MessageType": 1, "TypeSms": 1 } } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersAndSendSMS' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "users": [ { "EmailAddress": "comstar@comstar.com", "Cellphone": "0501234567" } ], "Message": { "MessageContent": "Hello World", "SenderPhone": "0500000000", "MessageInnerName": "inner name", "MessageType": 1, "TypeSms": 1 } }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message #### Past message **User object, identified by email** Identifies a subscriber by email address. If both UserID and EmailAddress are supplied and populated, the result is based on the email. | Field | Type | Required | Description | | --- | --- | --- | --- | | `EmailAddress` | string | yes | Subscriber email address. | | `Cellphone` | string | no | Subscriber mobile number. | | `FirstName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `LastName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `userSystemFields` | array | no | Custom account fields to store permanently against the subscriber. | **Past message** Re-sends a message already in your send history. | Field | Type | Required | Description | | --- | --- | --- | --- | | `MessageID` | number | yes | ID of a message from your history of sent messages. | Request: ```json { "users": [ { "Cellphone": "0501234567" } ], "Message": { "MessageID": 2050763 } } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersAndSendSMS' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "users": [ { "Cellphone": "0501234567" } ], "Message": { "MessageID": 2050763 } }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message #### Draft message **User object, identified by email** Identifies a subscriber by email address. If both UserID and EmailAddress are supplied and populated, the result is based on the email. | Field | Type | Required | Description | | --- | --- | --- | --- | | `EmailAddress` | string | yes | Subscriber email address. | | `Cellphone` | string | no | Subscriber mobile number. | | `FirstName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `LastName` | string | no | The system looks for a personal field of this name in your account. If it finds one, the value is written there. | | `userSystemFields` | array | no | Custom account fields to store permanently against the subscriber. | **Draft message** Sends a message saved as a draft. | Field | Type | Required | Description | | --- | --- | --- | --- | | `UseDraftID` | number | yes | ID of a message from your drafts. | Request: ```json { "users": [ { "Cellphone": "0501234567" } ], "Message": { "UseDraftID": 2050763 } } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersAndSendSMS' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "users": [ { "Cellphone": "0501234567" } ], "Message": { "UseDraftID": 2050763 } }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message Notes: - SenderPhone strips special characters and spaces, trims words over 11 characters, and accepts English letters only. ### Send an email to mailing lists `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/SendEmailToMailingLists` Sends a message to every subscriber of the given mailing lists, without adding anyone. Requires an Authorization header. #### New message **New email message** | Field | Type | Required | Description | | --- | --- | --- | --- | | `MessageContent` | string | yes | Body of the message. Text in square brackets is treated as a field name and replaced at render time; unmatched keys are removed. | | `MessageSubject` | string | yes | Subject line. | | `MessageInnerName` | string | yes | Name of the message inside your Sendmsg account. | | `SenderEmailAddress` | string | no | From address. Default: comstar@sendmsg.co.il. | | `SenderName` | string | no | Display name shown beside the from address. The blueprint sends this in its worked examples but never lists it in a parameter table, so its exact behaviour is undocumented. | | `MessageBackColor` | string | no | Background colour, as a hex value. Default: #ffffff. The blueprint labels this default both 'Black' and 'White' in different tables. The value itself is #ffffff. | | `MessageDirection` | number | yes | Text direction. RTL = 1, LTR = 2. | | `AddFacebook` | boolean | no | Add a link for sharing the message to Facebook. Default: false. | | `AddForward` | boolean | no | Add a link for forwarding the message. Default: false. | | `AddShowMessage` | boolean | no | Add a link for viewing the message in a browser. Default: false. | Request: ```json { "Message": { "MessageContent": "this is the content of the message", "MessageSubject": "hello world", "MessageInnerName": "inner name", "SenderEmailAddress": "office@comstar.co.il", "SenderName": "comstar", "MessageBackColor": "black", "MessageDirection": 2, "AddFacebook": true, "AddForward": true, "AddShowMessage": true }, "MalingListIDs": [ 172595 ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/SendEmailToMailingLists' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "Message": { "MessageContent": "this is the content of the message", "MessageSubject": "hello world", "MessageInnerName": "inner name", "SenderEmailAddress": "office@comstar.co.il", "SenderName": "comstar", "MessageBackColor": "black", "MessageDirection": 2, "AddFacebook": true, "AddForward": true, "AddShowMessage": true }, "MalingListIDs": [ 172595 ] }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message #### Past message **Past message** Re-sends a message already in your send history. | Field | Type | Required | Description | | --- | --- | --- | --- | | `MessageID` | number | yes | ID of a message from your history of sent messages. | Request: ```json { "Message": { "MessageID": 2050763 }, "MalingListIDs": [ 172595 ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/SendEmailToMailingLists' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "Message": { "MessageID": 2050763 }, "MalingListIDs": [ 172595 ] }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message #### Draft message **Draft message** Sends a message saved as a draft. | Field | Type | Required | Description | | --- | --- | --- | --- | | `UseDraftID` | number | yes | ID of a message from your drafts. | Request: ```json { "Message": { "UseDraftID": 2050763 }, "MalingListIDs": [ 172595 ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/SendEmailToMailingLists' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "Message": { "UseDraftID": 2050763 }, "MalingListIDs": [ 172595 ] }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message Notes: - MalingListIDs is an array of mailing list IDs. The spelling is the API's own. ### Send an SMS to mailing lists `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/SendSmsToMailingLists` Sends an SMS to every subscriber of the given mailing lists. Unlike the other send pairs, this has its own path rather than sharing the email one. Requires an Authorization header. #### New message **New SMS message** | Field | Type | Required | Description | | --- | --- | --- | --- | | `MessageContent` | string | yes | Body of the message. | | `SenderPhone` | string | yes | Sender number. Special characters and spaces are stripped. Words longer than 11 characters are trimmed. Letters must be English. | | `MessageInnerName` | string | yes | Name of the message inside your Sendmsg account. | | `MessageSubject` | string | no | Not used for SMS. Default: empty. | | `MessageType` | number | yes | Always 1. | | `TypeSms` | number | yes | 1 for a short SMS, 2 for a long SMS. | Request: ```json { "Message": { "MessageContent": "Hello World", "SenderPhone": "0500000000", "MessageInnerName": "inner name", "MessageType": 1, "TypeSms": 1 }, "MalingListIDs": [ 172595 ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/SendSmsToMailingLists' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "Message": { "MessageContent": "Hello World", "SenderPhone": "0500000000", "MessageInnerName": "inner name", "MessageType": 1, "TypeSms": 1 }, "MalingListIDs": [ 172595 ] }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message #### Past message **Past message** Re-sends a message already in your send history. | Field | Type | Required | Description | | --- | --- | --- | --- | | `MessageID` | number | yes | ID of a message from your history of sent messages. | Request: ```json { "Message": { "MessageID": 2050763 }, "MalingListIDs": [ 172595 ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/SendSmsToMailingLists' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "Message": { "MessageID": 2050763 }, "MalingListIDs": [ 172595 ] }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message #### Draft message **Draft message** Sends a message saved as a draft. | Field | Type | Required | Description | | --- | --- | --- | --- | | `UseDraftID` | number | yes | ID of a message from your drafts. | Request: ```json { "Message": { "UseDraftID": 2050763 }, "MalingListIDs": [ 172595 ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/SendSmsToMailingLists' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "Message": { "UseDraftID": 2050763 }, "MalingListIDs": [ 172595 ] }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "data": { "users": [ 43998 ], "message": 2050763 } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `data.users`: array of user IDs the message went to - `data.message`: ID of the message ### Create a message `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/CreateMessage` Creates a message in your account without sending it, and returns its ID. Supports scheduling a future send. Requires an Authorization header. **New email message** | Field | Type | Required | Description | | --- | --- | --- | --- | | `MessageContent` | string | yes | Body of the message. Text in square brackets is treated as a field name and replaced at render time; unmatched keys are removed. | | `MessageSubject` | string | yes | Subject line. | | `MessageInnerName` | string | yes | Name of the message inside your Sendmsg account. | | `SenderEmailAddress` | string | no | From address. Default: comstar@sendmsg.co.il. | | `SenderName` | string | no | Display name shown beside the from address. The blueprint sends this in its worked examples but never lists it in a parameter table, so its exact behaviour is undocumented. | | `MessageBackColor` | string | no | Background colour, as a hex value. Default: #ffffff. The blueprint labels this default both 'Black' and 'White' in different tables. The value itself is #ffffff. | | `MessageDirection` | number | yes | Text direction. RTL = 1, LTR = 2. | | `AddFacebook` | boolean | no | Add a link for sharing the message to Facebook. Default: false. | | `AddForward` | boolean | no | Add a link for forwarding the message. Default: false. | | `AddShowMessage` | boolean | no | Add a link for viewing the message in a browser. Default: false. | Request: ```json { "MessageContent": "the content of the message", "MessageSubject": "subject", "MessageInnerName": "inner name", "SenderEmailAddress": "comstar@comstar.co.il", "MessageBackColor": "black", "MessageDirection": 1, "AddFacebook": true, "AddForward": true, "AddShowMessage": true } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/CreateMessage' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "MessageContent": "the content of the message", "MessageSubject": "subject", "MessageInnerName": "inner name", "SenderEmailAddress": "comstar@comstar.co.il", "MessageBackColor": "black", "MessageDirection": 1, "AddFacebook": true, "AddForward": true, "AddShowMessage": true }' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "newMessageID": 2052217 } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `newMessageID`: ID of the message just created Notes: - PostponeSendTime schedules the send for a future date, for example 2030-02-25. It defaults to sending now. ### Delete a past message `GET https://gconvertrest.sendmsg.co.il/api/Sendmsg/DelMessage` Deletes a message from your send history. Requires an Authorization header. Query parameters: | Name | Type | Required | Description | | --- | --- | --- | --- | | `MsgID` | number | yes | ID of the past message in your Sendmsg account. | ```bash curl -X GET 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/DelMessage?MsgID=2052217' \ -H 'Authorization: YOUR_TOKEN' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "newMessageID": 2052217 } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `newMessageID`: ID of the deleted message ## Fields Read and create the custom fields you can reference in message content. ### List all fields `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetAllFields` Returns every field in your account as key/value pairs. Built-in fields are keyed by name; custom fields are keyed by their numeric ID. Requires an Authorization header. ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetAllFields' \ -H 'Authorization: YOUR_TOKEN' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "AllFields": { "2": "שם משפחה", "eMail": "email", "cellPhone": "cell Phone" } } ``` - `success`: true or false - `res`: true or false - `result.ResultID`: status code - `result.ResultMessage`: Sendmsg result message - `result.Tin`: deprecated, always empty - `AllFields`: custom fields appear as a key/value pair keyed by field ID ### Create a field `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/CreateField` Creates a new custom field in your account. Requires an Authorization header. #### Text field Request: ```json { "FieldUserName": "Field Name", "FieldUserType": 1 } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/CreateField' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "FieldUserName": "Field Name", "FieldUserType": 1 }' ``` Response: ```json { "FieldName": "Field Name", "FieldType": 1 } ``` #### Dropdown field Request: ```json { "FieldUserName": "Field Name", "FieldUserType": 3, "OptionToDDR": [ "item 1", "item 2", "item 3" ] } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/CreateField' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "FieldUserName": "Field Name", "FieldUserType": 3, "OptionToDDR": [ "item 1", "item 2", "item 3" ] }' ``` Response: ```json { "FieldName": "Field Name", "FieldType": 3 } ``` Notes: - FieldUserType accepts 1 (text), 2 (yes/no), 3 (dropdown), 4 (date), 7 (long text) or 8 (number). - A dropdown field requires OptionToDDR listing its options. Undocumented at source: - The source table places the 'OptionToDDR is required' note on the Number row rather than the Dropdown row, which contradicts the worked example beneath it. The note belongs to Dropdown. ## SMS sender verification Verify ownership of a sender number before sending from it, and check your SMS balance. ### Request a verification code `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/VerificationOfSenderNumberBySMS` Sends a verification code by SMS to the sender number you want to use. Add the number in panel.sendmsg.co.il before calling this. Requires an Authorization header. Request: ```json { "SenderNumber": "0501231234" } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/VerificationOfSenderNumberBySMS' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "SenderNumber": "0501231234" }' ``` Undocumented at source: - The blueprint documents no response for this endpoint. ### Confirm a verification code `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/AuthenticateOfSenderNumberBySMS` Completes verification by submitting the code that was sent. Requires an Authorization header. Request: ```json { "SenderNumber": "0501231234", "Code": "111111" } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/AuthenticateOfSenderNumberBySMS' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "SenderNumber": "0501231234", "Code": "111111" }' ``` Undocumented at source: - The blueprint documents no response for this endpoint. ### Check whether a number is verified `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/IsAllowedOfSenderNumberBySMS` Reports whether a sender number has completed verification. Requires an Authorization header. Request: ```json { "SenderNumber": "0501231234" } ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/IsAllowedOfSenderNumberBySMS' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "SenderNumber": "0501231234" }' ``` Undocumented at source: - The blueprint documents no response for this endpoint. ### Check SMS balance `GET https://gconvertrest.sendmsg.co.il/api/Sendmsg/CheckingSmsBalances` Returns your remaining balance of short and long SMS messages. Requires an Authorization header. ```bash curl -X GET 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/CheckingSmsBalances' \ -H 'Authorization: YOUR_TOKEN' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "SMS balances:\nShort amount = {num}\nLong amount = {num}", "Tin": "" }, "data": null } ``` Notes: - The counts arrive inside ResultMessage as text rather than as separate fields. ## Reports Message statistics and subscriber growth over time. ### Get message statistics `GET https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetMsgFullStatistics` Returns the full statistics for one past message. Requires an Authorization header. Query parameters: | Name | Type | Required | Description | | --- | --- | --- | --- | | `messageID` | number | yes | ID of the past message in your Sendmsg account. | ```bash curl -X GET 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetMsgFullStatistics?messageID=2050763' \ -H 'Authorization: YOUR_TOKEN' ``` Undocumented at source: - The blueprint's response body for this endpoint is empty. The response shape is undocumented at source and has not been invented here. ### Count subscribers by timeline `POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetNumberOfJoinersToSystem` Returns how many subscribers joined within each of the date ranges you supply. The body is an array of ranges. Requires an Authorization header. Request: ```json [ { "From": "2023-07-22 18:03:33", "Until": "2023-08-11 18:03:33" }, { "From": "2023-07-02 18:03:34", "Until": "2023-07-22 18:03:34" } ] ``` ```bash curl -X POST 'https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetNumberOfJoinersToSystem' \ -H 'Authorization: YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '[ { "From": "2023-07-22 18:03:33", "Until": "2023-08-11 18:03:33" }, { "From": "2023-07-02 18:03:34", "Until": "2023-07-22 18:03:34" } ]' ``` Response: ```json { "success": true, "res": true, "result": { "ResultID": 200, "ResultMessage": "Passed OK", "Tin": "" }, "SendmsgJoinersDate": [ { "From": "2023-07-22T18:03:33", "Sum": 2, "Until": "2023-08-11T18:03:33" }, { "From": "2023-07-02T18:03:34", "Sum": 1, "Until": "2023-07-22T18:03:34" } ] } ``` Notes: - Request dates use a space separator; response dates come back in ISO form with a T.