Get a subscriber's referrals
const url = 'https://digize.com/api/v1/newsletter/referrals/mine?token=example';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://digize.com/api/v1/newsletter/referrals/mine?token=example' \ --header 'x-api-key: <x-api-key>'A subscriber’s own referral numbers, for a referral hub page on the workspace’s site: their share link, how many count and wait to confirm, the milestones and what’s next, and the rewards they earned (codes, downloads, where to give their address). Pass the referral token from ?rt= on the hub link their emails carry, or a signed-in reader’s token from newsletter.readers.verify; call it from the page with the publishable key. Null for someone no longer subscribed.
Needs the newsletter:read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The referral token from ?rt= on the page’s address, or a reader token from newsletter.readers.verify.
The referral token from ?rt= on the page’s address, or a reader token from newsletter.readers.verify.
Responses
Section titled “Responses”Done
object
Whether the referral program is on; hide the hub if not.
Their share link.
Referrals of theirs that count.
Signups by their link not confirmed yet.
object
object
Where they give their address, for something posted.
Example
{ "milestones": [ { "kind": "promo_code" } ], "rewards": [ { "kind": "promo_code", "status": "issued" } ]}What was sent isn’t valid (invalid).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}