Skip to Content
SendlySendly
API ReferenceAccount

Show the user's Refer & Earn link, its clicks, signups and sales, and what they have earned

GET
/api/users/me/referral

Show the user's Refer & Earn link, its clicks, signups and sales, and what they have earned. The first read enrols the user in the referral programme if they were not already.

Requires the account:read scope — See your profile and notification preferences.

cookiebetter-auth.session_token<token>

BetterAuth session cookie. Used by the dashboard / browser clients. When present, the active project is taken from the x-project-id header.

Response Body

OK

application/json
  1. response
enabled*boolean

False when the referral programme is off or the user is a guest.

link*|null
earnings*
[key: string]?unknown
Example Request
curl -X GET 'https://api.sendly.now/api/users/me/referral'
Example Response
{  "enabled": true,  "link": {    "id": "string",    "shortLink": "string",    "url": "string",    "clicks": 0,    "leads": 0,    "sales": 0,    "property1": null,    "property2": null  },  "earnings": {    "pendingCents": 0,    "clearedCents": 0,    "paidCents": 0,    "readyToWithdraw": true,    "currency": "usd",    "property1": null,    "property2": null  },  "property1": null,  "property2": null}