---
title: "Capture Attribution"
method: POST
path: "/api/v1/marketing/attribution"
tags: ["marketing"]
---

# Capture Attribution

`POST /api/v1/marketing/attribution`

## Request

- Base URL: `https://api.seoproai.co`
- URL: `https://api.seoproai.co/api/v1/marketing/attribution`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://dajosjnaalanhqksxrpe.supabase.co/auth/v1/authorize`, token URL `https://dajosjnaalanhqksxrpe.supabase.co/auth/v1/token`)

Persist marketing attribution captured client-side.

Called after every successful auth (sign-up and sign-in). Each call
inserts a new row so we keep history; the read path in
create_checkout_session takes the most-recent row with non-null fields.

## Request body

- AttributionPayload
  - `fbclid` string, nullable
  - `fbp` string, nullable
  - `fbc` string, nullable
  - `gclid` string, nullable
  - `utm_source` string, nullable
  - `utm_medium` string, nullable
  - `utm_campaign` string, nullable
  - `utm_content` string, nullable
  - `utm_term` string, nullable
  - `landing_url` string, nullable
  - `referrer` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/seoproai/apis/seopro-ai.md) · [All operations](https://skmtc.dev/seoproai/apis/seopro-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/seoproai/apis/seopro-ai/revisions/5b4b6391ddc9?raw)
