| Requires any of the roles: | Client, Admin, Partner |
| POST | /communication/message/sms | Sends an SMS to phone numbers provided. |
|---|
export class SmsMessage
{
public channel: string;
public to: string;
public content: string;
public clientMessageId: string;
public constructor(init?: Partial<SmsMessage>) { (Object as any).assign(this, init); }
}
export class SendSmsRequest
{
/** @description Messages to be Sent */
// @ApiMember(Description="Messages to be Sent", IsRequired=true)
public Messages: SmsMessage[] = [];
public constructor(init?: Partial<SendSmsRequest>) { (Object as any).assign(this, init); }
}
export class GrandcomMessage
{
public channel: string;
public to: string;
public content: string;
public clientMessageId: string;
public constructor(init?: Partial<GrandcomMessage>) { (Object as any).assign(this, init); }
}
export class GrandcomResponseMsg
{
public apiMessageId: string;
public accepted: boolean;
public to: string;
public error: string;
public hasError: boolean;
public msg: GrandcomMessage;
public constructor(init?: Partial<GrandcomResponseMsg>) { (Object as any).assign(this, init); }
}
export class GrandcomMsgResponse
{
public messages: GrandcomResponseMsg[];
public error: string;
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<GrandcomMsgResponse>) { (Object as any).assign(this, init); }
}
export class ClickatellMessage
{
public channel: string;
public to: string;
public content: string;
public clientMessageId: string;
public constructor(init?: Partial<ClickatellMessage>) { (Object as any).assign(this, init); }
}
export class ClickatellResponsesMsg
{
public apiMessageId: string;
public accepted: boolean;
public to: string;
public error: string;
public msg: ClickatellMessage;
public constructor(init?: Partial<ClickatellResponsesMsg>) { (Object as any).assign(this, init); }
}
export class ClickatellMessageResponse
{
public messages: ClickatellResponsesMsg[];
public error: string;
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<ClickatellMessageResponse>) { (Object as any).assign(this, init); }
}
export class SMPPMessage
{
public channel: string;
public to: string;
public content: string;
public clientMessageId: string;
public constructor(init?: Partial<SMPPMessage>) { (Object as any).assign(this, init); }
}
export class SMPPResponseMsg
{
public apiMessageId: string;
public accepted: boolean;
public to: string;
public error: string;
public msg: SMPPMessage;
public constructor(init?: Partial<SMPPResponseMsg>) { (Object as any).assign(this, init); }
}
export class SMPPMsgResponse
{
public messages: SMPPResponseMsg[];
public error: string;
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<SMPPMsgResponse>) { (Object as any).assign(this, init); }
}
export class SmsMsgResponse
{
public grandcomMsgResponse: GrandcomMsgResponse;
public clickatellMsgResponse: ClickatellMessageResponse;
public SMPPMsgResponse: SMPPMsgResponse;
public error: string;
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<SmsMsgResponse>) { (Object as any).assign(this, init); }
}
TypeScript SendSmsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /communication/message/sms HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Messages:
[
{
channel: String,
to: String,
content: String,
clientMessageId: String
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
grandcomMsgResponse:
{
messages:
[
{
apiMessageId: String,
accepted: False,
to: String,
error: String,
hasError: False,
msg:
{
channel: String,
to: String,
content: String,
clientMessageId: String
}
}
],
error: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
},
clickatellMsgResponse:
{
messages:
[
{
apiMessageId: String,
accepted: False,
to: String,
error: String,
msg:
{
channel: String,
to: String,
content: String,
clientMessageId: String
}
}
],
error: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
},
SMPPMsgResponse:
{
messages:
[
{
apiMessageId: String,
accepted: False,
to: String,
error: String,
msg:
{
channel: String,
to: String,
content: String,
clientMessageId: String
}
}
],
error: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
},
error: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}