Email API

Email API allows you to send Email and perform Email Marketing campaigns efficiently

  • HTTP API, Send emails from any programming language.
  • SMTP server, we offer you exclusive IPs for sending emails.
  • 99.9% SLA, We optimize the performance of all servers.
  • Maximum Delivery, Servers optimized to guarantee delivery.
Email API

Programming languages

Click on the programming language and access examples to integrate the Email API with just copy and paste

Email API functionality

Send Email

API method that allows you to send an email to a recipient with a personalized subject and content.
Parameter Description Compulsory / Optional
class=email Class requested: Class to which the request is made Compulsory
method=sendemail Class method requested: Method of the class to which the request is made Compulsory
user User and e-mail of your Afilnet account Compulsory
password Password of your Afilnet account Compulsory
subject Sender ID Compulsory
to Destination email Compulsory
email Email message to be sent Compulsory
scheduledatetime Delivery date and time in yyyy-mm-dd hh:mm:ss format Optional
output Output format of the result Optional

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • messageid
    • credits
  • error (if status=error), here you will receive the error code

Error codes:

Code Description
MISSING_USER User or email not included
MISSING_PASSWORD Password not included
MISSING_CLASS Class not included
MISSING_METHOD Method not included
MISSING_COMPULSORY_PARAM Compulsory parameter not included
INCORRECT_USER_PASSWORD Incorrect user or password
INCORRECT_CLASS Incorrect class
INCORRECT_METHOD Incorrect method
NO_ROUTE_AVAILABLE There are no available paths for the indicated destination
NO_CREDITS Your balance is insufficient

Parameters:

  • class : email
  • method : sendemail
  • user : user
  • password : password
  • subject : Afilnet - Test email
  • to : test@test.com
  • email : email+test
  • scheduledatetime :
  • output :

Request:

https://www.afilnet.com/api/http/?class=email&method=sendemail&user=user&password=password&subject=Afilnet - Test email&to=test@test.com&email=email+test&scheduledatetime=&output=

Send Email from template

API method that allows you to send an email to a recipient with a subject and content set in a template that you previously created. This method allows the personalization of emails using parameters
Parameter Description Compulsory / Optional
class=email Class requested: Class to which the request is made Compulsory
method=sendemailfromtemplate Class method requested: Method of the class to which the request is made Compulsory
user User and e-mail of your Afilnet account Compulsory
password Password of your Afilnet account Compulsory
to Destination email Compulsory
idtemplate Template identifier Compulsory
params Parameters to be replaced in the template for customization (<>), separated by , (commas) Optional
scheduledatetime Delivery date and time in yyyy-mm-dd hh:mm:ss format Optional
output Output format of the result Optional

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • messageid
    • credits
  • error (if status=error), here you will receive the error code

Error codes:

Code Description
MISSING_USER User or email not included
MISSING_PASSWORD Password not included
MISSING_CLASS Class not included
MISSING_METHOD Method not included
MISSING_COMPULSORY_PARAM Compulsory parameter not included
INCORRECT_USER_PASSWORD Incorrect user or password
INCORRECT_CLASS Incorrect class
INCORRECT_METHOD Incorrect method
NO_ROUTE_AVAILABLE There are no available paths for the indicated destination
NO_CREDITS Your balance is insufficient
NOT_ACCESS_TO_TEMPLATE You haven't access to the selected template

Parameters:

  • class : email
  • method : sendemailfromtemplate
  • user : user
  • password : password
  • to : 34600000000
  • idtemplate : 1000
  • params : mobile:123456789,name:test+name
  • scheduledatetime :
  • output :

Request:

https://www.afilnet.com/api/http/?class=email&method=sendemailfromtemplate&user=user&password=password&to=34600000000&idtemplate=1000¶ms=mobile:123456789,name:test+name&scheduledatetime=&output=

Send bulk Email

API method that allows you to send emails to a group of recipients with a personalized subject and content. This method allows the personalization of emails using parameters.
Parameter Description Compulsory / Optional
class=email Class requested: Class to which the request is made Compulsory
method=sendemailtogroup Class method requested: Method of the class to which the request is made Compulsory
user User and e-mail of your Afilnet account Compulsory
password Password of your Afilnet account Compulsory
subject Remitente Compulsory
idgroup Identifier of the destination group Compulsory
email Email message to be sent Compulsory
scheduledatetime Delivery date and time in yyyy-mm-dd hh:mm:ss format Optional
output Output format of the result Optional

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • id
    • count
    • credits
    • destinations
      • messageid
      • destination
  • error (if status=error), here you will receive the error code

Error codes:

Code Description
MISSING_USER User or email not included
MISSING_PASSWORD Password not included
MISSING_CLASS Class not included
MISSING_METHOD Method not included
MISSING_COMPULSORY_PARAM Compulsory parameter not included
INCORRECT_USER_PASSWORD Incorrect user or password
INCORRECT_CLASS Incorrect class
INCORRECT_METHOD Incorrect method
NOT_ACCESS_TO_GROUP You are not allowed into the indicated group
NO_CREDITS Your balance is insufficient

Parameters:

  • class : email
  • method : sendemailtogroup
  • user : user
  • password : password
  • subject : Afilnet - Test email
  • idgroup : 1
  • email : Afilnet - Test email
  • scheduledatetime :
  • output :

Request:

https://www.afilnet.com/api/http/?class=email&method=sendemailtogroup&user=user&password=password&subject=Afilnet - Test email&idgroup=1&email=Afilnet - Test email&scheduledatetime=&output=

Send Bulk Email from template

