SMS Gateway API

<back to all web services

SMSSend

Saves the specified SMS and sends it for background processing

Requires Authentication
The following routes are available for this service:
POST/api/sendmessage
POST/api/sendmessage/immediate
POST/api/send
POST/api/sms/send
POST/api/send/immediate
POST/api/sms/send/immediate
"use strict";
export class CommResponse {
    /** @param {{CommId?:string,Reference?:string,Status?:boolean,Message?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    CommId;
    /** @type {string} */
    Reference;
    /** @type {boolean} */
    Status;
    /** @type {string} */
    Message;
}
export class BaseLicenseeEnforcedServiceModel {
    /** @param {{LicenseeId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    LicenseeId;
}
export class SMSContact {
    /** @param {{Name?:string,PhoneNumber?:string,ContactId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Name;
    /** @type {string} */
    PhoneNumber;
    /** @type {string} */
    ContactId;
}
export class SMSModel extends BaseLicenseeEnforcedServiceModel {
    /** @param {{From?:SMSContact,To?:SMSContact[],MessageBody?:string,ReplyIsAllowed?:boolean,ReplyIsRequired?:boolean,Notes?:string,LinkedObjectId?:string,SuiteId?:string,LicenseeId?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {SMSContact} */
    From;
    /** @type {SMSContact[]} */
    To;
    /** @type {string} */
    MessageBody;
    /** @type {boolean} */
    ReplyIsAllowed;
    /** @type {boolean} */
    ReplyIsRequired;
    /** @type {string} */
    Notes;
    /** @type {string} */
    LinkedObjectId;
    /** @type {string} */
    SuiteId;
}
export class SMSSend {
    /** @param {{SMSModel?:SMSModel,CreateCommunicationReferencesImmediately?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {SMSModel} */
    SMSModel;
    /** @type {boolean} */
    CreateCommunicationReferencesImmediately;
}

JavaScript SMSSend DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/sendmessage HTTP/1.1 
Host: production-eros-gateway-api-sms-wa.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	SMSModel: 
	{
		From: 
		{
			Name: String,
			PhoneNumber: String,
			ContactId: 00000000000000000000000000000000
		},
		To: 
		[
			{
				Name: String,
				PhoneNumber: String,
				ContactId: 00000000000000000000000000000000
			}
		],
		MessageBody: String,
		ReplyIsAllowed: False,
		ReplyIsRequired: False,
		Notes: String,
		LinkedObjectId: 00000000000000000000000000000000,
		SuiteId: 00000000000000000000000000000000,
		LicenseeId: 00000000000000000000000000000000
	},
	CreateCommunicationReferencesImmediately: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	CommId: 00000000000000000000000000000000,
	Reference: String,
	Status: False,
	Message: String
}