APRESLY API V1
Your first API integration
Create an API key, choose a campaign and register your first test lead. Get a personalized offer with three requests.
Verified against the production API: October 9, 2026
On this page
What you can build
After a signup or purchase in your store, form or CRM, register the customer’s email in Apresly. The response gives you the campaign’s deadline, personalized offer links and, when configured, an email countdown image. Pass those values to your own email tool.
API access is included in every plan. Countdown resources still depend on the tools available on your account. Existing email integrations continue to work.
1. Prepare a published campaign
In Apresly, configure your campaign’s pages, countdown, time zone and expiration behavior, then publish it. Install the Apresly widget on the offer page so that expiration is enforced.
This is a live API, with no separate sandbox. A registration test creates a real lead and can start a real deadline. Use a campaign you control and an email address you own. Replace the example email and campaign ID before running the commands.
2. Create and store an API key
Open API settings, also available from Integrations → API. In Keys, choose Create key and give it a recognizable name, such as “Store integration”. Copy the secret immediately: it is only shown once.
Store it as APRESLY_API_KEY in your server’s environment or your automation tool’s private connection. The examples below read that environment variable. Send it in Authorization: Bearer <YOUR_API_KEY>. Every key accesses all campaigns in its owning account. Keep it out of website JavaScript, URLs, public repositories and logs.
3. Choose a campaign
List published campaigns:
curl --fail-with-body "https://app.apresly.com/api/public/v1/campaigns?isDraft=false&limit=50" \
-H "Authorization: Bearer $APRESLY_API_KEY"
Use an id from items in the next requests. 42 is only an example. If nextAfterId is not null, send it as afterId to retrieve another page.
4. Register your test lead
Send a POST request after the event that should enter the lead into the campaign:
curl --fail-with-body -X POST "https://app.apresly.com/api/public/v1/campaigns/42/leads" \
-H "Authorization: Bearer $APRESLY_API_KEY" \
-H "Content-Type: application/json" \
--data '{"email":"[email protected]","language":"en"}'
A new logical lead returns 201 with created: true. An existing lead returns 200 with created: false. Both responses follow the campaign’s registration and countdown rules.
Use offerLinks[].url for the email’s offer button, choosing the correct page by pageId. If mailTimerUrl is present, use it as the source of an image in your email. Send the email through your existing email platform: Apresly does not send it for you. Empty links or a null timer can be a successful response; inspect warnings before mapping values.
5. Read the offer before a reminder
Use lookup to retrieve the existing offer without registering again, activating a countdown or starting a new cycle:
curl --fail-with-body -X POST "https://app.apresly.com/api/public/v1/campaigns/42/leads/lookup" \
-H "Authorization: Bearer $APRESLY_API_KEY" \
-H "Content-Type: application/json" \
--data '{"email":"[email protected]","language":"en"}'
Lookup returns 200 for an existing lead or 404 / LEAD_NOT_FOUND if the email has not been registered in that campaign. It can return an expired deadline. Check deadline, warnings and available links before sending your reminder.
Choose your next step
- API reference: endpoints, fields, pagination and limits.
- Make or Zapier: connect an automation.
- Your own backend: a Node.js example.
- Troubleshooting: errors and missing resources.