> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pingtree.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cost Update API

> Provides API specs for external systems to update the cost of a lead in Pingtree.

> **Note:** This tab is available only in **Media Channel (MC)** source type.

<img className="block" src="https://mintcdn.com/pingtree/5J3zdrNvtKbPn5ub/assets/images/docs/documentations/campaign/sources-single-view/cost-update-api.png?fit=max&auto=format&n=5J3zdrNvtKbPn5ub&q=85&s=38bc34881d293d4813415847abc13403" alt="All Sources" width="1571" height="817" data-path="assets/images/docs/documentations/campaign/sources-single-view/cost-update-api.png" />

## Cost Update API

The **Cost Update API** allows external systems to update the **cost of a lead** by making a server-to-server request.

This is useful when you want to modify lead costs dynamically after the lead has been generated and attributed to a source.

### How It Works

* The API is fired by an **external source**.
* It **requires** a valid `transaction_id` of the lead whose cost is to be updated.
* It also requires the new `cost` value to be applied.

### Optional Parameter

* **`cost_operation`** (optional):
  * If not provided, the cost will be **overwritten** with the new value.
  * You can pass:
    * `add` – to increase the existing cost.
    * `subtract` – to decrease the existing cost.

### Example Use Cases

* Adjust cost post-sale based on dynamic criteria.
* Apply performance-based discounts or bonuses to the cost.

This endpoint gives flexibility to maintain accurate financial tracking even after initial lead submission.

***

* [Click here to view Custom Source Single View pages](./Custom-Source-Single-View)
* [Click here to view Marketing Partner Single View pages](./Marketing-Partner-Single-View)
* [Click here to view Media Channel Single View pages](./Media-Channel-Single-View)
