API - CheckMail



API Request

Url: /api

Params: [email], [key] (senha), [user] (login)

API Response

Json Object

                   {
                      "code": [...],
                      "description": [...],
                      "status": "Invalido"|"Valido"
                    }
              
Javascript
        
        $(document).ready(function() {
        
        	
        	 $("#validar").click(function(event) {
                 event.preventDefault();
        
                    var email = $('#email').val();
                    var key = "xxxxx";
                    var user = "[email protected]";
                    
        	       
        	        	var html = "";
        	        	
        	    	    $.ajax({
                            type: "GET",
                            contentType: "application/json; charset=utf-8",
                            url: $(formEmail).attr("action"),
                            dataType: "json",
                            
                            data: { "email": email, "key": key, "user": user },
        
                            
                            success: function(data){
                                //this.append(data);
                                if(data.api[0].status == 'Valido')
                                { html = ""; }
                                else { html = ""; }
                                $('#icon').html(html);
                                $('#status').html(data.api[0].status);
                                $('#description').html(data.api[0].description);
                            },
                            
        	    	    });
              });	
        });
        
        
        

HTML
        
        <form class="form-inline" role="form" action="/api" id="formEmail">
                                        
                    <input class="form-control" type="text" id="email" name="email" placeholder="Digite um email para validar">
                
                    <button class="btn btn-warning" type="button" id="validar">Validar</button>
                    <button class="btn btn-default" type="reset" id="limpar">Limpar</button>
                                       
        </form>
         
        
JSON API



Entre em Contato

Quer reportar um erro ou dar uma sugestão?

PagSeguro - Mais segurança para seus pagamentos
Cartões