Skip to content

Record a conversion with its revenue and attribute it to the last email click within the brand's window

POST
/v1/brands/{brand}/conversions
curl --request POST \
--url https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/conversions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "hello@example.com", "event": "purchase", "value": 0, "currency": "MXN", "externalId": "example", "occurredAt": "2026-04-15T12:00:00Z" }'

Without an email, or with a contact who did not accept full tracking, the conversion is stored without attribution (attribution: "none"). With the same externalId in the brand it responds 200 with the already stored conversion and does not add the revenue again. The email is not stored.

brand
required
string
/^brd_[a-z0-9]{26}$/

Example

brd_01hx0000000000000000000000
Media typeapplication/json
object
email

Email of the person who converted: used to look up their last click and not stored

string format: email
<= 254 characters
event

Event name (purchase, signup…)

string
default: purchase /^[a-z0-9_]{1,64}$/
value

Conversion revenue, with at most two decimal places

number
0 <= 999999999999.99
currency
required

Uppercase ISO 4217 code, e.g. MXN. Different currencies are never summed

string
/^[A-Z]{3}$/

Example

MXN
externalId

Order id in your store: sending the same conversion twice does not count it twice

string
>= 1 characters <= 200 characters
occurredAt

When it occurred; defaults to now

string format: date-time

Already recorded (same externalId)

Media typeapplication/json
object
id
required
string
event
required
string
externalId
required
string
nullable
value
required
number
currency
required
string
occurredAt
required
string
source
required
string
Allowed values: api pixel
attribution
required

Last_click: to the last click of a send; campaign: to the campaign only (anonymous tracking); none: no attribution

string
Allowed values: last_click campaign none
noneReason
required
string
nullable
Allowed values: no_click contact_unknown tracking_off no_identity
campaignId
required
string
nullable
sendId
required
string
nullable
flowId
required

Always null until flows (M9) record their sends

string
nullable
clickAt
required
string
nullable
windowDays
required
number

Example

{
"source": "api",
"attribution": "last_click",
"noneReason": "no_click"
}

Recorded

Media typeapplication/json
object
id
required
string
event
required
string
externalId
required
string
nullable
value
required
number
currency
required
string
occurredAt
required
string
source
required
string
Allowed values: api pixel
attribution
required

Last_click: to the last click of a send; campaign: to the campaign only (anonymous tracking); none: no attribution

string
Allowed values: last_click campaign none
noneReason
required
string
nullable
Allowed values: no_click contact_unknown tracking_off no_identity
campaignId
required
string
nullable
sendId
required
string
nullable
flowId
required

Always null until flows (M9) record their sends

string
nullable
clickAt
required
string
nullable
windowDays
required
number

Example

{
"source": "api",
"attribution": "last_click",
"noneReason": "no_click"
}

Invalid data

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

No session, expired session, or invalid, expired or revoked API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Does not exist or is not visible to you

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Internal error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}