---
title: "Attach a referral to a user (public)"
method: POST
path: "/api/v1/visa/affiliate/apply-referral"
tags: ["Affiliate program"]
---

# Attach a referral to a user (public)

`POST /api/v1/visa/affiliate/apply-referral`

Bind an existing user to a referrer after sign-up. Sets referred_by;
the referrer earns 15% on the user's future subscriptions.

## Request body

- object
  - `referral_code` string, required
  - `email` string, email, required

## Response `200`

Referral applied.

- object
  - `ok` boolean
  - `message` string
  - `referred_by` string

## Other responses

- `400` — Missing or malformed parameter.
- `404` — No data for the requested resource.

---

[API](https://skmtc.net/orizn/apis/orizn-visa-api.md) · [All operations](https://skmtc.net/orizn/apis/orizn-visa-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/orizn/orizn-visa-api/revisions/024933fc5445/schema)
