' API SMS MENSAGENS | MANUAL DO DESENVOLVEDOR

LOGO SMS MENSAGENS



API Endpoint

HTTP URL https://login.smsmensagens.com/smsAPI
HTTP Method POST or GET

My API Credentails

API Key *********************************
API Token ****************



Sending SMS

Sample Request


 https://login.smsmensagens.com/smsAPI?sendsms&apikey=Your_API_KEY&apitoken=YOUR_API_TOKEN&type=sms&from=SENDERID&to=123456&text=My+first+text&scheduledate=2018-08-20 12:36:13&route=0
 

Parameters

  • apikey: You unique API Key (required)

  • apitoken: You unique API Token (required)

  • type: Message Type Eg. sms, whatsapp, voice, unicode, flash, mms (default is sms) (required)

  • from: Your Sender ID (required)

  • to: Destination Number (country code) (required)

  • text: Your message text (url encoded) (required for sms, unicode, flash)

  • file: Voice file URL (for voice message) or Multimedia file URL (for mms or whatsapp message) (optional)

  • scheduledate: Date and Time to send message (YYYY-MM-DD HH:mm:ss) (optional)

  • duration: Duration of your voice message in seconds (required for voice)

  • route: ID of gateway/route to use for the message. Set to 0 to use system default routing rules (optional)


  • Sample Success Response (JSON)

        
        
    {                         
    	"request": "sendsms",                         
    	"status": "queued",                         
    	"group_id": "1234",                         
    	"date": "2018-08-20 12:36:13"  
                          
    }
    
            



    Sample Error Response (JSON)

        
    {                         
    	"request": "sendsms",                         
    	"status": "error",                         
    	"message": "Sender ID not allowed"                     
    }                       
    
            



    Check SMS Status

    Sample Request

    
     https://login.smsmensagens.com/smsAPI&groupstatus&apikey=Your_API_KEY&apitoken=YOUR_API_TOKEN&groupid=1234
     

    Parameters

  • apikey: You unique API Key (required)

  • apitoken: You unique API Token (required)

  • groupid: The group_id returned by sendsms request (required)


  • Sample Success Response (JSON)

        {                         
    	"request": "groupstatus",                        
    	"status": "success",                         
    	"group_id": "1234",                         
    	"group_status": "sent",                         
    	"recipients": [                             
    		{                                 
    			"id": "21",                                 
    			"to": "231235433",                                
    			"status": "failed"                             
    		},                             
    		{                                 
    			"id": "22",                                 
    			"to": "4471235433",                                 
    			"status": "sent"                             
    		},                             
    		{                                 
    			"id": "25",                                 
    			"to": "1871235433",                                 
    			"status": "queued"   
    		}   
    	],                        
    	"date": "2018-08-20 12:36:13"                     
    }                        



    Sample Error Response (JSON)

                   
    {                         
    	"request": "groupstatus",                         
    	"status": "error",                         
    	"message": "Error message",                     
    }                        



    Read SMS Inbox

    Sample Request

    
     https://login.smsmensagens.com/smsAPI?getinbox&apikey=Your_API_KEY&apitoken=YOUR_API_TOKEN&list=unread
     

    Parameters

  • apikey: You unique API Key (required)

  • apitoken: You unique API Token (required)

  • list: "all" will return all messages while "unread" will return only unread messages (default is unread) (optional)


  • Sample Success Response (JSON)

    {                         
    		"request": "getinbox",                         
    		"status": "success",                         
    		"inbox": [                             
    			{                                 
    				"id": "12",                                 
    				"from": "123456789",                                 
    				"to": "2347015272",                                 
    				"message": "Hi. This is message 1",                                 
    				"date": "2018-08-20 12:36:13"                             
    			},                             
    			{                                 
    				"id": "26",                                 
    				"from": "447882892",                                 
    				"to": "2347015272",                                 
    				"message": "Hi again. This is message 2",                                 
    				"date": "2018-08-20 12:36:13"                            
    			}                        
    	]                     
    }                        



    Sample Error Response (JSON)

    {                         
    	"request": "getinbox",                         
    	"status": "error",                         
    	"message": "Error",                     
    }                        



    Credit Balance

    Sample Request

    
     https://login.smsmensagens.com/smsAPI?balance&apikey=Your_API_KEY&apitoken=YOUR_API_TOKEN
     

    Parameters

  • apikey: You unique API Key (required)

  • apitoken: You unique API Token (required)


  • Sample Success Response (JSON)

    {                         
    	"balance": "12345"                    
    }                        



    Sample Error Response (JSON)

    {                        
    	"request": "balance",                         
    	"status": "error",                         
    	"message": "Invalid user",                     
    }                        


    SMS MENSAGENS - Todos os direitos reservados © 2020