API method that allows you to send emails to a group of recipients with a subject and content set in a template that you previously created. This method allows the personalization of emails using parameters.
Parameter Description Compulsory / Optional
class=email Class requested: Class to which the request is made Compulsory
method=sendemailtogroupfromtemplate Class method requested: Method of the class to which the request is made Compulsory
user User and e-mail of your Afilnet account Compulsory
password Password of your Afilnet account Compulsory
idgroup Identifier of the destination group Compulsory
idtemplate email.sendemailtogroupfromtemplate_idtemplate Compulsory
scheduledatetime Delivery date and time in yyyy-mm-dd hh:mm:ss format Optional
output Output format of the result Optional

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • id
    • count
    • credits
    • destinations
      • messageid
      • destination
  • error (if status=error), here you will receive the error code

Error codes:

Code Description
MISSING_USER User or email not included
MISSING_PASSWORD Password not included
MISSING_CLASS Class not included
MISSING_METHOD Method not included
MISSING_COMPULSORY_PARAM Compulsory parameter not included
INCORRECT_USER_PASSWORD Incorrect user or password
INCORRECT_CLASS Incorrect class
INCORRECT_METHOD Incorrect method
NOT_ACCESS_TO_GROUP You are not allowed into the indicated group
NO_CREDITS Your balance is insufficient

Parameters:

  • class : email
  • method : sendemailtogroupfromtemplate
  • user : user
  • password : password
  • idgroup : 1000
  • idtemplate : 1000
  • scheduledatetime :
  • output :

Request:

https://www.afilnet.com/api/http/?class=email&method=sendemailtogroupfromtemplate&user=user&password=password&idgroup=1000&idtemplate=1000&scheduledatetime=&output=

Get email delivery status

API method that allows obtaining the delivery status of a list of sent emails.
Parameter Description Compulsory / Optional
class=email Class requested: Class to which the request is made Compulsory
method=getdeliverystatus Class method requested: Method of the class to which the request is made Compulsory
user User and e-mail of your Afilnet account Compulsory
password Password of your Afilnet account Compulsory
messages List of sending identifiers separated by , (commas) Compulsory
output Output format of the result Optional

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • messageid
    • sms
    • deliverydate
    • deliverystatus
  • error (if status=error), here you will receive the error code

Error codes:

Code Description
MISSING_USER User or email not included
MISSING_PASSWORD Password not included
MISSING_CLASS Class not included
MISSING_METHOD Method not included
MISSING_COMPULSORY_PARAM Compulsory parameter not included
INCORRECT_USER_PASSWORD Incorrect user or password
INCORRECT_CLASS Incorrect class
INCORRECT_METHOD Incorrect method

Parameters:

  • class : email
  • method : getdeliverystatus
  • user : user
  • password : password
  • messages : 123456,123457,123458
  • output :

Request:

https://www.afilnet.com/api/http/?class=email&method=getdeliverystatus&user=user&password=password&messages=123456,123457,123458&output=

Tools that enhance our Email API

SECURE API CONNECTION

SECURE API CONNECTION

Security tailored to your business

Configure your API connections, create new accesses and manage existing ones.

Filter all API accesses by IP, add or remove enabled IPs to guarantee the security of your accesses.

Keep track of all connections made, API used and connection dates / time

MULTIPLE APIs

MULTIPLE APIs

Connectivity tailored to your business

We offer you multiple APIs to connect with us, we have an HTTP API, BASIC AUTH, SOAP and JWT Authentication so that you can connect with us the way you want.

Connect with any of the APIs in a secure, simple and centralized way . Afilnet API is perfect for your software.

API Logs

API Logs

Get to know each request in detail

Thanks to our logs you will be able to review all the requests made and the corresponding response from our API, which will allow you to consult details when you need them.

The information you can consult is the following:

  • Source IP of the request
  • Date & Time of the request
  • API & Method being called
  • Parameters sent to the API
  • API response
  • metadata

Steps to integrate the Email API

Using our Email API will take a few minutes

01

Register as a client

Register as a user at Afilnet to access the Email API. Once registered you will be able to access the Afilnet service, as well as, the use of the API

02

Integrate Email API

Integrate the Email API into your systems using the programming language of your choice. If you have any doubt or suggestion about the API contact us

03

Request your free trial

Request test credits to perform emailing through the Email API, you can integrate and test the service at no cost

04

Welcome to Afilnet!

Everything ready!, has managed to improve its communications with Afilnet. We are here to support our API when you need it

Características de la Email API

Miles de email por minuto

Miles de email por minuto

Email API le permite enviar miles de email por minuto realizando peticiones a la API.
White list security

White list security

Enable white lists and allow connections only from the included IPs.
Envíe emails a partir de Plantillas

Envíe emails a partir de Plantillas

Haga uso de las plantillas y envíe emails prediseñados.
Información del estado de entrega

Información del estado de entrega

Obtenga el estado de entrega de sus emails a través de la API.
Multiple accesses per account

Multiple accesses per account

You can create as many users to connect to the API with the same account as you want.
Subaccounts

Subaccounts

Create sub-accounts for other companies or departments with their own API connection and balance.

Try Afilnet for free!

Sign up for free and try Afilnet! We offer you a free trial of our services. *



(*) Promotion only valid for companies that have never used the Afilnet service before. When requesting the free balance, Afilnet may request to verify your company information


Bulk SMS · Email Marketing · Social network · Instant messaging · Certification · and much more
Continue IMPORTANT INFORMATION ABOUT COOKIES: If you continue to use this web we will assume that you accept the terms of use. You will find more information in our Cookies Policy.
Payment methods
Wire transfer
Credit card
Paypal
Western Union
Skrill
Crypto
Afilnet in your language

Copyright © 2022 Afilnet · All rights reserved