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"=>"EXACT_NEGATIVE", "value"=>"<string>", "bid"=>"<integer>"}, {"match_type"=>"EXACT_NEGATIVE", "value"=>"<string>", "bid"=>"<integer>"}], "parent_id"=>"753685324"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;errors&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;79806669572&quot;,&quot;parent_id&quot;:&quot;34&quot;,&quot;parent_type&quot;:&quot;incididunt et&quot;,&quot;type&quot;:&quot;non Duis&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;:null,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:true,&quot;id&quot;:&quot;30&quot;,&quot;parent_id&quot;:&quot;8816&quot;,&quot;parent_type&quot;:&quot;te&quot;,&quot;type&quot;:&quot;ea ut anim in&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;EXACT&quot;,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:true,&quot;id&quot;:&quot;17&quot;,&quot;parent_id&quot;:&quot;5953839018&quot;,&quot;parent_type&quot;:&quot;consequat&quot;,&quot;type&quot;:&quot;of&quot;,&quot;bid&quot;:&quot;\u003cinteger\u003e&quot;},{&quot;match_type&quot;:&quot;PHRASE_NEGATIVE&quot;,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:true,&quot;id&quot;:&quot;1475&quot;,&quot;parent_id&quot;:&quot;49518073&quot;,&quot;parent_type&quot;:&quot;sed pro&quot;,&quot;type&quot;:&quot;culpa&quot;,&quot;bid&quot;:&quot;\u003cinteger\u003e&quot;}]}