Send SMS API (Version 2)
This method is used to send the text message that is defined in a specific campaign SMS to a customer's mobile device. The method returns an identifier (messageSid) that can be used to track the message.
Important
This implementation of the API (version 2) does not support the reporting functionality that is required for some APIs, such as the Deflected Call Report API. To work with reporting APIs, use version 3 of this API.
Invoking the Method Using REST
URL Syntax and Example
http(s)://[host:port/internalPath]/interact/version/[version]/account/ [accountID]/resources/campaign/sms/{CampaignId}
https://gointeract.io/interact/version/2/account/12345678/resources/campaign/sms/campaign1
Specific URI Fields
URI Field | Data Type | Description |
---|---|---|
campaignId | string | Identifier for the relevant campaign. |
HTTP Method
POST
HTTP Headers
Tenant-Id: <account> Application-Key: <Public API Service application key> Environment-Name: <environment-name>
HTTP Body
{ "from":"+12121234567", "callerId":"+972 54 4696388", "additionalParams" : "var1=value1&var2=value" }
URI Field | Data Type | Description |
---|---|---|
from | string | The number to be associated with sending the SMS. This field is optional. |
callerId | string | The customer's phone number. |
additionalParams | Extra parameters to be passed in the URL, as required. (This field is optional.) |
Sample Request
POST /interact/version/2/account/12345678/resources/campaign/sms/{CampaignId} HTTP/1.1 Host: localhost:8080 Tenant-Id: {tenantId} Application-Key: 53736e07e4b05772e6475c2d Content-Type: application/json Cache-Control: no-cache { "callerId":"+972 54 4696388", "additionalParams" : "var1=value1&var2=value" }
Expected Responses
Response Scenario | Status Code/Header | Example Message |
---|---|---|
Success | 200 | Placed campaign {<campaign id>} in SMS queue messageSid: SM3ae49ea884e3494e903b13b2681aba3e |
Invalid body parameter(s) | 400 | missing or invalid parameter <parameter> |
Invalid security headers | 401 "Unauthenticated-Reason" Header | { "code":"0x7000000", "message": "Request is unauthorized, missing or wrong credentials", "moreInfoUrl":"http://support.uniphore.com", } |
Campaign does not exist | 404 | Campaign <campaign id> was not found |
Telephony provider settings are expired | 500 | Your Telephony provider is not defined, please contact Uniphore Support and read the following +link+ |
Telephony provider settings are not configured | 500 | Your Telephony provider is not defined, please contact Uniphore Support and read the following +link+ |
General error (internal error from the X‑Platform Server) | 500 | exception |
Invoking the Method Using SOAP
WSDL URL
https://gointeract.io/interact/version/2/agent/soap/agent.wsdl
Headers
Tenant-Id: <account> Application-Key: <Public API Service application key> Environment-Name: <environment-name>
Input Parameters
Parameter | Type | Description |
---|---|---|
campaignId | string | An identifier for the relevant campaign. |
additionalParams | string | Optional extra parameters to be passed, as required. |
callerId | string | The customer's phone number. |
from | string | The number to be associated with sending the SMS. This parameter is optional. |
sendFromMasterAccount | boolean | Indicates whether the campaign is sent from the number associated with the System Account (and not from the number of your tenant account). The default value is false. |
Sample Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://com/jacada/interact/agent/soap"> <soapenv:Header/> <soapenv:Body> <soap:CampaignSMSRequest> <soap:campaignId>camp 1</soap:campaignId> <!--Optional:--> <soap:additionalParams>Variable1=Value1</soap:additionalParams> <soap:callerId>+972548120901</soap:callerId> <!--Optional:--> <soap:from></soap:from> <!--Optional:--> <soap:sendFromMasterAccount>false</soap:sendFromMasterAccount> </soap:CampaignSMSRequest> </soapenv:Body> </soapenv:Envelope>
Expected Responses
Response Scenario | Example Message |
---|---|
Success | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:CampaignSMSResponse xmlns:ns2="http://com/jacada/interact/agent/soap"> <ns2:message>message: Campaign camp automation was send to queue messageSid: SM625ccff7281943868a579ba00330cf20</ns2:message> </ns2:CampaignSMSResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Invalid body parameter(s) | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:GetInteractionUniqueIdResponse xmlns:ns2="http://com/jacada/interact/agent/soap"> <ns2:uniqueId>missing or invalid parameter <parameter></ns2:uniqueId> </ns2:GetInteractionUniqueIdResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Invalid security headers | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>0x7000000</faultcode> <faultstring>Request is unauthorized, missing or wrong credentials</faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Campaign does not exist | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:GetInteractionUniqueIdResponse xmlns:ns2="http://com/jacada/interact/agent/soap"> <ns2:uniqueId>Campaign <campaign id> was not found</ns2:uniqueId> </ns2:GetInteractionUniqueIdResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Telephony provider settings are expired | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:GetInteractionUniqueIdResponse xmlns:ns2="http://com/jacada/interact/agent/soap"> <ns2:uniqueId>Your Telephony provider is not defined, please contact Uniphore Support and read the following +link+</ns2:uniqueId> </ns2:GetInteractionUniqueIdResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Telephony provider settings are not configured | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:GetInteractionUniqueIdResponse xmlns:ns2="http://com/jacada/interact/agent/soap"> <ns2:uniqueId>Your Telephony provider is not defined, please contact Uniphore Support and read the following +link+</ns2:uniqueId> </ns2:GetInteractionUniqueIdResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
General error (internal error from the X‑Platform Server) | exception (in XML format) |