---
title: "Create keywords"
method: POST
path: "/ad_accounts/{ad_account_id}/keywords"
tags: ["keywords"]
---

# Create keywords

`POST /ad_accounts/{ad_account_id}/keywords`

## Request

- Base URL: `https://api.pinterest.com/v5`
- URL: `https://api.pinterest.com/v5/ad_accounts/{ad_account_id}/keywords`
- Auth: OAuth 2
  - Authorization code: `https://www.pinterest.com/oauth/`
  - Token URL: `https://api.pinterest.com/v5/oauth/token` scopes: `ads:write`
- TypeScript: <https://skmtc.dev/pinterest/apis/pinterest-rest-api/docs/ad_accounts/:ad_account_id/keywords/post.ts> (a function with typed inputs; its response is checked against the schema)

Create keywords for the following entity types (advertiser, campaign, ad group, or ad). For more information, see [Keyword targeting](https://help.pinterest.com/en/business/article/keyword-targeting).

  **Notes:**
  - Advertisers and campaigns can only be assigned keywords with excluding (`_NEGATIVE`).
  - All keyword match types are available for ad groups.

  For more information on match types, see [match type enums](/docs/api-features/targeting-overview/).

  **Returns:**
  - A successful call returns an object containing an array of new keyword objects and an empty `errors` object array.
  - An unsuccessful call returns an empty keywords array, and instead, inserts the entire object with nulled/negated properties into the `errors` object array:
    ```json
    {
      "keywords": [],
      "errors": [
        {
          "data": {
            "archived": null,
            "match_type": "EXACT",
            "parent_type": null,
            "value": "foobar",
            "parent_id": null,
            "type": "keyword",
            "id": null
          },
          "error_messages": [
            "Advertisers and Campaigns only accept excluded targeting attributes."
          ]
        }
      ]
    }

## Path parameters

- `ad_account_id` string, required

## Request body

- KeywordsCreate: Resource create operation model.
  - `keywords` KeywordCreateItem[], required: Keywords
    - `bid` integer, nullable: **Note:** bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group.
    - `match_type` 'BROAD' | 'PHRASE' | 'EXACT' | 'EXACT_NEGATIVE' | 'PHRASE_NEGATIVE', required: Keyword match type
    - `value` string, required: Keyword value (120 chars max).
  - `parent_id` string, required: Keyword data

## Response `200`

The request has succeeded.

- Keywords
  - `errors` KeywordError[], required: Keyword error
    - `data` Keyword
      - `archived` boolean
      - `bid` integer, nullable: **Note:** bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group.
      - `id` string, required: Keyword ID .
      - `match_type` 'BROAD' | 'PHRASE' | 'EXACT' | 'EXACT_NEGATIVE' | 'PHRASE_NEGATIVE', required: Keyword match type
      - `parent_id` string, required: Keyword parent entity ID (advertiser, campaign, ad group).
      - `parent_type` string: Parent entity type (advertiser, campaign, ad group).
      - `type` string: Always keyword
      - `value` string, required: Keyword value (120 chars max).
    - `error_messages` string[]
  - `keywords` Keyword[], required: Keywords
    - `archived` boolean
    - `bid` integer, nullable: **Note:** bid field has been deprecated. Input will not be set and field will return null. Keyword custom bid in microcurrency - null if inherited from parent ad group.
    - `id` string, required: Keyword ID .
    - `match_type` 'BROAD' | 'PHRASE' | 'EXACT' | 'EXACT_NEGATIVE' | 'PHRASE_NEGATIVE', required: Keyword match type
    - `parent_id` string, required: Keyword parent entity ID (advertiser, campaign, ad group).
    - `parent_type` string: Parent entity type (advertiser, campaign, ad group).
    - `type` string: Always keyword
    - `value` string, required: Keyword value (120 chars max).

## Other responses

- `201`: Resource create operation completed successfully.
- `400`: The request could not be understood by the server due to unexpected data.
- `401`: Authentication is required and has either failed or not been provided.
- `403`: The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource.
- `404`: The requested resource could not be found on this server.
- `429`: The user has sent too many requests in a given amount of time and is being rate limited.
- `default`: An unexpected error response.

## Changes

- **2026-06-04** (v5) `b698c180678a`: 8 breaking, 28 info
  - added `#/components/schemas/MatchType` to the `keywords/items/match_type` request property `allOf` list
  - removed the enum value `BROAD` of the request property `keywords/items/match_type`
  - removed the enum value `EXACT` of the request property `keywords/items/match_type`
  - removed the enum value `EXACT_NEGATIVE` of the request property `keywords/items/match_type`
  - …32 more
- **2024-04-23** (v5) `f9321315766f`: 10 warning, 10 info
  - removed the optional property `errors/items/data/archived` from the response with the `200` status
  - removed the optional property `errors/items/data/id` from the response with the `200` status
  - removed the optional property `errors/items/data/parent_id` from the response with the `200` status
  - removed the optional property `errors/items/data/parent_type` from the response with the `200` status
  - …16 more
- **2023-02-14** (v5) `be19b77aa78a`: 1 breaking
  - the response's body type changed from no type to `object` for status `200`
- …earlier changes not shown

[Operation history](https://skmtc.dev/pinterest/apis/pinterest-rest-api/changes/ad_accounts/:ad_account_id/keywords/post.md)

---

[API](https://skmtc.dev/pinterest/apis/pinterest-rest-api.md) - [All operations](https://skmtc.dev/pinterest/apis/pinterest-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pinterest/apis/pinterest-rest-api/revisions/b698c180678a?raw)
