How to use the Cyberimpact API

About Cyberimpact API

Learn more about Cyberimpact API:

What is an API?

You’re asking yourself what exactly is an API? No, it’s not the name of a droid in the new Star Wars movie. The API allows an external system to interact with Cyberimpact (For example: Your website, a CRM etc.) and to achieve some functions by programming. Once the API is in place, you can, among other things, add or unsubscribe contacts automatically.
 

What can you do with Cyberimpact API?

This tool allows you, among other things, to:

  • Retrieve, unsubscribe, create* or delete contacts;
  • Add contacts to a group or update their current groups;
  • Retrieve, create, edit or delete groups**;
  • Remove contacts from groups;
  • Retrieve, create or cancel mailings;
  • Retrieve, create, replace or delete templates;
  • Retrieve, import or unsubscribe many contacts simultaneously.

* If you use the API to add contacts to your account you could create a welcome scenario with the marketing automation tools to automatically send them a thank you email after they confirm their subscription.

** You won't be able to delete a group interacting with the API. You will need to change your request before deleting your group.
 

Skills needed to use the API

This feature requires technical knowledge in programming.

If you don't have such a resource at your disposal, it is possible to use Zapier to easily connect your favorite apps to Cyberimpact. Learn more about Zapier >
 

Get Cyberimpact API documentation

The Cyberimpact API documentation is available here.
 

Can all accounts use the API?

The API is included in the Plus and Pro plans. No special permission is required to use it. Please note, however, that adding contacts via the API may have an impact on the price of your monthly fees.
 

Add contacts using the API 

What do you want to do?

Add unique contacts

To add unique contacts, one at a time, you can use the Opt-in a member or Add a new member functionality.

The Opt-in a member and Add a new member methods are throttled. To add a large number of contacts simultaneously, use Add a batch instead.

Opt-in a member

Opt-in a member is the recommended method for connecting a custom subscription form to your Cyberimpact account. It allows you to verify the email addresses submitted and obtain a proof of consent that will be automatically saved in your contacts' details. You can also use it to update an existing contact. Using a CAPTCHA with your forms is strongly recommended.
Learn more > 

Add a new member

This option allows you to add a new contact directly into your account without asking them to confirm their email address. For example, you could add the email of a new client that made a purchase on your online store. However, it is not recommended to use it to link a subscription form to your account, as you will not get a proof of consent this way. Also note that it is not possible to update an existing contact with this feature. Instead, you will need to use Edit a member, Replace a member and/or Add groups to member.
Learn more >
 

Import a list of contacts

To import a list of contacts, use Add a batch.

Add a batch

This option allows you to import a large list of contacts or to unsubscribe several addresses simultaneously. For example, once a day, you could synchronize your CRM to your Cyberimpact account to import all your customers' addresses.
Learn more >
 

How to authenticate to the API 

To authenticate to the API, we invite you to use API tokens. To create an API token, follow these steps:

  1. Connect to your Cyberimpact account.
  2. Go to the Icone Developers > API tokens .
     
  3. Click the + Create a new API token button.
     
  4. In the API token window, click Copy to clipboard.
    Then, use this token in the HTTP authorization header for your calls to the API.
Share your API token securely and only with people you trust. Your API token is what allows access to your account, so you don't want this information to be public.

Important notes:

  • Each API token is valid for 10 years. To prevent a token from working before the end of that period, you need to delete it. To do so, connect to your Cyberimpact account and go to Icone Developers > API tokens. Open theIcone Actions menu located at the right of the token you wish to cancel and select Delete. Then confirm the action.
     
  • An API token does not allow you to authenticate to the application.
     
  • A direct connection to the API in JavaScript is not supported at the moment (learn more about the Same-origin policy).
     
  • If you're still using our previous authentication method to the API (username and password), we strongly recommend that you switch to our new method that uses the API tokens. This will lower considerably the time needed to make your calls to the API. Additionally, it will prevent connection errors due to a password change from the user. The authentication by token works with the JWT (JSON Web Token) standard. We invite you to learn more on the subject here.

    Examples in PHP:

    - Previous method:
    curl_setopt($curl_handle, CURLOPT_USERPWD, 'my_username' . ':' . 'my_password');

    -New method :
    curl_setopt($curl_handle, CURLOPT_HTTPHEADER, array('Authorization: Bearer token-content'));
     
  • To ensure a good continuity of your API programming:

    - When you use the API token authentication method, it is important to not delete the token used in your programming. Please note that if you delete the user that created the API token with this authentication method, the token will still work even if the user no longer exists.

    - When you use the username and password authentication method, it is important that you don’t delete the user or change the access codes of this user.
     

Get help

Questions regarding our API? Send us a help request here. Make sure to send us the full HTTP request (including the header (except your API token), the body and the response obtained by our API) you're using, so our developers can reproduce your use case in its integrality.

We also invite you to take a look at our different examples available in our API documentation.
 

See also :

Top