API referenceIntegrations

Update ClickFlare campaign mapping

Sets the ClickFlare campaign that receives the spend of an ad platform campaign. A manual mapping wins over the automatic one. Send cfCampaignId: null to remove the manual mapping. Returns the full mapping list. Requires an organization owner or admin.

PUT
/v1/brands/{brandId}/integrations/clickflare/mappings/{providerCampaignId}
bearerAuth
headerAuthorizationBearer <token>

An organization API key (koast_sk_…) with the API surface enabled, or an OAuth access token issued by Koast (koast_at_…) whose audience covers this API. REST access requires an active Agency plan.

brandId*integer

The brand the request acts on. Every brand-scoped resource lives under its brand.

providerCampaignId*string

The ad platform campaign id (a Meta campaign id, or a Whop adcamp_… id).

Length1 <= length <= 191
application/json
  1. body
cfCampaignId*|

The ClickFlare campaign id to push this campaign's spend into. Null removes the manual mapping and falls back to the automatic one, if any.

Response Body

Update ClickFlare campaign mapping

application/json
  1. response
brandId*number
mappings*array<>
unmatched*array<>
clickflareCampaigns*array<>
curl -X PUT "https://example.com/v1/brands/0/integrations/clickflare/mappings/string" \  -H "Authorization: Bearer koast_sk_..." \  -H "Content-Type: application/json" \  -d '{    "cfCampaignId": "string"  }'
{  "brandId": 0,  "mappings": [    {      "providerCampaignId": "string",      "koastCampaignName": "string",      "provider": "string",      "cfCampaignId": "string",      "cfCampaignName": "string",      "source": "auto",      "pushable": true,      "skipReason": "clickflare_campaign_missing",      "updatedAt": "string",      "updatedByUserId": 0    }  ],  "unmatched": [    {      "providerCampaignId": "string",      "koastCampaignName": "string",      "provider": "string",      "reason": "ambiguous",      "candidates": [        {          "cfCampaignId": "string",          "cfCampaignName": "string",          "visits": 0        }      ]    }  ],  "clickflareCampaigns": [    {      "id": "string",      "name": "string"    }  ]}

Required scope: write. CLI: koast update-clickflare-campaign-mapping, see Integrations commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.