Home / Support / Engine API Documentation

Engine API Documention

To use the API, you'll need to open a CakeMail account. If you haven't already, you can register here.

API URL

The API can be accessed at http://api.cakemail.com. Communication with the API is made using encrypted XML.

Interface ID & Key

Your Interface ID and an Interface Key (hexadecimal number) is required to access the CakeMail API. The API Interface ID and Key pair performs two functions:

  • Authenticate the application calling the API
  • Encrypt the data sent to and from the API

All CakeMail customers are provided with their Interface ID and Interface Key upon request. Contact us now to start working with the CakeMail API.

POSTing Requests to the API

Each Request must have two parameters: "id" and "request".

  • POST parameter "id": Interface ID
  • POST parameter "request": Encrypted and hexadecimal encoded XML request.

XML request must be encoded in UTF-8

Encryption Overview

Default parameters (See below for alternate algorithm and modes):

  • Encoding algorithm: blowfish
  • Encoding mode: electronic codebook (ecb)
  • All requests must be encrypted using the Interface Key as the encryption key.
  • Encrypted requests must be encoded in hexadecimal format. For example, the 2 binary bytes \xDF\xA8 are encoded as DFA8 using 4 ASCII characters.
  • If the size of the data is not n * blocksize, the data must be padded with '\0'.

Using other encryption algorithms and modes

The CakeMail API supports other encryption algorithms and modes. You can specify a different algorithm and mode by adding the following arguments to the Request:

  • POST parameter "alg": can be "blowfish" (default and recommended), "serpent", "tripledes" or "twofish"
  • POST parameter "mode": can be "ecb" (default), "cbc", "cfb"

If the selected mode requires an initialization vector (IV), then the IV should precede the encrypted XML request in the Request parameter.

API Response

The API Response is encrypted using the same algorithm as the API Request:

  • Use the Interface Key as the encryption key.
  • Encoded in hexadecimal format.

Decoding and decrypting must be done prior to reading the XML response.

Authentication of the User

A User Key (not to be confused with the Interface Key) is required for most API calls. This Key is used to authenticate the User accessing the API. API Users are the same as CakeMail Interface Users.

The User Key can be obtained automatically by the server using the method "Login" in the class "User". Enter the User's email and password upon Request.

Each User is associated with a single Client, each Client can have multiple Users.

 

Create a free trial account

http://.servecake.com

Your fully-branded domain will be set-up later

All fields are mandatory

Interested? Create trial account or request live demo of CakeMail