Subscribers

Create a subscriber

POST https://api.sparkloop.app/v2/subscribers

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)

country_code

string

Alpha-2 ountry code of the subscriber

{
    "subscriber": <Subscriber Object>
}

Get subscribers

GET https://api.sparkloop.app/v2/subscribers

Subscribers are ordered in desceding order by created_at, meaning the first page shows the latest subscribers.

Query Parameters

Name
Type
Description

type

string

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

expand

string

If you pass "campaigns" the response will include referral_programs data

{
  "subscribers": [
    <Subscriber Object>,
    <Subscriber Object>,
    <Subscriber Object>,
  ],
  "meta": {
    "per_page": 2,
    "page": 2,
    "total_pages": 3,
    "total_subscribers": 6
  }
}

Get a subscriber

GET https://api.sparkloop.app/v2/subscribers/:identifier

Returns a single subscriber by email address or UUID

Path Parameters

Name
Type
Description

identifier*

string

Subscriber's UUID or email address

Query Parameters

Name
Type
Description

expand

String

If you pass "campaigns" the response will include referral_programs data

{
  "subscriber": <Subscriber Object>
}

Update subscriber

PUT https://api.sparkloop.app/v2/subscribers/:identifier

Update a subscriber's name, email address or status

Path Parameters

Name
Type
Description

identifier*

string

Subscriber's UUID or email address

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.

{
    "subscriber": <Subscriber Object>
}

Unsubscribe subscriber

PUT https://api.sparkloop.app/v2/subscribers/:identifier/unsubscribe

Unsubscribe a subscriber

Path Parameters

Name
Type
Description

identifier*

string

Subscriber's UUID or email address

{
    "subscriber": <Subscriber Object>
}

Reject subscriber

PUT https://api.sparkloop.app/v2/subscribers/:identifier/reject

Reject a pending subscriber (acquired via partner program or referral program)

Path Parameters

Name
Type
Description

identifier*

string

Subscriber's UUID or email address

{
    "subscriber": <Subscriber Object>
}

Last updated