# ActiveCampaign Destination Config Reference


> Complete Rudder CLI reference for the ActiveCampaign destination config keys, connection modes, source types, and secrets.



[ActiveCampaign](https://www.rudderstack.com/docs/destinations/streaming-destinations/activecampaign/) is an email marketing and CRM destination. RudderStack creates and updates contacts from `identify` calls, and records `track`, `page`, and `screen` activity against them.

In an ActiveCampaign destination spec:

- `type: active_campaign`
- `definition_version: 1`

## Sample configuration

```yaml
version: rudder/v1
kind: destination
metadata:
  name: activecampaign-prod
spec:
  id: activecampaign-prod
  display_name: ActiveCampaign Production
  type: active_campaign
  definition_version: 1
  enabled: true
  config:
    api_url: https://acme.api-us1.com
    api_key: "{{ .ACTIVECAMPAIGN_API_KEY }}"
    event_key: "{{ .ACTIVECAMPAIGN_EVENT_KEY }}"
    actid: "{{ .ACTIVECAMPAIGN_ACTID }}"

    connection_mode:
      web: hybrid
      cloud: cloud
    consent_management:
      web:
        - provider: oneTrust
          consents:
            - marketing
```

The above example connects web sources in `hybrid` mode, so `page` calls run through ActiveCampaign's site tracking script while other events go through its API — see [Source types](#source-types).

## Config keys

`config` accepts only the keys listed below. The [shared config key rules](https://www.rudderstack.com/docs/rudder-cli/destination-types/#config-key-rules) cover unknown keys, defaults, and immutability.

### Connection

<div class="rs-ckeys">
<div class="rs-ckey" id="api_url">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">api_url</p>Required</div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Your ActiveCampaign API URL, from <strong>Settings</strong> &gt; <strong>Developer</strong> in your ActiveCampaign account.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Must be a URL with a dotted hostname. The <code>http://</code> or <code>https://</code> scheme is optional.</li>
<li>Any URL containing <code>.ngrok.io</code> is rejected.</li>
<li>A <code>{{ path || fallback }}</code> template is accepted in place of a literal.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="api_key">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">api_key</p>RequiredSecret</div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Your ActiveCampaign API key, from the same <strong>Developer</strong> settings page as <code>api_url</code>.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>At most 100 characters, and must not contain line breaks.</li>
<li>A <code>{{ path || fallback }}</code> template is accepted in place of a literal.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  Supply it as a <code>{{ .VAR }}</code> reference rather than a literal — see <a href="#secrets" >Secrets</a>.
</div>

</div>

</div>

### Event tracking

<div class="rs-ckeys">
<div class="rs-ckey" id="event_key">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">event_key</p>Secret</div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Event key unique to your ActiveCampaign account, from <strong>Settings</strong> &gt; <strong>Tracking</strong> &gt; <strong>Event Tracking</strong>. RudderStack uses it to record <code>track</code> events.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>At most 100 characters, and must not contain line breaks.</li>
<li>A <code>{{ path || fallback }}</code> template is accepted in place of a literal.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="actid">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">actid</p>Secret</div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Your ActiveCampaign account ID for event tracking, from <strong>Settings</strong> &gt; <strong>Tracking</strong> &gt; <strong>Event Tracking API</strong>.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>At most 100 characters, and must not contain line breaks.</li>
<li>A <code>{{ path || fallback }}</code> template is accepted in place of a literal.</li>
</ul>

</div>

</div>

</div>

### Per-source keys

Both keys are objects keyed by the local source type — the tokens listed under [Source types](#source-types). A key naming a source type this destination doesn't support fails validation.

<div class="rs-ckeys">
<div class="rs-ckey" id="connection_mode">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">connection_mode</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Maps each source type you connect to the mode its events reach ActiveCampaign in, using the modes in <a href="#source-types" >Source types</a>.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>An entry is required for each source type you connect — see <a href="#connect-a-source" >Connect a source</a>.</li>
<li>A mode the source type doesn&rsquo;t support on this destination fails validation — for example <code>device</code> for <code>android</code>.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  <div class="rs-code">
  <div class="rs-code__head">yaml<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">connection_mode:
  web: hybrid
  android_kotlin: cloud</code></pre></div>
</div>
</div>

</div>

<div class="rs-ckey" id="consent_management">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">consent_management</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Consent provider configuration per source type. The entry shape, accepted providers, and the rules on <code>resolution_strategy</code> and <code>consents</code> are shared across all destination types — see <a href="https://www.rudderstack.com/docs/rudder-cli/destination-types/#consent-management" >Consent management</a>.
</p>

</div>

</div>

## Source types

ActiveCampaign accepts events from these source types in the mentioned connection modes:

| Source type | Connection mode |
| :-----| :-----|
| `android` | `cloud` |
| `android_kotlin` | `cloud` |
| `ios` | `cloud` |
| `ios_swift` | `cloud` |
| `web` | `cloud`, `device`, `hybrid` |
| `unity` | `cloud` |
| `cloud` | `cloud` |
| `react_native` | `cloud` |
| `flutter` | `cloud` |
| `cordova` | `cloud` |
| `warehouse` | `cloud` |

Only `web` offers a choice. In `hybrid` mode, RudderStack sends `identify`, `track`, and `screen` events through ActiveCampaign's API and `page` events through ActiveCampaign's native web SDK, which is how you get [site tracking](https://help.activecampaign.com/hc/en-us/articles/221542267-An-overview-of-Site-Tracking). See [Send events in hybrid mode](https://www.rudderstack.com/docs/destinations/streaming-destinations/activecampaign/#send-events-in-hybrid-mode) and [Hybrid mode](https://www.rudderstack.com/docs/destinations/rudderstack-connection-modes/#hybrid-mode).

`warehouse` is the token a [Reverse ETL source](https://www.rudderstack.com/docs/sources/reverse-etl/) resolves to. Rudder CLI manages the destination’s `warehouse` entry — if the destination is connected to a Reverse ETL source, set `connection_mode.warehouse: cloud` in its spec, or `apply` removes it.

Rudder CLI can also declare the Reverse ETL connection itself, for the types listed under [Supported destinations](https://www.rudderstack.com/docs/rudder-cli/yaml-retl-connections/#supported-destinations) — see [Manage Reverse ETL Connections using Rudder CLI](https://www.rudderstack.com/docs/rudder-cli/retl-connections/).

**Info:** The dashboard additionally offers ActiveCampaign to AMP and Shopify sources. Rudder CLI doesn&#39;t manage those connections, so `amp` and `shopify` are invalid here.

## Connect a source

An event stream connection to this destination is checked against two rules at `validate` time.

**The source's type must be supported.** A source's type resolves to one of the tokens above before the check — a JavaScript source resolves to `web`, and webhook and server-side SDK sources resolve to `cloud`. Every type an event stream source can resolve to is supported here, so this check always passes.

**The destination config must carry a `connection_mode` entry for that source type.** This lives on the destination spec, not on the [connection spec](https://www.rudderstack.com/docs/rudder-cli/yaml-connections/). Without it:

```text
destination 'activecampaign-prod' config has no 'connection_mode' entry for source type 'web'
```

ActiveCampaign needs no additional config keys to connect a source of any type, in any mode.

## Secrets

`api_key`, `event_key`, and `actid` are the secret keys. Write each as a `{{ .VAR }}` reference and supply the value at apply time:

```yaml
config:
  api_key: "{{ .ACTIVECAMPAIGN_API_KEY }}"
  event_key: "{{ .ACTIVECAMPAIGN_EVENT_KEY }}"
  actid: "{{ .ACTIVECAMPAIGN_ACTID }}"
```

```bash
export RUDDER_ACTIVECAMPAIGN_API_KEY="..."
export RUDDER_ACTIVECAMPAIGN_EVENT_KEY="..."
export RUDDER_ACTIVECAMPAIGN_ACTID="..."
rudder-cli apply

# or
rudder-cli apply --var-file secrets.vars.yaml
```

Note that:

- `rudder-cli import` writes only the secrets the API returns, as `{{ .VAR }}` references, and leaves the others out. Add any secret key it leaves out, then supply the variables before you apply — see [Secrets](https://www.rudderstack.com/docs/rudder-cli/destination-types/#secrets).
- `api_url` isn't a secret and is imported as-is.

See [How to Use Variable Substitution in Rudder CLI](https://www.rudderstack.com/docs/rudder-cli/variable-substitution/).

## Changes by release

<table>
  <thead>
    <tr>
      <th>Version</th>
      <th>Change</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>v0.29.0</td>
      <td><strong>Breaking:</strong> A <code>null</code> config value, written as <code>key: null</code>, <code>key: ~</code>, or <code>key:</code> with no value, fails <code>validate</code> with <code>'&lt;key&gt;' must not be null; set a value or remove the key</code>. Earlier releases accepted it: a top-level null planned an update on every <code>apply</code>, and a null inside a list item failed at the API.<br><strong>What to do:</strong> Remove the key to leave it unset, or give it a value.</td>
    </tr>
    <tr>
      <td>v0.29.0</td>
      <td><strong>Changed:</strong> <code>validate</code> warns when a secret key holds anything but one <code>{{ .VAR }}</code> reference with no default, and when one variable fills two secret keys. It also masks secret values in the lines it prints.</td>
    </tr>
    <tr>
      <td>v0.29.0</td>
      <td><strong>Changed:</strong> <code>rudder-cli import</code> writes each secret reference single-quoted, as <code>'{{ .VAR }}'</code>, so a value containing double quotes, like a JSON key file, substitutes as a string. A single quote in a value that fills such a reference is written as <code>''</code>.<br><strong>What to do:</strong> In a spec imported by an earlier release, quote each reference to a JSON value by hand: <code>'{{ .VAR }}'</code>.</td>
    </tr>
    <tr>
      <td>v0.29.0</td>
      <td><strong>Changed:</strong> <code>validate</code> reports a value of the wrong type once per key, such as <code>'email' must be a string</code>, instead of one raw decoding error.</td>
    </tr>
    <tr>
      <td>v0.28.0</td>
      <td><strong>Added:</strong> <code>warehouse</code> source type, for destinations connected to a Reverse ETL source. Set <code>connection_mode.warehouse: cloud</code> for such a destination, or <code>apply</code> removes the entry.</td>
    </tr>
    <tr>
      <td>v0.26.0</td>
      <td><strong>Breaking:</strong> <code>use_native_sdk</code> is removed. A spec that still sets it fails validation with <code>unknown config field &quot;use_native_sdk&quot;</code>.<br><strong>What to do:</strong> Remove <code>use_native_sdk</code>. <code>connection_mode.web</code> decides whether RudderStack loads ActiveCampaign&rsquo;s native SDK.</td>
    </tr>
    <tr>
      <td>v0.26.0</td>
      <td><strong>Changed:</strong> <code>actid</code> is a secret key. Write it as a <code>{{ .VAR }}</code> reference.</td>
    </tr>
  </tbody>
</table>

For changes across every destination type, see [Destination Type Changes by Release](https://www.rudderstack.com/docs/rudder-cli/destination-types/changes/).

## See more

- [ActiveCampaign Destination](https://www.rudderstack.com/docs/destinations/streaming-destinations/activecampaign/) for event mappings, tags, custom fields, and list subscriptions
- [Destination Type Reference for Rudder CLI](https://www.rudderstack.com/docs/rudder-cli/destination-types/) for the rules shared across destination types
- [Destination YAML Reference](https://www.rudderstack.com/docs/rudder-cli/yaml-destinations/) for the spec envelope

