Create keywords

POST {{baseUrl}}/ad_accounts/:ad_account_id/keywords

Create keywords for 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." ] } } 

Rate limit: WRITE.

Request Body

{"keywords"=>[{"match_type"=>"PHRASE", "value"=>"<string>", "bid"=>"<integer>"}, {"match_type"=>"PHRASE_NEGATIVE", "value"=>"<string>", "bid"=>"<integer>"}], "parent_id"=>"AG59412"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;errors&quot;:[{&quot;data&quot;:{&quot;match_type&quot;:&quot;EXACT_NEGATIVE&quot;,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:false,&quot;id&quot;:&quot;3&quot;,&quot;parent_id&quot;:&quot;22946103286&quot;,&quot;parent_type&quot;:&quot;fugiat officia&quot;,&quot;type&quot;:&quot;adipisicing&quot;,&quot;bid&quot;:&quot;\u003cinteger\u003e&quot;},&quot;error_messages&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;]},{&quot;data&quot;:{&quot;match_type&quot;:&quot;PHRASE&quot;,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:false,&quot;id&quot;:&quot;9&quot;,&quot;parent_id&quot;:&quot;476530976&quot;,&quot;parent_type&quot;:&quot;nisi culpa magna nulla&quot;,&quot;type&quot;:&quot;exercitation magna&quot;,&quot;bid&quot;:&quot;\u003cinteger\u003e&quot;},&quot;error_messages&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;]}],&quot;keywords&quot;:[{&quot;match_type&quot;:&quot;PHRASE_NEGATIVE&quot;,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:false,&quot;id&quot;:&quot;583612&quot;,&quot;parent_id&quot;:&quot;8721232&quot;,&quot;parent_type&quot;:&quot;esse ea adipisicing tempor non&quot;,&quot;type&quot;:&quot;Duis exercitation&quot;,&quot;bid&quot;:&quot;\u003cinteger\u003e&quot;},{&quot;match_type&quot;:null,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:true,&quot;id&quot;:&quot;892841938&quot;,&quot;parent_id&quot;:&quot;4726366983&quot;,&quot;parent_type&quot;:&quot;dolor ut&quot;,&quot;type&quot;:&quot;quis veniam ullamco&quot;,&quot;bid&quot;:&quot;\u003cinteger\u003e&quot;}]}