# Method: dynamicTargetingKeys.insert

- [HTTP request](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicTargetingKeys/insert#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicTargetingKeys/insert#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicTargetingKeys/insert#body.request_body)
- [Response body](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicTargetingKeys/insert#body.response_body)
- [Authorization scopes](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicTargetingKeys/insert#body.aspect)
- [Try it!](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicTargetingKeys/insert#try-it)

Inserts a new dynamic targeting key. Keys must be created at the advertiser level before being assigned to the advertiser's ads, creatives, or placements. There is a maximum of 1000 keys per advertiser, out of which a maximum of 20 keys can be assigned per ad, creative, or placement.

### HTTP request

`POST https://dfareporting.googleapis.com/dfareporting/v5/userprofiles/{profileId}/dynamicTargetingKeys`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `profileId` | `string (https://developers.google.com/discovery/v1/type-format format)` User profile ID associated with this request. |

### Request body

The request body contains an instance of `https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicTargetingKeys#DynamicTargetingKey`.

### Response body

If successful, the response body contains a newly created instance of `https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicTargetingKeys#DynamicTargetingKey`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/dfatrafficking`