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

# Edit Line Item Targeting

> Advanced: assigns and removes targeting on DV360 line items via raw create and delete request lists sent as-is (bulk edit across one or many line items)

Advanced: assigns and removes targeting on DV360 line items via raw create and delete request lists sent as-is (bulk edit across one or many line items). Find option IDs with dv360\_search\_targeting\_options and current assignments with dv360\_list\_line\_item\_targeting.

|                       |                                  |
| --------------------- | -------------------------------- |
| **App**               | DV360                            |
| **Operation ID**      | `dv360_edit_line_item_targeting` |
| **Type**              | Action                           |
| **Connection**        | `dv360` (required)               |
| **Credits per run**   | 1                                |
| **Agent / MCP tool**  | Yes                              |
| **Requires approval** | Yes (write operation)            |

## Inputs

| Field             | Type                                                    | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------- | ------------------------------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `account`         | DynamicAccount                                          | Yes      | -       | Select the DV360 advertiser that owns the line items.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `line_item_ids`   | array of string (also accepts a comma-separated string) | Yes      | -       | DV360 line item IDs to apply the targeting edits to, as a list or comma-separated text.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `create_requests` | array of object or string                               | No       | -       | Official DV360 CreateAssignedTargetingOptionsRequest objects as a JSON list, sent as-is. Each entry has targetingType and assignedTargetingOptions with the per-type details object. Option IDs come from dv360\_search\_targeting\_options. Examples: \[\{"targetingType": "TARGETING\_TYPE\_GEO\_REGION", "assignedTargetingOptions": \[\{"geoRegionDetails": \{"targetingOptionId": "2276"}}]}, \{"targetingType": "TARGETING\_TYPE\_ENVIRONMENT", "assignedTargetingOptions": \[\{"environmentDetails": \{"environment": "ENVIRONMENT\_WEB\_OPTIMIZED"}}]}, \{"targetingType": "TARGETING\_TYPE\_CHANNEL", "assignedTargetingOptions": \[\{"channelDetails": \{"channelId": "123", "negative": true}}]}] |
| `delete_requests` | array of object or string                               | No       | -       | Official DV360 DeleteAssignedTargetingOptionsRequest objects as a JSON list, sent as-is. Each entry has targetingType and assignedTargetingOptionIds. Get assigned option IDs from dv360\_list\_line\_item\_targeting. Example: \[\{"targetingType": "TARGETING\_TYPE\_BROWSER", "assignedTargetingOptionIds": \["500072"]}]                                                                                                                                                                                                                                                                                                                                                                                 |

## Output

**Type**: `Dict`

Returns which line items were updated and any per-line-item errors.

**Fields**: `updated_line_item_ids`, `failed_line_item_ids`, `errors`
