<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>Mail</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head><body> <a href="#">Send</a> <script> $(function(){ $("a").click(function(e){ e.preventDefault() data = { "apikey": "999999999999999-us7", "type": "auto", "options": { "list_id": "999999999", "subject": "Teste 1", "from_email": "b...@exemple.com", "from_name": "From Carl", "to_name": "Cal", "tracking": { "opens": true, "html_clicks": true, "text_clicks": true }, "title": "Test", "authenticate": true, "auto_footer": true, "inline_css": true, "generate_text": true, "content": { "html": "example html" } } }
$.ajax({ type: "POST", data: data, cache : false, dataType : 'json', contentType: "application/json; charset=utf-8", success: function(data){ console.log(data); }, error: function(){ console.log(data); } }) }); }); </script></body></html>