Create audience
Changed onCreate a new audience for the ad account.
Request
- Base URLhttps://api.pinterest.com/v5
- AuthOAuth 2Authorization codehttps://www.pinterest.com/oauth/Token URLhttps://api.pinterest.com/v5/oauth/tokenScopesads:write
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Unique identifier of an ad account.
Request body
Example request
{
"audience_type": "ACTALIKE",
"rule": {
"event_data": {
"lead_type": "Newsletter",
"line_items": {
"product_brand": "Parker",
"product_category": "Shoes",
"product_id": 1414,
"product_name": "Parker Boots",
"product_price": "99.99",
"product_quantity": 2,
"product_variant": "Red",
"product_variant_id": "1414-34832"
},
"order_id": "X-151481",
"order_quantity": 1,
"page_name": "Our Favorite Pins on Pinterest",
"promo_code": "WINTER10",
"property": "Athleta",
"search_query": "boots",
"value": "199.98",
"video_title": "How to style your Parker Boots"
}
}
}Response
The request has succeeded.
Example response
{
"audience_type": "ACTALIKE",
"rule": {
"event_data": {
"lead_type": "Newsletter",
"line_items": {
"product_brand": "Parker",
"product_category": "Shoes",
"product_id": 1414,
"product_name": "Parker Boots",
"product_price": "99.99",
"product_quantity": 2,
"product_variant": "Red",
"product_variant_id": "1414-34832"
},
"order_id": "X-151481",
"order_quantity": 1,
"page_name": "Our Favorite Pins on Pinterest",
"promo_code": "WINTER10",
"property": "Athleta",
"search_query": "boots",
"value": "199.98",
"video_title": "How to style your Parker Boots"
}
}
}Changes
- breaking
response property
rule/percentagelist-of-types was widened by adding typesstringto media typeapplication/jsonof response200 - breaking
response property
rule/visitor_source_idlist-of-types was widened by adding typesarrayto media typeapplication/jsonof response200 - breaking
the
response's property type changed fromstringto no type for status - breaking
the
/response's property type changed fromarrayto no type for status - breaking
the
response's property type changed fromstringto no type for status - warning
removed
subschema #2: AudienceCreateRequestfrom the request bodyallOflist - warning
added the new
SALESenum value to the//response property for the response status - info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional 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
the response optional property
became read-only for the status - info
the response optional property
became read-only for the status - info
the response optional property
became read-only for the status - info
the response optional property
became read-only for the status - info
the response optional property
became read-only for the status - info
the response optional property
became read-only for the status - info
added to the
response propertyallOflist for the response status - info
added to the
response propertyallOflist for the response status - info
added
subschema #1subschema #2to the/response propertyanyOflist for the response status - info
the response property
became required for the status - info
the
//response's property pattern^\d+$was removed for the status - info
the
//response's property pattern^\d+$was removed for the status - info
the
//response's property pattern^\d+$was removed for the status - info
the
/response's property pattern^\d+$was removed for the status - info
added the success response with the status
- breaking
- breaking
added to the
///request propertyallOflist - breaking
added to the
///request propertyallOflist - breaking
removed the enum value
ARSof the request property/// - breaking
removed the enum value
AUDof the request property/// - breaking
removed the enum value
BRLof the request property/// - breaking
removed the enum value
CADof the request property/// - breaking
removed the enum value
CHFof the request property/// - breaking
removed the enum value
CLPof the request property/// - breaking
removed the enum value
COPof the request property/// - breaking
removed the enum value
CZKof the request property/// - breaking
removed the enum value
DKKof the request property/// - breaking
removed the enum value
EURof the request property/// - breaking
removed the enum value
GBPof the request property/// - breaking
removed the enum value
HKDof the request property/// - breaking
removed the enum value
HUFof the request property/// - breaking
removed the enum value
ILSof the request property/// - breaking
removed the enum value
INRof the request property/// - breaking
removed the enum value
JPYof the request property/// - breaking
removed the enum value
KRWof the request property/// - breaking
removed the enum value
MXNof the request property/// - breaking
removed the enum value
NOKof the request property/// - breaking
removed the enum value
NZDof the request property/// - breaking
removed the enum value
PLNof the request property/// - breaking
removed the enum value
RONof the request property/// - breaking
removed the enum value
SEKof the request property/// - breaking
removed the enum value
SGDof the request property/// - breaking
removed the enum value
TRYof the request property/// - breaking
removed the enum value
UNKof the request property/// - breaking
removed the enum value
USDof the request property/// - breaking
the
///request property type changed fromstringto no type - breaking
the
///request property type changed fromobjectto no type - breaking
the
//response's property type changed fromstringto no type for status - breaking
the
//response's property type changed fromobjectto no type for status - warning
removed the request property
//// - warning
removed the request property
//// - warning
removed the request property
//// - warning
removed the request property
//// - warning
removed the request property
//// - warning
removed the request property
//// - warning
removed the request property
//// - warning
removed the request property
//// - 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 to the
//response propertyallOflist for the response status - info
added to the
//response propertyallOflist for the response status - info
removed the
ARSenum value from the//response property for the response status - info
removed the
AUDenum value from the//response property for the response status - info
removed the
BRLenum value from the//response property for the response status - info
removed the
CADenum value from the//response property for the response status - info
removed the
CHFenum value from the//response property for the response status - info
removed the
CLPenum value from the//response property for the response status - info
removed the
COPenum value from the//response property for the response status - info
removed the
CZKenum value from the//response property for the response status - info
removed the
DKKenum value from the//response property for the response status - info
removed the
EURenum value from the//response property for the response status - info
removed the
GBPenum value from the//response property for the response status - info
removed the
HKDenum value from the//response property for the response status - info
removed the
HUFenum value from the//response property for the response status - info
removed the
ILSenum value from the//response property for the response status - info
removed the
INRenum value from the//response property for the response status - info
removed the
JPYenum value from the//response property for the response status - info
removed the
KRWenum value from the//response property for the response status - info
removed the
MXNenum value from the//response property for the response status - info
removed the
NOKenum value from the//response property for the response status - info
removed the
NZDenum value from the//response property for the response status - info
removed the
PLNenum value from the//response property for the response status - info
removed the
RONenum value from the//response property for the response status - info
removed the
SEKenum value from the//response property for the response status - info
removed the
SGDenum value from the//response property for the response status - info
removed the
TRYenum value from the//response property for the response status - info
removed the
UNKenum value from the//response property for the response status - info
removed the
USDenum value from the//response property for the response status
- breaking