Email Marketing Software - Newsletter Software | ActiveTrail

ActiveTrail Guides

Get Started
About API Keys
Manage Contacts with the Activetrail API
Manage Group members with the Activetrail API
How to Test API
ActiveTrail API Best Practices
Error Glossary
Code Examples

ActiveTrail API Best Practices

With any API, it’s important that your integrations are fault-tolerant and smart with their use of resources. To make sure your integration with the Activetrail API is as reliable as possible, review these best practices.

Fault Tolerance

When you use any API, keep in mind that errors and exceptions will sometimes happen. For example, you might experience a connection problem between your servers and Activetrail’s, or a rare outage. To make sure that your integration is as reliable as it can be, you should always watch for errors and exceptions. If an API call returns an error, log the call in as much detail as you can, including what you sent along with the entire error response and headers. In the event that you need to contact support , this information can speed up the help process for you.

We also recommend that you async your calls to the Activetrail API as a background job, instead of making your users wait for a response. In the case of custom signup forms, most users want to know if their attempt to subscribe worked or not.

Use Specific Requests

Sometimes, the API will return values that are large and slow to calculate. After you know what data you need, use our partial response capabilities to request only what’s essential to you. Often, when you make fewer requests, you’ll generate quicker responses.

Another way to reduce response time is to make fewer calls. Calls that are too frequent can slow your application, and may also receive unwanted attention from our operations team. For example, you probably don’t need to query campaign statistics every hour for several days, because most campaigns receive the bulk of their open and click activity in the first 24 hours after a send. To reduce calls further, we recommend you sync only new data, and cache data that’s unlikely to change.

Authentication

We recommend to restrict your connection protocol to TLS or SSL for platform integrations.

Try to use expiry date restrictions and IP restrictions if you can to protect your data. Give different keys to different developers / systems so you can manage restrictions on your data more freely.

Cache Values

It’s best to cache frequently-used values that don’t change often. For simple subscriptions, cache required values for resources like Groups, Campaigns, and Automations, and offer a setup area where users can change those values.

Connectivity

To avoid the possibility of abuse complaints, balance your calls with your page size. For example, when you make hundreds of calls per second to get list member details for 200 members, it will look like abuse to our operations team.

ActiveTrail
© All rights reserved to ActiveTrail