How to hit the ActiveCampaign API

ActiveCampaign's API v3 lives on your account's own host, like https://<account>.api-us1.com/api/3.

Authentication

Find your API URL and key under Settings → Developer. Send the key as the Api-Token header. In the examples it's written {{ACTIVECAMPAIGN_API_KEY}}; {{AC_ACCOUNT}} is the part of your API URL before .api-us1.com.

Full reference: https://developers.activecampaign.com/reference/overview

List contacts

curl "https://{{AC_ACCOUNT}}.api-us1.com/api/3/contacts?limit=10" \
  -H "Api-Token: {{ACTIVECAMPAIGN_API_KEY}}"
Run in PostTaco

Create a contact

curl -X POST https://{{AC_ACCOUNT}}.api-us1.com/api/3/contacts \
  -H "Api-Token: {{ACTIVECAMPAIGN_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{"contact": {"email": "[email protected]", "firstName": "Jenny", "lastName": "Rosen"}}'
Run in PostTaco