---
title: "Report user attribution"
method: POST
path: "/api/analytics/attribution"
tags: ["analytics"]
---

# Report user attribution

`POST /api/analytics/attribution`

Store where this user came from. Fields are only ever filled once.

The DataFast ids come from the request headers the frontend attaches to
every call, so the body never has to carry them.

## Request body

- UserAttributionInput
  - `anonymous_id` string, nullable
  - `posthog_distinct_id` string, nullable
  - `datafast_visitor_id` string, nullable
  - `datafast_session_id` string, nullable
  - `landing_path` string, nullable
  - `referrer` string, nullable
  - `utm_source` string, nullable
  - `utm_medium` string, nullable
  - `utm_campaign` string, nullable
  - `signup_method` string, nullable

## Response `200`

Successful Response

- UserAttribution
  - `anonymous_id` string, nullable
  - `posthog_distinct_id` string, nullable
  - `datafast_visitor_id` string, nullable
  - `datafast_session_id` string, nullable
  - `landing_path` string, nullable
  - `referrer` string, nullable
  - `utm_source` string, nullable
  - `utm_medium` string, nullable
  - `utm_campaign` string, nullable
  - `signup_method` string, nullable
  - `user_id` string, required
  - `created_at` string, date-time, required

## Other responses

- `401` — Authentication required
- `422` — Validation Error

## Changes

- **2026-09-16** `b1de0095bed2` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/changes/api/analytics/attribution/post.md)

---

[API](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/revisions/5f27fa9d6c03?raw)
