Referral Program

Enrol a member by hand

curl -X POST https://api.subscriby.net/v1/projects/7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13/referral-affiliates \
  -H "Authorization: Bearer sbt_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "member_id": "a1b2c3d4-e5f6-4718-8a9b-0c1d2e3f4a5b" }'

Enrols a member as an affiliate, approved whatever the programme's switches say, and hands them their code, their links and the programme's terms in their chat and by mail. Emits referral.affiliate_joined. Answers 201 with the affiliate.

post/v1/projects/{project}/referral-affiliates

Request

  • Base URL: https://api.subscriby.net
  • URL: https://api.subscriby.net/v1/projects/{project}/referral-affiliates
  • Auth: HTTP bearer

Path parameters

projectstring uuid required

The project, resolved by the route binder.

Headers

Idempotency-Keystring uuid required

A key unique to this operation, such as a fresh UUID. The same key replays the original 2xx response for 24 hours (with Idempotent-Replay: true), so a retry after a timeout never repeats the write; the same key with a different body is refused with 409.

Request body

member_idstring uuid required

The id of a member of this project, as the members endpoints list them.

Response

The new affiliate with their balances.

Example response

{
  "data": {
    "id": "0b1c2d3e-4f50-4617-8a9b-0c1d2e3f4a5b",
    "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",
    "program_id": "6e2a7a4f-3b8c-4c21-9f6d-2a3b4c5d6e7f",
    "member_id": "a1b2c3d4-e5f6-4718-8a9b-0c1d2e3f4a5b",
    "code": "ADA2026",
    "status": "approved",
    "joined_at": "2026-10-02T11:05:00+00:00",
    "approved_at": "2026-10-02T11:05:00+00:00",
    "created_at": "2026-10-02T11:05:00+00:00",
    "updated_at": "2026-10-08T16:41:11+00:00"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.