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

# SparkLoop Integration

> Receive partner referrals from the SparkLoop network as subscribers

Connect SparkLoop so that subscribers other newsletters send you through the SparkLoop network land in Sequenzy, and so SparkLoop hears back when they confirm or unsubscribe.

## What is SparkLoop?

[SparkLoop](https://sparkloop.app) is a growth platform for newsletters. Its Partner Network, partner programs, and Signup Flow recommend your newsletter to readers of other newsletters and send you the people who opt in.

## How it works

Sequenzy acts as SparkLoop's **Custom** email service provider for one SparkLoop publication:

* When a partner sends you a reader, SparkLoop notifies Sequenzy and the reader is added as a subscriber.
* When SparkLoop confirms or rejects the referral, Sequenzy updates the subscriber. Rejected referrals are unsubscribed, as SparkLoop's terms require.
* When a referred subscriber confirms double opt-in or unsubscribes in Sequenzy, Sequenzy tells SparkLoop, so SparkLoop can stop counting readers who left while their referral is still in screening.
* When a partner sends someone who is already on your list, Sequenzy leaves that subscriber exactly as they are and asks SparkLoop to reject the referral while it is still in screening.

Sequenzy registers its own webhook in SparkLoop when you connect and removes it when you disconnect. There is no webhook URL to copy.

## Connecting SparkLoop

### Step 1: Choose Custom as your ESP in SparkLoop

In SparkLoop, set your email service provider to **Custom**. The other ESP options connect SparkLoop to a different provider.

### Step 2: Copy your API key and webhook token

1. Open [Settings → Integrations](https://dash.sparkloop.app/settings/integrations) in SparkLoop
2. Copy the **API key**
3. Copy the webhook **authentication token**. SparkLoop sends it with every webhook so Sequenzy can verify the delivery came from SparkLoop.

### Step 3: Connect in Sequenzy

1. Go to **Settings → Integrations** in Sequenzy
2. Find **SparkLoop** under Affiliate Marketing
3. Click **Connect** and paste the **API key** and **Webhook token**
4. Optionally choose a list in **Add referrals to**. By default, referrals join your workspace default lists.
5. Click **Connect SparkLoop**

If your SparkLoop account has more than one publication, Sequenzy asks which one to connect. Each Sequenzy workspace connects one publication, and each publication can be connected to only one workspace, so you can run several newsletters from one SparkLoop account by connecting each publication to its own workspace. Referrals for other publications are ignored.

## What gets synced

### Subscribers

A partner referral for the connected publication creates a subscriber with the reader's email and name. It follows your workspace's double opt-in setting: with double opt-in on, the referral receives your confirmation email and becomes a contact once they confirm. Referrals that never confirm are not reported to SparkLoop, so check your partner program's screening settings in SparkLoop.

A referral never changes an existing subscriber, and never resubscribes someone who unsubscribed.

### Attributes

| Attribute | Description |
| - | - |
| `sparkloopSubscriberId` | SparkLoop's ID for the referred subscriber |
| `sparkloopReferralStatus` | `pending`, `confirmed`, or `rejected` |
| `sparkloopPartnerId` | SparkLoop ID of the partner that sent the referral |
| `sparkloopPartnerName` | Name of the partner that sent the referral |

The status only moves forward, so a late or repeated delivery never turns a confirmed referral back into a pending one.

### Events

Use these events as sequence triggers, for example a welcome sequence for referred readers that names the partner who sent them.

| Event | When it fires |
| - | - |
| `sparkloop.referral_pending` | A partner referral starts SparkLoop's screening period |
| `sparkloop.referral_confirmed` | SparkLoop confirms the referral |
| `sparkloop.referral_rejected` | SparkLoop rejects the referral; the subscriber is unsubscribed |

Event properties include `partnerId`, `partnerName`, `publicationId`, `campaignId`, `sparkloopSubscriberId`, and `referralStatus`.

With double opt-in on, `sparkloop.referral_pending` does not fire for referrals, and `sparkloop.referral_confirmed` fires only if SparkLoop confirms the referral after the reader confirmed their subscription. Unconfirmed readers never enter your automations.

## What is not included

* SparkLoop's referral program (`new_referral`, `reward_unlocked`, and `reward_redeemed` events) is not handled.
* Your existing list is not sent to SparkLoop.
* Rejecting referrals by your own engagement criteria during screening is not automated. Only referrals of people already on your list are rejected.
* Deleting a referred subscriber in Sequenzy does not notify SparkLoop. Unsubscribe them instead.

## Managing the connection

* **Lists:** change which lists new referrals join with [Update Integration](https://docs.sequenzy.com/api-reference/integrations/update.md) (`listIds`), `sequenzy integrations set-lists`, or the `set_integration_list_targeting` MCP tool. In the dashboard, disconnect and connect again to pick a different list; connecting with **Default lists** resets any list choice made through the API, CLI or MCP.
* **Activity:** every webhook and every report sent to SparkLoop appears in the integration's Activity, including skipped referrals and the reason.
* **Disconnect:** disconnecting removes the Sequenzy webhook from SparkLoop and clears the stored credentials. If SparkLoop refuses to remove it, Sequenzy still disconnects and shows a warning; delete the webhook in SparkLoop yourself.

## API, CLI, and MCP

Connect with [Connect Integration](https://docs.sequenzy.com/api-reference/integrations/connect.md):

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/integrations/connect" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "sparkloop",
    "apiKey": "YOUR_SPARKLOOP_API_KEY",
    "webhookSecret": "YOUR_SPARKLOOP_WEBHOOK_TOKEN",
    "providerAccountId": "pub_5fc782e24409"
  }'
```

`providerAccountId` is only needed when the account has several publications. Without it, the `400` response lists them in `publications`.

From the CLI:

```bash theme={null}
sequenzy integrations connect sparkloop \
  --api-key "$SPARKLOOP_API_KEY" \
  --webhook-secret "$SPARKLOOP_WEBHOOK_TOKEN" \
  --account-id pub_5fc782e24409
```

Disconnect with [Disconnect Integration](https://docs.sequenzy.com/api-reference/integrations/disconnect.md), `sequenzy integrations disconnect <id>`, or the `disconnect_integration` MCP tool. Agents use the `connect_integration` MCP tool with the same fields.

## Troubleshooting

### Referrals do not arrive

* Check the integration's Activity. `Invalid webhook signature` means the webhook token does not match: copy it again from SparkLoop and reconnect.
* `Referral for another SparkLoop publication` means the referral was for a publication connected elsewhere, or you connected the wrong publication.
* Make sure **Custom** is selected as the ESP in SparkLoop.

### A referral shows as skipped

`Already a subscriber` means the reader was on your list before the referral. Sequenzy asked SparkLoop to reject it while it was pending, so SparkLoop does not count someone you already had. If SparkLoop had already confirmed the referral, Activity shows `SparkLoop had already confirmed this referral`.


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