---
title: "Capture a referral click"
method: POST
path: "/referrals/click"
tags: ["Referrals"]
---

# Capture a referral click

`POST /referrals/click`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/referrals/click`
- Auth: none declared

Records a click on a referral link. The body requires the referral `code`; `click_id`, `landing_path` and `utm_source`, `utm_medium` and `utm_campaign` are optional. Returns the `click_id` to keep in the referral click cookie. An invalid code returns the standard invalid-params error.

## Request body

- ReferralsReferralClickRequestDoc
  - `click_id` string
  - `code` string
  - `landing_path` string
  - `utm_campaign` string
  - `utm_medium` string
  - `utm_source` string

## Response `200`

Referral click id

- ReferralsReferralClickResponseDoc
  - `click_id` string
  - `code` string

## Other responses

- `400`: Invalid request
- `500`: Internal server error

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/0497899e2016?raw)
