Skip to content

Record what a source or campaign cost

POST
/v1/attribution/costs

One cost, or up to 500 as { "costs": [...] }. The attribution report then shows, per source, the spend inside the window, cost per signup, cost per paying customer and return on spend. A period that partly overlaps the window counts in proportion to the days that do. Spend is only compared with revenue in the same currency.

Auth: Secret key only. Every plan; Free reads the last 30 days, Indie 90 days, Builder 24 months.

object
source_type
required

The attribution grouping this cost belongs to.

string
Allowed values: referrer utm_source utm_campaign
source
required

The value as it appears in the report. Stored lowercase.

string
Example
reddit
period_start
required
string format: date
period_end
required

Inclusive.

string format: date
amount_minor
required

Smallest currency unit: 20000 is $200.00.

integer
currency
required
string
Example
usd
note
string
<= 300 characters

added and the new ids

Error envelope. See error.code for the discriminator.

object
data
required
null
error
required
object
code
required
string
message
required
string
remediation
required
string
doc_url
string format: uri
param
string
request_id
string
meta
object
key
additional properties

Error envelope. See error.code for the discriminator.

object
data
required
null
error
required
object
code
required
string
message
required
string
remediation
required
string
doc_url
string format: uri
param
string
request_id
string
meta
object
key
additional properties