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

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;errors&quot;:[{&quot;data&quot;:{&quot;match_type&quot;:null,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:true,&quot;id&quot;:&quot;929110&quot;,&quot;parent_id&quot;:&quot;44473582300&quot;,&quot;parent_type&quot;:&quot;sunt com&quot;,&quot;type&quot;:&quot;Exc&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;EXACT&quot;,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:false,&quot;id&quot;:&quot;84834706&quot;,&quot;parent_id&quot;:&quot;16738674&quot;,&quot;parent_type&quot;:&quot;eu esse&quot;,&quot;type&quot;:&quot;proident mollit adipisicing aute&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&quot;,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:true,&quot;id&quot;:&quot;42591286&quot;,&quot;parent_id&quot;:&quot;411185&quot;,&quot;parent_type&quot;:&quot;laboris voluptate&quot;,&quot;type&quot;:&quot;ullamco ut Ut sed&quot;,&quot;bid&quot;:&quot;\u003cinteger\u003e&quot;},{&quot;match_type&quot;:&quot;EXACT_NEGATIVE&quot;,&quot;value&quot;:&quot;\u003cstring\u003e&quot;,&quot;archived&quot;:true,&quot;id&quot;:&quot;4207761&quot;,&quot;parent_id&quot;:&quot;6512145&quot;,&quot;parent_type&quot;:&quot;non dolore&quot;,&quot;type&quot;:&quot;dolore ut occaecat elit fugiat&quot;,&quot;bid&quot;:&quot;\u003cinteger\u003e&quot;}]}