---
title: "Update a Target"
method: POST
path: "/targets/{target_id}"
tags: ["Targeting"]
---

# Update a Target

`POST /targets/{target_id}`

## Request

- Base URL: `https://api.mediamath.com/api/v3.0`
- URL: `https://api.mediamath.com/api/v3.0/targets/{target_id}`
- 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/targets/:target_id/post.ts> (a function with typed inputs; its response is checked against the schema)

Update a target by ID

## Path parameters

- `target_id` integer, required

## Request body

- TargetUpdate
  - `parent_id` integer
  - `name` string
  - `factual_id` string
  - `mediamath_organization_id` integer
  - `target_inet` string
  - `visible` boolean
  - `visible_overridden` boolean
  - `bidder_frequency` integer
  - `dimension_code` string
  - `version` integer

## Response `200`

Target response

- object
  - `data` TargetBase
    - `parent_id` integer
    - `name` string, required
    - `factual_id` string
    - `mediamath_organization_id` integer
    - `target_inet` string
    - `visible` boolean
    - `visible_overridden` boolean
    - `bidder_frequency` integer
    - `dimension_code` string
  - `meta` SingleMetadata
    - `status` string, required

## Other responses

- `400`: Error response
- `401`: Error response
- `403`: Error response
- `404`: Error response
- `409`: 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)
