Skip to main content

Overview

Once Rule is connected, the Dema Agent can work with your Rule email and SMS marketing data directly inside a conversation — list tags, look up a subscriber by email or phone, browse campaigns, and read campaign statistics. It can also create or update subscribers (with custom fields and tags), add tags to a subscriber to trigger automations, and send transactional email or SMS. The agent only acts when you ask it to, and Dema asks you to confirm sensitive changes before they are applied.

Prerequisites

  • A Rule account with access to the Developer settings page (to create an API key).

Connect Rule

1

Create an API key in Rule

  1. In Rule, open the account dropdown menu and click Settings.
  2. Go to Developer.
  3. Click New API key. The new key appears shortly — copy it.
A Rule API key is a sensitive credential, much like a password — it grants access to your account and data. Store it securely and do not share it.
2

Connect in Dema

In Dema, go to Agents → Settings → Integrations, find Rule, and click Connect. Enter:
  • API key — the key you copied from Rule.
Click Add. Dema marks the integration as Active.
A single API key covers everything the agent does — reading tags, subscribers, and campaign statistics, pushing subscriber records and tags, and sending transactional messages. You do not need separate keys for read and write.

Rotating the key

To rotate, create a new key under Settings → Developer, click Reconnect on the Rule integration card in Dema, enter the new key, then delete the old key in Rule.

Troubleshooting

Check that you copied the full API key from Settings → Developer. A failed key returns an authorization error — recreate the key in Rule and click Reconnect in Dema.
The API key is created under the account dropdown menu → Settings → Developer. If you do not see it, ask an admin on your Rule account to create the key for you.
Confirm the key has not been deleted in Rule. If it has, create a new key and click Reconnect in Dema.
If you are still stuck, contact support with the error message you see.

Additional resources