Contact Management API

Manage Afilnet account groups and contacts from our API. Create, edit or modify group or contact information from your own software.

  • HTTP API, Manage groups and contacts from any programming language
  • 99.9% SLA, We optimize the performance of all servers.
SMS API

Programming languages

Click on the programming language of your choice and access examples to integrate the Contacts API with just copy and paste

API functionality

Create group

API method that allows you to create a group of contacts on Afilnet. The contact groups can be used to manage automated shipments or to carry out campaigns through SMS, voice or email.
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=creategroup 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
name Name of the group Compulsory
type Type of group (email or mobile) Compulsory
fields List of fields separated by commas. It's compulsory to include a mobile field if type=mobile and an email field if type = email Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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
INCORRECT_TYPE Incorrect type. The type must be mobile or email
MISSING_MAIN_FIELD Main field missing (mobile if type = mobile or email if type = email)

Parameters:

  • class : group
  • method : creategroup
  • user : user
  • password : password
  • name : test name
  • type : mobile
  • fields : mobile,name,address

Request:

https://www.afilnet.com/api/http/?class=group&method=creategroup&user=user&password=password&name=test name&type=mobile&fields=mobile,name,address

Get group field list

API method that allows you to get a list of all the fields in a group. These fields will allow you to personalize your messages (SMS, voice, email, ...).
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=getgroupcolumns 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 Group ID Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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

Parameters:

  • class : group
  • method : getgroupcolumns
  • user : user
  • password : password
  • idgroup : 1000

Request:

https://www.afilnet.com/api/http/?class=group&method=getgroupcolumns&user=user&password=password&idgroup=1000

Add a field to a group

API method that allows you to add a new field to your contact group. Each field is an additional data that it stores about the group's contacts (name, surname, address, reference, etc.)
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=addcolumntogroup 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 Group ID Compulsory
field Group field Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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

Parameters:

  • class : group
  • method : addcolumntogroup
  • user : user
  • password : password
  • idgroup : 1000
  • field : name

Request:

https://www.afilnet.com/api/http/?class=group&method=addcolumntogroup&user=user&password=password&idgroup=1000&field=name

Delete a field from a group

API method that allows you to remove an existing field from your contact group.
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=deletecolumnfromgroup 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 Group ID Compulsory
field Group field Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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

Parameters:

  • class : group
  • method : deletecolumnfromgroup
  • user : user
  • password : password
  • idgroup : 1000
  • field : name

Request:

https://www.afilnet.com/api/http/?class=group&method=deletecolumnfromgroup&user=user&password=password&idgroup=1000&field=name

Delete a contact from a group

API method that allows you to delete a group of contacts.
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=deletegroup 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 Group ID Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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

Parameters:

  • class : group
  • method : deletegroup
  • user : user
  • password : password
  • idgroup : 1000

Request:

https://www.afilnet.com/api/http/?class=group&method=deletegroup&user=user&password=password&idgroup=1000

Assing country to e group

API method that allows you to assign a country to a group of contacts. This is mandatory to create events associated with the group.
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=assigncountrytogroup 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 Group ID Compulsory
countryiso3 Country ISO code Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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
COUNTRY_NOT_FOUND There is no country with the indicated code

Parameters:

  • class : group
  • method : assigncountrytogroup
  • user : user
  • password : password
  • idgroup : 1000
  • countryiso3 : esp

Request:

https://www.afilnet.com/api/http/?class=group&method=assigncountrytogroup&user=user&password=password&idgroup=1000&countryiso3=esp

Get group contact list

API method that allows you to get all the contacts associated with a group.
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=getcontacts 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 Group ID Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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

Parameters:

  • class : group
  • method : getcontacts
  • user : user
  • password : password
  • idgroup : 1000

Request:

https://www.afilnet.com/api/http/?class=group&method=getcontacts&user=user&password=password&idgroup=1000

Get a contact from a group

API method that returns you a contact from a group.
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=getcontact 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 group id Compulsory
idcontact Contact ID Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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
NOT_ACCESS_TO_CONTACT ERROR_NOT_ACCESS_TO_CONTACT

Parameters:

  • class : group
  • method : getcontact
  • user : user
  • password : password
  • idgroup : 1000
  • idcontact : 1000

Request:

https://www.afilnet.com/api/http/?class=group&method=getcontact&user=user&password=password&idgroup=1000&idcontact=1000

Add contact to a group

API method that allows you to add a new contact to a group. The contact to add must have assigned all the fields registered in the group.
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=addcontact 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 Group ID Compulsory
contact Contact to be added with its fields separated by commas, see example Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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
CONTACT_EXISTS The contact already exists in the group
NOT_ACCESS_TO_GROUP You are not allowed into the indicated group

Parameters:

  • class : group
  • method : addcontact
  • user : user
  • password : password
  • idgroup : 1000
  • contact : mobile:123456789,name:testname

Request:

https://www.afilnet.com/api/http/?class=group&method=addcontact&user=user&password=password&idgroup=1000&contact=mobile:123456789,name:testname

Add a contact list to a group

API method that adds a list of contacts to a group.
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=addcontactlist 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 group id Compulsory
contacts Contact list in JSON format Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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

Parameters:

  • class : group
  • method : addcontactlist
  • user : user
  • password : password
  • idgroup : 1000
  • contacts : [{"name":"Test","mobile":"34600000000"},{"name":"Test","mobile":"34600000001"}]

Request:

https://www.afilnet.com/api/http/?class=group&method=addcontactlist&user=user&password=password&idgroup=1000&contacts=[{"name":"Test","mobile":"34600000000"},{"name":"Test","mobile":"34600000001"}]

Modify contact of a group

API method that allows you to modify a contact in a group. The contact must have assigned all the fields registered in the group.
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=modifycontact 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 Group ID Compulsory
idcontact Contact ID Compulsory
contact Contact to be added with its fields separated by commas, see example Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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

Parameters:

  • class : group
  • method : modifycontact
  • user : user
  • password : password
  • idgroup : 1000
  • idcontact : 1000
  • contact : mobile:123456789,name:testname

Request:

https://www.afilnet.com/api/http/?class=group&method=modifycontact&user=user&password=password&idgroup=1000&idcontact=1000&contact=mobile:123456789,name:testname

Delete contact of a group

API method that allows you to remove a contact from a group.
Parameter Description Compulsory / Optional
class=group Class requested: Class to which the request is made Compulsory
method=deletecontact 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 Group ID Compulsory
idcontact Contact ID Compulsory

Answer:

  • status
  • result (if status=success), here you will receive the following values:
    • No additional values will be sent to you
  • 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

Parameters:

  • class : group
  • method : deletecontact
  • user : user
  • password : password
  • idgroup : 1000
  • idcontact : 1000

Request:

https://www.afilnet.com/api/http/?class=group&method=deletecontact&user=user&password=password&idgroup=1000&idcontact=1000

Tools that enhance our Contact Management 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 use the Contacts API

Using the contact management API will only take a few minutes

01

Request your free trial

To access the contacts API you must be registered as an Afilnet client. Sign up in just a few minutes.

02

Integrate the Contacts API

Do the integration of the Contacts API with the programming language of your choice. Use our examples for quick integration and contact our team if you have questions.

03

Use unlimited

Make use of the Contacts API however you want. This API has no limitations, manage your contact groups as you wish.

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

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 © 2024 Afilnet · All rights reserved