Skip to main content

Uniphore Customer Portal

Send SMS API (Version 3)

This method is used to send the text message that is defined in a specific campaign SMS to a customer's mobile device, as well as perform updates to other APIs, such as the Deflected Call Report API. The method returns an identifier (messageSid) that can be used to track the message.

Usage with Deflected Call Report API

This implementation (version 3) supports functionality required by reporting APIs such as the Deflected Call Report API. This API uses the token jpToken (passed in the HTML body) in order to uniquely identify calls.

When it is called, this API will set the variable smsSent to True for subsequent use in aggregation reporting.

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/3/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", "jpToken" : "Aejhib7", "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

Customer phone number

jpToken

string

Unique token returned from generateToken API

additionalParams

Extra parameters to be passed in the URL, as required. (This field is optional.)

Sample Request

POST /interact/version/3/account/12345678/resources/campaign/sms/{CampaignId}/callerid/{CallerId} HTTP/1.1
Host: localhost:8080
Tenant-Id: {tenantId}
Application-Key: 53736e07e4b05772e6475c2d
Content-Type: application/json
Cache-Control: no-cache

{ "callerId" : "+972 54 4696388", "jpToken" : "Aejhib7", "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",

}

Outdated campaign/interaction session

403

Token expired

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>
   <!--Optional:-->
   <soap:jpToken>Aejhib7</soap:jpToken>
 </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 <campaign id> was sent 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)