> ## Documentation Index
> Fetch the complete documentation index at: /help/llms.txt
> Use this file to discover all available pages before exploring further.

# ActiveCampaign

> Sync a replying LinkedIn contact into ActiveCampaign with contact/sync and start an automation with a tag.

> [!NOTE]
>
> **Pro plan.** ActiveCampaign works through a connection and HTTP steps, which are part of Pro and Agency (and the free trial). Anything you already have keeps working on every plan. See [Plans and billing](/help/account/billing.md).

A contact who replies leaves the campaign (the **When the contact replies** box). Add **Send to another campaign** in that box and pick a follow-up campaign. There, a **Webhook / HTTP** step syncs the person into ActiveCampaign and a second adds a tag that starts your automation.

> [!NOTE]
>
> **How it connects:** ActiveCampaign's API v3 with your key in the `Api-Token` header. See ActiveCampaign's [Sync a contact's data](https://developers.activecampaign.com/reference/sync-a-contacts-data) and [Add a tag to contact](https://developers.activecampaign.com/reference/create-contact-tag) docs. The requests and answers below follow ActiveCampaign's docs.

## Before you start

* **ActiveCampaign plan:** the API is available on all plans; automations depend on the plan.
* **Your API URL and key:** in ActiveCampaign, open **Settings > Developer**.
* **The tag's id:** create the tag (for example "LinkedIn reply") and find its id in the tags list or with ActiveCampaign's list tags endpoint.

## 1. Connect ActiveCampaign

In Kerux, open **Integrations > Connections**, click **Connect** on **Custom API** (under **Developers**):

* **How it signs in:** **API key in a header**, **Header name** `Api-Token`, paste the key.
* **Base URL:** your API URL, for example `https://youraccount.api-us1.com`

Click **Save**, then **Test connection**.

## 2. Sync the contact

In the follow-up campaign, add a **Webhook / HTTP** step named `ac`:

```json theme={null}
{
  "method": "POST",
  "url": "/api/3/contact/sync",
  "bodyType": "json",
  "body": {
    "contact": {
      "email": "{{email}}",
      "firstName": "{{contact.first_name}}",
      "lastName": "{{contact.last_name | optional}}",
      "phone": "{{contact.phone | optional}}"
    }
  }
}
```

`contact/sync` finds the contact by email and updates it, or creates it. The answer (trimmed):

```json theme={null}
{ "contact": { "id": "113", "email": "sofia@brightpath.io" } }
```

## 3. Add the tag

A second **Webhook / HTTP** step:

```json theme={null}
{
  "method": "POST",
  "url": "/api/3/contactTags",
  "bodyType": "json",
  "body": { "contactTag": { "contact": "{{steps.ac.response.body.contact.id}}", "tag": "20" } }
}
```

Replace `20` with your tag's id. In ActiveCampaign, start the automation with "Tag is added".

Custom fields go in `fieldValues` inside `contact`, each with the field's numeric id and the value (ActiveCampaign's docs).

## Test with one contact

In the follow-up campaign's **Builder**, click **Test** to open **Test on one contact**. Check the contact, the tag and the automation in ActiveCampaign.

## Common errors

> [accordion] 403 Forbidden
>
> The key is wrong, or the **Base URL** belongs to another account. Copy both again from **Settings > Developer**.

> [accordion] 422 with an email error
>
> The email is invalid. Check the contact's email; a step whose email is empty waits instead of sending.

> [accordion] The automation doesn't start
>
> The tag id is wrong or the automation's start trigger is a different tag. Check both in ActiveCampaign.

Related: [Webhook steps](/help/integrations/webhook-steps.md), [Brevo](/help/integration-guides/brevo.md), [Mailchimp](/help/integration-guides/mailchimp.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.