Advanced API Documentation
Campaigns
Contract Documents
Dashboard
Invoices
Invoice Templates
Payment Batches
Payout Methods
Referrals
Campaigns
Update campaign
With this endpoint you can update a campaign.
HTTP Request
PUT https://v2.firstpromoter.com/api/v2/company/campaigns/{id}
PUT
/
campaigns
/
{id}
curl --request PUT \
--url https://v2.firstpromoter.com/api/v2/company/campaigns/{id} \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"landing_url": "<string>",
"ref_token_param": "?fpr",
"color": "<string>",
"visitor_cookie_life": 123,
"auto_approve_promoters": true,
"is_private": true,
"track_ad_traffic": "pending",
"links": [
{
"id": 123,
"name": "<string>",
"url": "<string>",
"_destroy": true
}
],
"upgrade_details": {
"campaign_id": 123,
"amount": 123,
"metric": "customers"
},
"rewards_for_promoters": [
{
"apply_on": "monthly",
"product_ids": [
"<any>"
],
"reward_id": 123
}
],
"rewards_for_referrals": [
{
"apply_on": "monthly",
"product_ids": [
"<any>"
],
"reward_id": 123
}
]
}'
{
"id": 123,
"name": "<string>",
"color": "<string>",
"stats": {
"referrals_count": 123,
"sales_count": 123,
"customers_count": 123,
"promoters_count": 123,
"revenue_amount": 123
},
"landing_url": "<string>",
"visitor_cookie_life": 123,
"ref_token_param": "<string>",
"auto_approve_leads": true,
"track_ad_traffic": "pending",
"auto_approve_promoters": true,
"is_private": true,
"is_default": true,
"upgrade_details": {
"campaign_id": 123,
"amount": 123,
"metric": "customers",
"move_referrals_on_level_change": true
},
"signup_url": "<string>",
"links": [
{
"id": 123,
"name": "<string>",
"url": "<string>"
}
],
"rewards_for_promoters": [
{
"apply_on": "monthly",
"product_ids": [
123
],
"reward_id": 123,
"reward": {
"name": "<string>",
"promoter_reward_type": "<string>",
"hide_reward": true,
"tier_level": 123,
"coupon": "<string>"
},
"products": [
{
"id": 123,
"name": "<string>"
}
]
}
],
"rewards_for_referrals": [
{
"apply_on": "monthly",
"product_ids": [
123
],
"reward_id": 123,
"reward": {
"name": "<string>",
"promoter_reward_type": "<string>",
"hide_reward": true,
"tier_level": 123,
"coupon": "<string>"
},
"products": [
{
"id": 123,
"name": "<string>"
}
]
}
]
}
Authorizations
Access token passed as a Bearer token in the Authorization header
Headers
Account identifier that specifies which account is making the request
Example:
"acc_123456"
Path Parameters
Body
application/json
Response
200
application/json
Campaign updated successfully
The response is of type object
.
curl --request PUT \
--url https://v2.firstpromoter.com/api/v2/company/campaigns/{id} \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"landing_url": "<string>",
"ref_token_param": "?fpr",
"color": "<string>",
"visitor_cookie_life": 123,
"auto_approve_promoters": true,
"is_private": true,
"track_ad_traffic": "pending",
"links": [
{
"id": 123,
"name": "<string>",
"url": "<string>",
"_destroy": true
}
],
"upgrade_details": {
"campaign_id": 123,
"amount": 123,
"metric": "customers"
},
"rewards_for_promoters": [
{
"apply_on": "monthly",
"product_ids": [
"<any>"
],
"reward_id": 123
}
],
"rewards_for_referrals": [
{
"apply_on": "monthly",
"product_ids": [
"<any>"
],
"reward_id": 123
}
]
}'
{
"id": 123,
"name": "<string>",
"color": "<string>",
"stats": {
"referrals_count": 123,
"sales_count": 123,
"customers_count": 123,
"promoters_count": 123,
"revenue_amount": 123
},
"landing_url": "<string>",
"visitor_cookie_life": 123,
"ref_token_param": "<string>",
"auto_approve_leads": true,
"track_ad_traffic": "pending",
"auto_approve_promoters": true,
"is_private": true,
"is_default": true,
"upgrade_details": {
"campaign_id": 123,
"amount": 123,
"metric": "customers",
"move_referrals_on_level_change": true
},
"signup_url": "<string>",
"links": [
{
"id": 123,
"name": "<string>",
"url": "<string>"
}
],
"rewards_for_promoters": [
{
"apply_on": "monthly",
"product_ids": [
123
],
"reward_id": 123,
"reward": {
"name": "<string>",
"promoter_reward_type": "<string>",
"hide_reward": true,
"tier_level": 123,
"coupon": "<string>"
},
"products": [
{
"id": 123,
"name": "<string>"
}
]
}
],
"rewards_for_referrals": [
{
"apply_on": "monthly",
"product_ids": [
123
],
"reward_id": 123,
"reward": {
"name": "<string>",
"promoter_reward_type": "<string>",
"hide_reward": true,
"tier_level": 123,
"coupon": "<string>"
},
"products": [
{
"id": 123,
"name": "<string>"
}
]
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.