NAV Navbar
shell php java ruby python javascript
  • Introduction
  • Authentication
  • Message
  • Errors
  • Introduction

    Welcome to the Aritic Mail API documentation! To simplified developer's work, We at Aritic Mail have built developer-friendly APIs supported the major programming languages to send, receive, track transactional emails. We support both standard SMTP protocol and HTTP WEB-API to integration from a legacy application or the latest high-tech innovation. You can track all email statistics, and analytics of your email sent/processed, opens, clicks, bounces, and complaints.

    We have language bindings for PHP, Java, Shell, Ruby, and Python! You can view code examples in the dark area to the right, and you can switch the programming language of the cases with the tabs in the top right.

    Our APIs work over the HTTP protocol with JSON and built in a RPC-like manner, and everything you can do with the APIs has own action. All the HTTP requests must be made over HTTPS to the URL shown on the action defined in this documentation. All responses you receive from the API should return in JSON.

    Requests should be made using the POST method with any parameters encoded as JSON in the body of the request.

    Sending an email is very simple. Just follow the example below. Before you can begin, you'll need to login to our web interface and generate a new API credential.


    Aritic Mail uses API keys to allow access to the API. You can register a new Aritic Mail API key at our API.

    Aritic Mail expects for the API key to be included in all API requests to the server in a header that looks like the following:

    "X-Server-API-Key: f29a45f0d4e1744ebaee"


    Send Message

    curl "" \
      -X POST \
      -H "Accept:application/json" \
      -H "Content-Type:application/json" \
      -H "X-Server-API-Key:amXIx5LO9ZmqkAYkbpwfRrMUYgfwUtY" \
      -d "{to: ['', ''],cc: ['', ''],from: '',  subject: 'Sample AriticMail', HtmlBody: '<html><body><P>Sample message from AriticMail Transactional server </P></body></html>'}"
    example json request
     "to": [
     "cc": [
     "from": '',
     "subject": 'Sample AriticMail',
     "html_body":'<html><body><P>Sample message from AriticMail Transactional server </P></body></html>',
     "plain_body": 'Sample message from AriticMail Transactional server',
     "attachments": [
           "name": "file1.txt",
           "data": "Hkj7bDgh85TeNbc9Azop"
    <? php // Create a new AriticMail client using the server key you generate in the web interface
    $client = new AriticMail\Client('', 'your-api-key');
    // Create a new message
    $message = new AriticMail\SendMessage($client);
    $message->subject('Hi there!');
    $message->plainBody('Hello world!');
    $message->htmlBody('<p>Hello world!</p>');
    $message->header('X-PHP-Test', 'value');
    $message->attach('textmessage.txt', 'text/plain', 'Hello world!');
    // Send the message and get the result
    $result = $message->send();
       Ariticmail ariticMail = new Ariticmail("", "API_KEY");
            SendMessage message = new SendMessage();
              message.setSubject("This is an API example!");
              message.setPlainBody("This is the plain body.  Very plain.");
    This API client is coming soon. 
    If you are looking for ruby integration, please get in touch with our team.
    This API client is coming soon.
    If you are looking for python integration, please get in touch with our team.
    This API client is coming soon.
    If you are looking for javascript integration, please get in touch with our team.

    Request URL

    Request Headers

    Header Value
    Accept application/json
    Content-Type application/json
    x-server-api-key Please use KEY value under credentials

    Send Mail Request

    Field Name Field Type Field Value
    to Array List of To email addresses. Max 50
    cc Array List of CC email addresses. Max 50
    from String From email address. Must be of the verified domain
    Headers Array List of custom headers
    subject String Subject line of email
    plain_body String Plain text body of the email
    html_body String HTML body content of email
    reply_to String reply-to address of the email
    tag String This value will identify messages together
    attachments Array List of attachments
    Sample response format
        "status": "success",
        "time": 0.1,
        "data": {
            "message_id": "",
            "messages": {
                "": {
                    "id": 857,
                    "token": "oA4YFkb2ibDx"
    <? php // Loop through each of the recipients to get the message ID
    foreach ($result->recipients() as $email => $message) {
        $email;            // The e-mail address of the recipient
        $message->id();    // Returns the message ID
        $message->token(); // Returns the message's token

    Send Mail Response

    Field Name Field Type Field Value
    status String Status of the mail handling
    time String Time taken to process mail
    message_id String Message ID for further tracking
    token String Token for each to/cc email address
    id String ID for each to/cc email address


    The Kittn API uses the following error codes:

    Error Code Meaning
    400 Bad Request -- Your request sucks.
    401 Unauthorized -- Your API key is wrong.
    403 Forbidden -- The kitten requested is hidden for administrators only.
    404 Not Found -- The specified kitten could not be found.
    405 Method Not Allowed -- You tried to access a kitten with an invalid method.
    406 Not Acceptable -- You requested a format that isn't json.
    410 Gone -- The kitten requested has been removed from our servers.
    418 I'm a teapot.
    429 Too Many Requests -- You're requesting too many kittens! Slow down!
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.