---
title: "Record signup attribution."
method: POST
path: "/v1/account/attribution"
tags: ["billing"]
---

# Record signup attribution.

`POST /v1/account/attribution`

## Request

- Base URL: `https://api.smolmachines.com`
- URL: `https://api.smolmachines.com/v1/account/attribution`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/smolmachines/apis/smolfleet-api/docs/v1/account/attribution/post.ts> (a function with typed inputs; its response is checked against the schema)

Stores where the account's first visit came from, once per account. Requires the `usage:read` or `machine:read` scope.

## Request body

- SignupAttribution: First-touch marketing attribution, reported once by the console right after a new account's first login. Every field is optional and untrusted: the control plane keeps an allowlisted, length-capped, query-stripped copy and ignores the rest. Stored at most once per tenant and only for recently created tenants.
  - `firstSeenAt` string, nullable: When the visitor first landed (RFC 3339), which can precede signup by days.
  - `landingPath` string, nullable: The first path on this site the visitor landed on.
  - `referrer` string, nullable: The external page that sent the visitor, as scheme://host/path — the query string and fragment are dropped before storage.
  - `utmCampaign` string, nullable
  - `utmContent` string, nullable
  - `utmMedium` string, nullable
  - `utmSource` string, nullable
  - `utmTerm` string, nullable

## Response `200`

Whether the attribution was stored. False when the tenant already has one, is not a new account, or the report held nothing usable.

- SignupAttributionResponse: Whether a reported attribution was stored. `false` is not an error: the tenant already has one, is not a new account, or the report carried nothing usable.
  - `recorded` boolean, required

## Other responses

- `401`: Missing or invalid API key
- `403`: Key lacks the required scope
- `429`: Rate limited; retry after the Retry-After header
- `500`: Internal error

## Changes

- **2026-10-16** `bc31fc04a568`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/smolmachines/apis/smolfleet-api/changes/v1/account/attribution/post.md)

---

[API](https://skmtc.dev/smolmachines/apis/smolfleet-api.md) - [All operations](https://skmtc.dev/smolmachines/apis/smolfleet-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smolmachines/apis/smolfleet-api/revisions/bc31fc04a568?raw)
