| POST | /api/sendmessage | ||
|---|---|---|---|
| POST | /api/sendmessage/immediate | ||
| POST | /api/send | ||
| POST | /api/sms/send | ||
| POST | /api/send/immediate | ||
| POST | /api/sms/send/immediate |
export class CommResponse
{
public CommId: string;
public Reference: string;
public Status: boolean;
public Message: string;
public constructor(init?: Partial<CommResponse>) { (Object as any).assign(this, init); }
}
export class BaseLicenseeEnforcedServiceModel
{
public LicenseeId: string;
public constructor(init?: Partial<BaseLicenseeEnforcedServiceModel>) { (Object as any).assign(this, init); }
}
export class SMSContact
{
public Name: string;
public PhoneNumber: string;
public ContactId: string;
public constructor(init?: Partial<SMSContact>) { (Object as any).assign(this, init); }
}
export class SMSModel extends BaseLicenseeEnforcedServiceModel
{
public From: SMSContact;
public To: SMSContact[];
public MessageBody: string;
public ReplyIsAllowed: boolean;
public ReplyIsRequired: boolean;
public Notes: string;
public LinkedObjectId: string;
public SuiteId: string;
public constructor(init?: Partial<SMSModel>) { super(init); (Object as any).assign(this, init); }
}
/** @description Saves the specified SMS and sends it for background processing */
// @Api(Description="Saves the specified SMS and sends it for background processing")
export class SMSSend
{
public SMSModel: SMSModel;
public CreateCommunicationReferencesImmediately: boolean;
public constructor(init?: Partial<SMSSend>) { (Object as any).assign(this, init); }
}
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 /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
}