SMSGateway

<back to all web services

SendSmsRequest

The following routes are available for this service:
POST/sendsms
namespace SMSGateway.ServiceModel.Requests

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type ResultResponseDto() = 
        member val code:String = null with get,set
        member val message:String = null with get,set
        member val id:String = null with get,set

    [<AllowNullLiteral>]
    type ResponseSmsDto() = 
        member val result:ResultResponseDto = null with get,set

    [<AllowNullLiteral>]
    type SecurityRequestDto() = 
        member val partner_id:String = null with get,set
        member val time:String = null with get,set
        member val hash:String = null with get,set

    [<AllowNullLiteral>]
    type SmsBodyDto() = 
        member val service_id:String = null with get,set
        member val number:String = null with get,set
        member val carrier:String = null with get,set
        member val message:String = null with get,set
        member val encode:Int32 = new Int32() with get,set
        member val url:String = null with get,set
        member val test:Int32 = new Int32() with get,set
        member val mask:String = null with get,set
        member val xtraparams:Dictionary<String, String> = new Dictionary<String, String>() with get,set

    [<AllowNullLiteral>]
    type SendSmsRequest() = 
        member val security:SecurityRequestDto = null with get,set
        member val notify:SmsBodyDto = null with get,set

F# SendSmsRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /sendsms HTTP/1.1 
Host: 67.208.218.153 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"notify":{"carrier":"String","encode":0,"mask":"String","message":"String","number":"String","service_id":"String","test":0,"url":"String","xtraparams":[{"Key":"String","Value":"String"}]},"security":{"hash":"String","partner_id":"String","time":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"result":{"code":"String","id":"String","message":"String"}}