Skip to content

Referral code, rules and results

GET
/open/v1/me/referral
curl --request GET \
--url https://api.harperharbor.com/open/v1/me/referral \
--header 'Authorization: Bearer <token>'

Returns the caller’s own referral code, the current reward rules and how many people the caller has referred. The code is created on first request and never changes. Results include aggregate counts and credits plus anonymous per-binding progress in invites (newest first, at most 50) and invitesTotal. They never identify the friends referred. pendingUntil is always present on each invite and may be null, including for a positive amount awaiting review. canRedeem tells whether the caller may still enter someone else’s code, and redeemUntil until when. Show terms to users instead of hard-coding reward numbers: the values can change. Requires the referral scope.

Referral page.

Media typeapplication/json
object
enabled
required

Whether codes can be entered and rewards are paid. When false the code and rules can still be shown.

boolean
code
required

The caller’s own referral code.

string
terms
required

Current reward rules. All rewards are credits usable for agent conversations only. If a rewarded top-up is refunded, the unused part of its reward is withdrawn.

object
welcomeCredits
required

Credits a new user receives when entering a code. Each sign-in identity receives them once, and disposable email addresses receive none.

integer
welcomeDays
required

How many days the welcome credits stay valid; 0 means permanent (the current newcomer welcome gift).

integer
firstPercent
required

Percentage of the referred user’s first top-up credited to the referrer once the payment has succeeded and the referral is bound. A top-up made before binding still counts as the first.

number
firstCap
required

Maximum credits the referrer receives for one first top-up.

integer
inviteePercent
required

Extra percentage the referred user receives on their own first top-up, including one made before binding. 0 when not offered.

number
rebatePercent
required

Percentage of each later top-up by the referred user credited to the referrer as soon as the payment succeeds.

number
rebateDays
required

How many days after binding the referred user’s top-ups keep earning the referrer rewards.

integer
bindDays
required

How many days after sign-up a new account can still enter a code.

integer
inviterCredits

Platform-funded credits for the original referrer of each eligible new-user binding during the inviter promotion; 0 outside the promotion. Independent of the ongoing newcomer welcome gift and the application campaign pool. Valid for inviterDays days (0 means permanent); replaying or switching the binding does not issue another gift.

integer
inviterStartAt

Inclusive start of the inviter promotion, when configured.

string format: date-time
inviterEndAt

Exclusive end of the inviter promotion, when configured.

string format: date-time
inviterDays

Validity in days of the separate inviter promotion credit, measured from its issuance; independent of welcomeDays. 0 means permanent credits with no expiry.

integer
firstChatCredits
required

Credits the original referrer receives when the referred friend completes their first successful, charged conversation within firstChatDays of binding. 0 outside the inviter promotion or when this reward is disabled. Eligibility uses the binding time within inviterStartAt (inclusive) and inviterEndAt (exclusive).

integer
firstChatDays
required

Days after binding in which the friend must complete their first successful, charged conversation. Returned even when firstChatCredits is 0. Eligible transition bindings use the new-rules launch plus this window; use each invite firstChatBy rather than calculating a deadline.

integer
referred
required

Whether the caller has entered someone’s code.

boolean
welcomeCredits
required

Welcome credits the caller received when entering a code; 0 when none.

integer
canRedeem
required

Whether the caller can still enter a code. Also true while a binding made from a share link can still be replaced.

boolean
redeemUntil

Last moment the caller can enter a code. Present only when canRedeem is true.

string format: date-time
registeredAt
required

When the caller’s account was created. Compare it with the time the user opened a share link to tell whether the account was created after that visit.

string format: date-time
invited
required

How many accounts entered the caller’s code.

integer
purchased
required

How many of them have topped up.

integer
earned
required

All referral credits already posted to the caller: binding rewards, first-conversation rewards, transition adjustments and top-up commissions. Pending credits are excluded.

integer
pending
required

Total referral credits whose conditions have been met but which are still awaiting settlement or review; 0 when none.

integer
nextRewardAt

Next expected settlement time, when available. Omitted when no date is known; it does not include an invented date for rewards under review.

string format: date-time
invites
required

Bindings to the caller code, newest boundAt first, at most 50. Always present, including [] when empty. No friend identifiers or personal details are returned.

Array<object>
<= 50 items

One anonymous friend binding. Contains progress and reward amounts, never the friend identity.

object
boundAt
required

When the friend bound the caller code; not necessarily their sign-up time.

string format: date-time
firstChat
required

Waiting: no qualifying first conversation yet and still within the window; done: qualifying first conversation completed; expired: the deadline passed without one.

string
Allowed values: waiting done expired
firstChatBy
required

Deadline for a qualifying first conversation. Normally boundAt plus firstChatDays; eligible transition bindings use the new-rules launch plus the window.

string format: date-time
credited
required

Credits already posted from this binding, including binding, first-conversation and transition adjustment rewards; excludes top-up commissions.

integer
pending
required

Credits from this binding awaiting settlement or review; 0 when none.

integer
pendingUntil
required

Expected settlement time, or null when no date is known or pending is 0. This key is always present; a positive pending amount may still have null while under review.

string | null format: date-time
invitesTotal
required

Total bindings to the caller code; may exceed the number returned in invites.

integer
Example
{
"invites": [
{
"firstChat": "waiting"
}
]
}

unauthorized — missing or invalid bearer.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}

forbidden — the token was not granted referral.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}

referral_disabled — referral rewards are not available right now; temporarily_unavailable — retry later.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}