For the complete documentation index, see llms.txt. This page is also available as Markdown.

Campaigns

Campaigns

A Campaign is a uniquely tracked link a publication places in its emails. SparkLoop attributes the clicks each link drives — and the referrals, conversions, and earnings that follow — back to the campaign that produced them, so each placement's performance can be measured independently. (The dashboard still labels these "In-email Campaigns".)

Every campaign has a type that determines what it points at: recommendations_hub, specific_recommendation, offers_hub, or specific_offer. The two hub types point at the whole hub and have no specific target.

List campaigns

GET https://api.sparkloop.app/v3/publications/:publication_uuid/tools/campaigns

Paginated.

Path Parameters

Name
Type
Description

publication_uuid*

String

The publication's UUID.

Query Parameters

Name
Type
Description

expand

String

stats. target cannot be expanded on the list — only on a single campaign.

from

String

Start date (YYYY-MM-DD) for stats.

to

String

End date (YYYY-MM-DD) for stats.

{
  "campaigns": [
    <Campaign Object>
  ],
  "meta": {
    "per_page": 50,
    "page": 1,
    "total_pages": 1,
    "total_campaigns": 6
  }
}
{
  "error": "`target` can only be expanded on a single campaign."
}

Get campaign

GET https://api.sparkloop.app/v3/publications/:publication_uuid/tools/campaigns/:uuid

Path Parameters

Name
Type
Description

publication_uuid*

String

The publication's UUID.

uuid*

String

The campaign's UUID.

Query Parameters

Name
Type
Description

expand

String

target (the recommendation or joined offer the link points at), stats.

from

String

Start date (YYYY-MM-DD) for stats.

to

String

End date (YYYY-MM-DD) for stats.

Create campaign

POST https://api.sparkloop.app/v3/publications/:publication_uuid/tools/campaigns

Creates a trackable campaign link. Hub types (recommendations_hub, offers_hub) need no target UUID. Specific types resolve a publication-scoped recommendation or joined offer by UUID.

Path Parameters

Name
Type
Description

publication_uuid*

String

The publication's UUID.

Body Parameters

Name
Type
Description

campaign_type*

String

recommendations_hub, specific_recommendation, offers_hub, or specific_offer. Invalid → 400.

name

String

Campaign name. Required for hub types. Optional for specific types — defaults to "<target> - <date>" (same as the dashboard new form).

recommendation_uuid

String

Joined recommendation UUID. Used when campaign_type is specific_recommendation (404 if unknown; 422 if missing).

offer_recommendation_uuid

String

Joined earn-offer UUID. Used when campaign_type is specific_offer (404 if unknown; 422 if missing).