keywords

Create keywords

Changed on

Create keywords for the following entity types (advertiser, campaign, ad group, or ad). For more information, see 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.

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:
    {
      "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."
          ]
        }
      ]
    }
    
post/ad_accounts/{ad_account_id}/keywords

Request

Path parameters

ad_account_idstring required

Unique identifier of an ad account.

Request body

parent_idstring required

Keyword data

Example request

{
  "keywords": [
    {
      "match_type": "BROAD"
    }
  ]
}

Response

The request has succeeded.

Example response

{
  "errors": [
    {
      "data": {
        "id": "383791336903426391",
        "match_type": "BROAD",
        "parent_id": "383791336903426391",
        "parent_type": "campaign",
        "type": "keyword"
      }
    }
  ],
  "keywords": [
    {
      "id": "383791336903426391",
      "match_type": "BROAD",
      "parent_id": "383791336903426391",
      "parent_type": "campaign",
      "type": "keyword"
    }
  ]
}

Changes

    • breaking

      added to the // request property allOf list

    • breaking

      removed the enum value BROAD of the request property //

    • breaking

      removed the enum value EXACT of the request property //

    • breaking

      removed the enum value EXACT_NEGATIVE of the request property //

    • breaking

      removed the enum value PHRASE of the request property //

    • breaking

      removed the enum value PHRASE_NEGATIVE of the request property //

    • breaking

      removed the enum value undefined of the request property //

    • breaking

      the // request property type changed from string to no type

    • info

      removed the pattern ^((AG)|C)?\d+$ from the request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      the response optional property became read-only for the status

    • info

      removed subschema #2 from the // response property allOf list for the response status

    • info

      removed subschema #2 from the / response property allOf list for the response status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the success response with the status

    • warning

      removed the optional property /// from the response with the status

    • warning

      removed the optional property /// from the response with the status

    • warning

      removed the optional property /// from the response with the status

    • warning

      removed the optional property /// from the response with the status

    • warning

      removed the optional property /// from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status