Skip to main content
PUT
cURL
Use this to update a lead/customer details from FirstPromoter using the API. You can find the lead either by id, uid or email

Authorizations

X-API-KEY
string
header
required

Query Parameters

id
string

required if email or uid is null

ID of the lead or customer

uid
string

required if email or id is null

UID of the lead or customer.

email
string

required if id and uid are null

Email of the lead or customer.

new_uid
string

New uid of the lead or customer.

new_email
string

New email of the lead or customer.

new_ref_id
string

If you want to move the referral (lead or customer) to another promoter, you can enter the referral id of the new promotion

soft_switch
boolean

Set this to true, If you want to move only the referral (lead or customer) to another promoter.

NB: if set to true, the rewards/commissions associated with the referral will not be moved.

state
enum<string>

Lead's state

Available options:
signup,
active,
subscribed,
denied,
cancelled
customer_since
string

ISO datetime when the lead was converted to a customer

created_at
string

ISO datetime when the referral was created. A lead that has not bought yet expires once its creation date is older than the company's lead expiry window, so changing this date also moves that window. It has no effect on a cancelled customer's expiry; use reset_expiry to clear either kind.

reset_expiry
boolean

Set this to true to clear the referral's expired status. It restarts both expiry windows from now: the lead window (no sale since signup) and the cancelled-customer window (time since cancellation). The referral's state, creation date, customer_since and cancellation date don't change, and it can expire again once the company's expiry window has passed.

Only relevant when the company has referral expiry set.

plan_name
string

Id of the plan the customer was assigned to. Needs to match with the plans set on FirstPromoter

Response

Success response

id
integer

The lead's ID inside FirstPromoter

state
enum<string>

The lead's or customer's status

Available options:
signup,
active,
subscribed,
denied,
cancelled
uid
any

Your lead/customer's user ID inside your application.

email
string<email>

The lead's or customer's email

customer_since
string

ISO date string at which the lead converted to a customer.

cancelled_at
string

ISO date string at which the lead/customer cancelled

plan_name
string
suspicion
string
username
string
website
string
created_at
string

ISO date string at which the lead/customer signed up

split_promotion_id
any
custom_fields
any
split_percentage_value
any
visitor_sub_id
any
promotion
object
promoter
object