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
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Eros.Subtle.Dvaravartman.Common.Model.ServiceModel;
using Eros.Subtle.Dvaravartman.Common.Model;
using Eros.Saguna.Common.Library.ServiceModels;

namespace Eros.Saguna.Common.Library.ServiceModels
{
    public partial class BaseLicenseeEnforcedServiceModel
    {
        public virtual Guid LicenseeId { get; set; }
    }

}

namespace Eros.Subtle.Dvaravartman.Common.Model
{
    public partial class CommResponse
    {
        public virtual Guid CommId { get; set; }
        public virtual string Reference { get; set; }
        public virtual bool Status { get; set; }
        public virtual string Message { get; set; }
    }

    public partial class SMSContact
    {
        public virtual string Name { get; set; }
        public virtual string PhoneNumber { get; set; }
        public virtual Guid ContactId { get; set; }
    }

    public partial class SMSModel
        : BaseLicenseeEnforcedServiceModel
    {
        public virtual SMSContact From { get; set; }
        public virtual List<SMSContact> To { get; set; }
        public virtual string MessageBody { get; set; }
        public virtual bool ReplyIsAllowed { get; set; }
        public virtual bool ReplyIsRequired { get; set; }
        public virtual string Notes { get; set; }
        public virtual Guid LinkedObjectId { get; set; }
        public virtual Guid SuiteId { get; set; }
    }

}

namespace Eros.Subtle.Dvaravartman.Common.Model.ServiceModel
{
    ///<summary>
    ///Saves the specified SMS and sends it for background processing
    ///</summary>
    [Api(Description="Saves the specified SMS and sends it for background processing")]
    public partial class SMSSend
    {
        public virtual SMSModel SMSModel { get; set; }
        public virtual bool CreateCommunicationReferencesImmediately { get; set; }
    }

}

C# SMSSend DTOs

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

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<SMSSend xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Dvaravartman.Common.Model.ServiceModel">
  <CreateCommunicationReferencesImmediately>false</CreateCommunicationReferencesImmediately>
  <SMSModel xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Subtle.Dvaravartman.Common.Model">
    <LicenseeId xmlns="http://schemas.datacontract.org/2004/07/Eros.Saguna.Common.Library.ServiceModels">00000000-0000-0000-0000-000000000000</LicenseeId>
    <d2p1:From>
      <d2p1:ContactId>00000000-0000-0000-0000-000000000000</d2p1:ContactId>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:PhoneNumber>String</d2p1:PhoneNumber>
    </d2p1:From>
    <d2p1:LinkedObjectId>00000000-0000-0000-0000-000000000000</d2p1:LinkedObjectId>
    <d2p1:MessageBody>String</d2p1:MessageBody>
    <d2p1:Notes>String</d2p1:Notes>
    <d2p1:ReplyIsAllowed>false</d2p1:ReplyIsAllowed>
    <d2p1:ReplyIsRequired>false</d2p1:ReplyIsRequired>
    <d2p1:SuiteId>00000000-0000-0000-0000-000000000000</d2p1:SuiteId>
    <d2p1:To>
      <d2p1:SMSContact>
        <d2p1:ContactId>00000000-0000-0000-0000-000000000000</d2p1:ContactId>
        <d2p1:Name>String</d2p1:Name>
        <d2p1:PhoneNumber>String</d2p1:PhoneNumber>
      </d2p1:SMSContact>
    </d2p1:To>
  </SMSModel>
</SMSSend>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CommResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Dvaravartman.Common.Model">
  <CommId>00000000-0000-0000-0000-000000000000</CommId>
  <Message>String</Message>
  <Reference>String</Reference>
  <Status>false</Status>
</CommResponse>