---
title: "Dry-run Taxonomy Upload"
method: POST
path: "/targeting_segments/taxonomy_upload"
tags: ["Targeting Segments"]
---

# Dry-run Taxonomy Upload

`POST /targeting_segments/taxonomy_upload`

## Request

- Base URL: `https://api.mediamath.com/api/v3.0`
- URL: `https://api.mediamath.com/api/v3.0/targeting_segments/taxonomy_upload`
- Auth: OAuth 2
  - Authorization code: `https://auth.mediamath.com/authorize`
  - Token URL: `https://auth.mediamath.com/oauth/token` scopes: `offline_access`, `manage:services`
- TypeScript: <https://skmtc.dev/mediamath/apis/campaigns-api/docs/targeting_segments/taxonomy_upload/post.ts> (a function with typed inputs; its response is checked against the schema)

Validates a CSV taxonomy file for the given targeting vendor and returns
an impact report (segment counts before/after, diff, affected strategies).
**Nothing is written to the database** — this is a dry-run only.

## Request body `multipart/form-data`

- TaxonomyUpload
  - `targeting_vendor` string, required: Two-character alphanumeric namespace code identifying the targeting vendor (e.g. `mm`). Must match an existing record in `targeting_vendors`.
  - `file` string, binary, required: CSV taxonomy file. Expected columns (header row required): `full_path`, `code`, `uniques`, `wholesale_cpm`, `retail_cpm`, `buyable`, `objective`. Lines beginning with `#` are ignored.

## Response `200`

CSV impact report. The same format is returned by both the dry-run and apply
endpoints. Response headers carry the numeric counts; the body is a CSV
attachment with two summary blocks followed by an optional affected-strategies
table.

## Other responses

- `400`: Error response
- `401`: Error response
- `403`: Error response

---

[API](https://skmtc.dev/mediamath/apis/campaigns-api.md) - [All operations](https://skmtc.dev/mediamath/apis/campaigns-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mediamath/apis/campaigns-api/revisions/408743891def?raw)
