Skip to content

API & integrations

Connecting Mailchimp step by step

How to give every Mailchimp subscriber a personal link on your domain, protected by the Anti-Bot filter. About 15 minutes the first time, then two commands before each campaign.

Create fresh codes for every campaign. A code lives 60 days and opens the page up to 3 times, so a link saved into a subscriber field once and reused for months will stop working.

1Create the CL_LINK field

In your Mailchimp audience, open "Audience fields and merge tags" and create a new Text field named CL_LINK with the merge tag CL_LINK. In the email the tag will be *|CL_LINK|*. Field values can be up to 255 bytes, which a short link easily fits.

2Get a link and a key

In your createlink.link dashboard create the link the campaign should lead to, or use an existing one — its number is LINK_ID. Then open the account menu → API and create a key named "Mailchimp" — that is YOUR_KEY.

3Export the recipients from Mailchimp

Export the list or segment you are going to send to as a CSV file and save it as export.csv. Note which column holds the email, counting from 1.

4Create the codes

Send the file to createlink.link. Replace LINK_ID and YOUR_KEY; if the email is not in the first column, change column=1.

curl -X POST "https://createlink.link/api/v1/links/LINK_ID/codes?column=1&skip_header=1" \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: text/csv" \
  --data-binary @export.csv

The answer contains job_id. Up to 1,000 recipients are ready at once; a bigger list takes from a few seconds to a couple of minutes.

5Download the file for Mailchimp

Put the job_id into the command. The file comes out with the column names Mailchimp expects.

curl "https://createlink.link/api/v1/jobs/JOB_ID?format=csv&columns=Email:ref,CL_LINK:url" \
  -H "Authorization: Bearer YOUR_KEY" -o links.csv

If the batch is still running, you get a short message with "status": "running" instead of a file — repeat the command in a minute.

6Import the file into the same audience

Add contacts → import → "Upload a file" and choose links.csv. In the Organize step pick the same audience and check "Update any existing contacts". Blank cells in the file erase existing data, which is why our file has only two columns, Email and CL_LINK. In the Match step map Email to Email Address and CL_LINK to the CL_LINK field. In the Subscribe step choose the status these people already have in the audience: the import doesn't change the status of existing contacts. Then click "Finalize import".

7Put the link into the email

Select the text or button, open the link tool and put the tag *|CL_LINK|* in the address. In HTML it looks like this:

<a href="*|CL_LINK|*">…</a>

8Turn off click tracking, and know the limit

In the email's Settings & Tracking section click Edit, uncheck "Track clicks" and save. Important: according to Mailchimp's help centre, on free plans links are still redirected through Mailchimp, and on paid plans until the account reaches certain activity thresholds. In that case the email shows a Mailchimp address instead of your domain. The link still works: after the redirect the person lands on your domain and the Anti-Bot filter checks them as usual. Check the result in a test email.

9Send a test to yourself

Add your own address to the list before step 3, send a test and check: the link in the letter starts with your domain, and clicking it opens your page. Only then send the campaign.