Generate a referral link for new customers

Create a unique referral link to share with friends. When they sign up using your link, they get a discount, and you may receive a reward.

Account & Settings Account

Context

Used in the dashboard

/referral

Headers

Accept Example
Content-Type Example

Responses

200
data object required
data.link object required
data.link.code string required · Example: 5EY4XVJF

Machine-readable error code.

data.link.createdAt string required · Example: 2026-02-10T00:00:00.000Z
data.link.url string required · Example: https://hostup.se/signup?ref=5EY4XVJF
data.success boolean required · Example: true

True for successful responses.

requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

success boolean required · Example: true

True for successful responses.

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

500
code string required · Example: INTERNAL_ERROR

Machine-readable error code.

error string required · Example: Internal Server Error

HTTP status title (e.g. 'Bad Request').

message string required · Example: An unexpected error occurred

Human-readable message.

requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

POST https://cloud.hostup.se/api/referral/generate-link
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/referral/generate-link" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response
{
  "success": true,
  "timestamp": "2026-02-10T00:00:00.000Z",
  "requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
  "data": {
    "success": true,
    "link": {
      "code": "5EY4XVJF",
      "url": "https://hostup.se/signup?ref=5EY4XVJF",
      "createdAt": "2026-02-10T00:00:00.000Z"
    }
  }
}