Campaign Memberships

Campaign Memberships handle the relationship between subscribers and referral programs. For example, to add a subscriber to a referral program you must create a Campaign Membership relationship.

Create a campaign membership

POST https://api.sparkloop.app/v2/campaigns/:identifier/campaign_memberships

Use to endpoint to add a subscriber to a referral program

Path Parameters

Name
Type
Description

:identifier*

String

Referral campaign UUID, e.g. MF9a78983d1c.

Request Body

Name
Type
Description

subscriber_uuid*

string

Subscriber's UUID or email address

{
    "campaign_membership": {
        "uuid": "membership_0cf7ec1e76d1",
        "campaign_uuid": "MF3c31fb034e",
        "subscriber_uuid": "sub_509eafef8d9d",
        "created_at": "2022-12-19T14:45:30.593Z"
    }
}

Delete a campaign membership.

DELETE https://api.sparkloop.app/v2/campaigns/:identifier/campaign_memberships/:uuid

Use this endpoint to remove a subscriber from a campaign.

Path Parameters

Name
Type
Description

:identifier*

string

Subscriber's Referral campaign UUID, e.g. MF9a78983d1c.UUID or email address

:uuid*

String

Membership's UUID.

{
    "message": "Successfully deleted membership membership_34c8e39cf4"
}

Last updated