Subscribers

Create a subscriber

POST https://api.sparkloop.app/v1/campaigns/:campaign_uuid/subscribers

Path Parameters

Name
Type
Description

campaign_uuid*

string

Campaign's UUID, for example MF9a78983d1c

Headers

Name
Type
Description

X-Api-Key*

string

Your API key

Request Body

Name
Type
Description

email*

string

Email

name

string

Name

referrer_code

string

The referral code of the person who referred this subscriber. If Joanne with ref_code joanne123 referred this subscriber, you should set this value to joanne123

ip_address

string

IP Address

user_agent

string

User Agent

utm_source

string

UTM Source

utm_campaign

string

UTM Campaign

created_at

string

Timestamp when subscriber signed up. You can set this value to a date in the past. Expected format: YYYY-MM-DDThh:mm:ssTZD e.g. 2021-03-22T19:20:30+01:00 Where: YYYY = four-digit year MM = two-digit month (01=January, etc.) DD = two-digit day of month (01 through 31) hh = two digits of hour (00 through 23) mm = two digits of minute (00 through 59) ss = two digits of second (00 through 59) s = one or more digits representing a decimal fraction of a second TZD = time zone designator (Z or +hh:mm or -hh:mm)

{
    "subscriber": {
        "uuid": "sub_37775e51c5",
        "email": "[email protected]",
        "name": "Drago Vrago",
        "ref_code": "drago785f",
        "referrer_code": "joanne123c",
        "referrals_count": 0,
        "ip_address": "213.19.137.18",
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36",
        "origin": "api",
        "utm_source": null,
        "utm_campaign": null,
        "created_at": "2021-03-14T10:34:56.000Z"
    }
}

Get subscribers

GET https://api.sparkloop.app/v1/campaigns/:campaign_uuid/subscribers

Subscribers are ordered descendingly by created_at, meaning the first page shows the latest subscribers.

Path Parameters

Name
Type
Description

campaign_uuid*

string

Campaign's UUID, for example MF9a78983d1c

Query Parameters

Name
Type
Description

type

string

Type of subscribers you want to get. Default is all, allowed values are all, referrals, advocates.

per_page

integer

Number of subscribers returned in a single request. Default is 50, max is 200

page

integer

The page you want to get. Default is 1

Headers

Name
Type
Description

X-Api-Key*

string

API key

Get a subscriber

GET https://api.sparkloop.app/v1/campaigns/:campaign_uuid/subscribers/:uuid

Returns a single subscriber by email address or UUID

Path Parameters

Name
Type
Description

uuid*

string

Subscriber's UUID or email address

campaign_uuid*

string

Campaign's UUID, for example MF9a78983d1c

Headers

Name
Type
Description

X-Api-Key*

string

Your API key

Get referrals for a subscriber

GET https://api.sparkloop.app/v1/campaigns/:campaign_uuid/subscribers/:uuid/referrals

Get the referrals of a specific subscriber.

Subscribers are ordered descendingly by created_at, meaning the first page shows the latest subscribers.

Path Parameters

Name
Type
Description

campaign_uuid*

string

Campaign's UUID, for example MF9a78983d1c

uuid*

String

Subscriber's UUID or email address

Query Parameters

Name
Type
Description

per_page

integer

Number of subscribers returned in a single request. Default is 50, max is 200

page

integer

The page you want to get. Default is 1

Headers

Name
Type
Description

X-Api-Key*

string

API key

Update subscriber

PUT https://api.sparkloop.app/v1/campaigns/:campaign_uuid/subscribers/:uuid

Update a subscriber's name, email address or status

Path Parameters

Name
Type
Description

uuid*

string

Subscriber's UUID or email address

campaign_uuid*

string

Campaign's UUID

Headers

Name
Type
Description

X-Api-Key*

string

Your API key

Request Body

Name
Type
Description

status

string

Subscriber's status. Allowed values are unsubscribed and confirmed.

name

string

Subscriber's name.

email

string

Subscriber's email address.

Last updated