Falconide API Guide 2.0
Falconide API Guide 2.0
Version 2.0
Confidential Falconide API Guide Version 1.9
Contents
1. Overview ................................................................................................................................................................... 3
1.1 Falconide API ....................................................................................................................................................... 3
2. Get started with Falconide API ................................................................................................................................. 3
2. 1. API Structure ..................................................................................................................................................... 3
2.2 Syntax for an API call ........................................................................................................................................... 3
3. Falconide API Library ................................................................................................................................................. 4
3.1 Module: Sending ................................................................................................................................................. 4
3.2 Module Template ................................................................................................................................................ 8
3.3 Module Domain ................................................................................................................................................ 11
3.4 Module Job........................................................................................................................................................ 12
3.5 Module Report .................................................................................................................................................. 16
4. Error Codes.............................................................................................................................................................. 19
5. Support.................................................................................................................................................................... 20
2
Confidential Falconide API Guide Version 1.9
1. Overview
Falconide is an SMTP relay service that delivers highly personalized transactional emails to the inbox within seconds
of your customer’s transaction. Falconide helps you focus on your business without the cost and complexity of
owning and maintaining an email infrastructure. It manages all the technicalities like scaling the infrastructure, ISP
outreach, reputation monitoring, whitelist services and real-time analytics. Falconide offers world class deliverability
expertise to ensure that your emails get delivered on time and into the inbox.
Falconide APIs support JSON as well as REST formats. In this document, JSON samples are given for your
understanding.
2. 1. API Structure
Each API Call consist of three parts:
1. API URL
2. API Key : You can obtain the unique API API key from your Falconide panel, at Settings -> API.
3. Input Data: comprise raw parameters like email, templateid, fromname, subject, etc.
3
Confidential Falconide API Guide Version 1.9
1. Sending (email)
2. Templates: Add, Edit, Preview
3. Domain
4. Jobs: View (status), Update, Delete
5. Reports
SMTP is a standard protocol, relatively simpler to implement, and it sends one email per API call.
HTTP API is custom-developed by Falconide, is more sophisticated, and can send up to 1000 emails per API call.
You can use the HTTP API in cases where the same email needs to be sent to multiple recipients.
If you wish to send the same content to multiple recipients, you can use a single API. One API call can suffice for
multiple email addresses, helping in significant saving of bandwidth costs.
SMTP API allows you to deliver custom handling instructions for email. You can categorize your emails with
tags like Sign up, Confirmation emails, etc. to get detailed statistics on each tag. You can tag the emails by
inserting X-TAGS in the header of the message.
You can also track each message with an identifier. Pass the required tracking data under the X-
APIHEADER. The X-APIHEADER header is a JSON-encoded associative array.
Here is a sample:
SMTP is a fast way to get started since it requires very few changes.
4
Confidential Falconide API Guide Version 1.9
a. Change your SMTP user name and password as per the credentials provided to you.
b. Set the server host name to smtp.falconide.com.
c. Use port number 25 or 587 for sending emails over SSL connections.
a. API key [Required]: API credentials provided by Falconide to be used while sending an email.
b. Email details [Required]: are the basic details of the email to be used while sending an email. The details
comprise the following fields:
i. Fromname [Optional]: From name to be used in the email. It needs to be raw URL encoded.
ii. from [Required] : The From email address to be used in sending an email. The From Domain must be
authenticated first.
iii. replytoid [Optional] : Reply to email address to be used in the email. You need to provide a value to
this field in cases when you are expect recipient’s responses on an email id which is different from the
From Email Address.
iv. subject [Required] :Subject to be used in the email.
v. content [Required] : Content to be used in the email.
c. Files [Optional]: are the attachments to be used in sending an email. You can send raw files as an
attachment. Name and content of the files must be provided. The file content needs to be base64
encoded or raw URL encoded,preferably, base64 encoded to avoid performance issues. Multiple file
attachments are allowed.
d. Settings [Optional]: Email settings to be used while sending an email. If no settings are specified,
then default setting configured in your Falconide panel is used. You can overwrite default settings for
an API call. Following settings can be specified in an API call:
i. Footer: Set the value to zero or one to disable or enable the footer respectively.
i. Template: Specify template Id to be used while sending an email. Only one template id can be
specified.
ii. Attachmentid: Specify already uploaded attachments id. Multiples allowed.
iii. Clicktrack: Set click-track value to zero or one to disable or enable the click-track
respectively.
5
Confidential Falconide API Guide Version 1.9
iv. Opentrack: Set the open-track value to zero or one to disable or enable the open-track
respectively.
v. Bcc: Specify BCC email address to be used while sending an email.
i. Unsubscribe: Set unsubscribe value to zero or one to disable or enable unsubscribe
respectively.
e. Recipients [Required]: Specify list of targeted users to be used while sending an email. Multiple
recipients are allowed.
f. cc feature [Optional]: Specify one or more CC Id per recipient while sending an email.
g. Attributes [Optional]: Specify attributes for recipients to send personalized email. Multiple
attributes are allowed.
h. X-APIHEADER [Optional]: User-defined unique identifier for each email. The length of X-APIHEADER
cannot be more than 255 characters.
i. Tags: Mark the emails send through Falconide with these unique identifiers. You can search specific
emails from email logs like Sign up, Confirmation, Thank You mailers, etc based on these tags.
Length of tags cannot be greater than 255 characters.
Samples are provided here for JSON as well as REST API call.
6
Confidential Falconide API Guide Version 1.9
JSON
https://api.falconide.com/falconapi/web.send.json?data=
{
"api_key":"34565475778678678678678678",
"email_details":{
"fromname":"Testing%20Falconide",
"subject":"Welcome%20to%20our%20falconide%20product",
"from":"[email protected]",
"replytoid": "[email protected]",
REST
https://api.falconide.com/falconapi/web.send.rest?api_key=554dgdfgfg5r45
4345345retet52355 &subject=rawurlencode("Weekly statement dated 1st Jan
2013")
&fromname=rawurlencode("Info Stats")
&[email protected]
&[email protected]
&tags="Account Deactivation, Verification"
&content=rawurlencode(" Email content here")
&[email protected],[email protected]
&X-APIHEADER=”ACC123,SE2532”
&[email protected]|[email protected],[email protected]|[email protected]
Optional
&footer=1&template=109 (Optional if content provided)
&[email protected]
&attachmentid=12,14
&clicktrack=1
&ATT_NAME=rawurlencode(SAC1,SAC2)
&ATT_CONTACT=rawurlencode(CON1,CON2)
&ATT_ACCOUNTNO=rawurlencode(ACC1,ACC2)
&ATT_REGID=rawurlencode(REG1,REG2)
&ATT_ADDRESS=rawurlencode(ADD1,ADD2)
a. API key [Required]: API credentials provided by Falconide to be used while sending an email.
j. Template name[Required] :Template name required while creating a template.
b. Content [Required] : Content to be used while sending an email. Content needs to be raw URL encoded.
8
Confidential Falconide API Guide Version 1.9
https://api.falconide.com/api/falcon.domains?data=
{
"apikey":"<api_key>",
"type" : "templateadd",
"templatename" : "<sample_template_name>",
"content" : "<template_content>"
}
Output:
Success
{
"status": "success",
"templateid": "1922",
"message": "Data added successfully in Falconide."
}
Failure
{
"status": "error",
"message": "error adding template" // If
Template name already exists
}
a. API key [Required] : API credentials provided by Falconide to be used while sending an email.
b. template name[Required]: Template name required while creating a template.
c. content [Required] : Content to be used while sending an email. Content needs to be raw URL encoded.
d. template id[Required]: Specify the template ID to be used while editing the template content. Only
one template id can be specified.
9
Confidential Falconide API Guide Version 1.9
https://api.falconide.com/api/falcon.domains?data=
{
"apikey":"<api_key>",
"type" : "templateadd",
"templatename" : "<sample_template_name>",
"content" : "<template_content>",
"templateid" : "<template_id>"
Output:
Success
{
"status": "success",
"message": "Data updated successfully in Falconide."
}
Failure:
{
“status": "error",
"message": "error adding template //If Template id or Template name is
missing
}
a. API key [Required]: API credentials provided by Falconide to be used while sending an email.
b. Template id [Required]: ID of the template which needs to be previewed/downloaded.
10
Confidential Falconide API Guide Version 1.9
https://api.falconide.com/api/falcon.domains?data=
{
apikey:<api_key>,
type:<templatedownload>,
templateid:<template_id>
}
Output:
Success:
{
“status": "error",
"message": "No template found for you" //Invalid
Template id
}
Failure:
{
“status": "error",
"message": "Missing template id" // Missing
Template id}
a. api_key [Required]: API credentials provided by Falconide to be used while sending an email.
b. domain name[Required]: Domain name to be mentioned which needs to be created.
11
Confidential Falconide API Guide Version 1.9
https://api.falconide.com/api/falcon.domains?data=
{
"apikey":"<api_key>",
"type" : "domadd",
"domainname" : "<sample_domain>"
}
Output:
Success
{
"status": "success",
"message": "Data updated successfully in Falconide."
}
Failure
{
"status": "error",
// domain already exists
"message": "Domain is already in use"
}
12
Confidential Falconide API Guide Version 1.9
<DATASET>
<CONSTANT>
<ApiKey>Value</ApiKey>
</CONSTANT>
<INPUT>
<JOBID>Value</JOBID>
</INPUT>
</DATASET>
Output XML
<DATASET>
<TYPE>success</TYPE>
<OUTPUT>
<JOBID>Value</JOBID>
<Status>Value</Status>
<Entered>Value</Entered>
</OUTPUT>
</DATASET>
{
"CONSTANT": {
"ApiKey":"a69f7b0524e9fd527c90928b6ba63037"
},
"INPUT": {
"JOBID":"1"
}
}
13
Confidential Falconide API Guide Version 1.9
Output:
3.4.2 Update
This API enables you to update an existing job. The input parameters are:
NotifyEmail: Specify the email address to which you want to receive the notification of the job status.
You can provide multiple email addresses, separated by commas.
<DATASET>
<CONSTANT>
<ApiKey>Value</ApiKey>
</CONSTANT>
<INPUT>
<JOBID>Value</JOBID>
<NotifyEmail>Value</NotifyEmail>
<CallbackUrl>Value</CallbackUrl>
</INPUT>
</DATASET>
Output XML
{
"CONSTANT": {
"ApiKey":"a69f7b0524e9fd527c90928b6ba63037"
},
"INPUT": {
"JOBID":"1",
"NotifyEmail":"[email protected]",
"CallbackUrl":"http://xyz.com/test.php"
}
}
14
Confidential Falconide API Guide Version 1.9
Output XML
<DATASET>
<TYPE>success</TYPE>
<OUTPUT>
<JOBID>Value updated.</JOBID>
</OUTPUT>
</DATASET>
4.3 Delete
This API enables you to delete the jobs. The input parameter is:
JOBID [Required]: Job Id(s) which are to be removed / deleted. You can provide multiple job ids, separated
by commas.
Input XML
<DATASET>
<CONSTANT>
<ApiKey>Value</ApiKey>
</CONSTANT>
<INPUT>
<JOBID>Value</JOBID>
</INPUT>
</DATASET>
Output XML
<DATASET>
<TYPE>success</TYPE>
<OUTPUT>
<RECORD><JOBID>48</JOBID><Status>Deleted</Status></RECORD>
</OUTPUT>
</DATASET>
15
Confidential Falconide API Guide Version 1.9
Input JSON
{
"CONSTANT": {
"ApiKey":"a69f7b0524e9fd527c90928b6ba63037"
},
"INPUT": {
"JOBID":"8"
}
}
16
Confidential Falconide API Guide Version 1.9
Note: If the parameters from (c) to (m) are optional. If not defined, then the API call searches for all
the emails sent in the specified timespan.
n. NotifyEmail: Specify the email address to which the report download link has to be sent.
o. CallbackUrl: Specify the call back URL to which the downloaded report file is to be posted. The
callback URL can be either http(s) or ftp.
<DATASET>
<CONSTANT>
<ApiKey>Value</ApiKey>
</CONSTANT>
<CRITERIA>
<StartDate>Value</StartDate>
<EndDate>Value</EndDate>
</CRITERIA>
<INPUT>
<Processed>1/0</Processed>
<Sent>1/0</Sent>
<Open>1/0</Open>
<Click>1/0</Click>
<Unsubscribe>1/0</Unsubscribe>
<Bounce>1/0</Bounce>
<SoftBounce>1/0</SoftBounce>
<HardBounce>1/0</HardBounce>
<Spam>1/0</Spam>
<Invalid>1/0</Invalid>
<Dropped>1/0</Dropped>
<NotifyEmail>Value</NotifyEmail>
<CallbackUrl>Value</CallbackUrl>
</INPUT>
Jobid: This tag provides the job id using which the status and other information on the job can be
fetched.
Output XML
<DATASET>
<TYPE>success</TYPE>
<RECORD>
<Jobid>Value</Jobid>
</RECORD>
< /DATASET>
17
Confidential Falconide API Guide Version 1.9
Sample Input JSON:
"CRITERIA":
{
"StartDate":Value,
"EndDate": Value
},
"INPUT":
{
"Processed":"1/0",
"Sent":"1/0",
"Open":"1/0",
"Click":"1/0",
"Unsubscribe":"1/0",
"Bounce":"1/0",
"SoftBounce":"1/0",
"HardBounce":"1/0",
"Spam":"1/0",
"Invalid":"1/0",
"Dropped":"1/0",
"NotifyEmail":Value,
"CallbackUrl":Value
}
Output JSON
{"DATASET":
{
"TYPE":"success",
"RECORD":
{
"Jobid":Value
}
}
}
Report download is available in zip format and the job id for the report request is the report file name. The zip file
comprises a CSV file with the requested data.
For example, if the job id for the report request is 4109, the zip file of the report is named as 4109.zip.
18
Confidential Falconide API Guide Version 1.9
Tr- X- To Email From Email Requested Modified Date Mail Status Remarks
ID APIHEADER Address Address On Size
(KB)
4. Error Codes
Here is the error code list:
19
Confidential Falconide API Guide Version 1.9
1111 Call back URL specified is not If call back URL is not reachable
reachable
1112 Invalid Job ID passed If job ID to be queried is invalid
1113 Cannot delete job since not in If job id to be deleted is not in queued
queued state state
5. Support
If you have a question, call +91-(22)-66628081.
You may also submit a request online using your Falconide Account or else drop a mail to
[email protected].
20