SMSGateway

<back to all web services

SendSmsRequest

The following routes are available for this service:
POST/sendsms

export class ResultResponseDto
{
    public code: string;
    public message: string;
    public id: string;

    public constructor(init?: Partial<ResultResponseDto>) { (Object as any).assign(this, init); }
}

export class ResponseSmsDto
{
    public result: ResultResponseDto;

    public constructor(init?: Partial<ResponseSmsDto>) { (Object as any).assign(this, init); }
}

export class SecurityRequestDto
{
    public partner_id: string;
    public time: string;
    public hash: string;

    public constructor(init?: Partial<SecurityRequestDto>) { (Object as any).assign(this, init); }
}

export class SmsBodyDto
{
    public service_id: string;
    public number: string;
    public carrier: string;
    public message: string;
    public encode: number;
    public url: string;
    public test: number;
    public mask: string;
    public xtraparams: { [index: string]: string; };

    public constructor(init?: Partial<SmsBodyDto>) { (Object as any).assign(this, init); }
}

export class SendSmsRequest
{
    public security: SecurityRequestDto;
    public notify: SmsBodyDto;

    public constructor(init?: Partial<SendSmsRequest>) { (Object as any).assign(this, init); }
}

TypeScript 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"}}