media_library
Create asset(s)
Changed onCreate one or more media library assets for a business. Assets are reusable image or video creatives at the business level, not Pins. Use them later in ads without creating a Pin first.
Before creating a media library asset:
- Register the media upload.
- Upload the asset file to the Pinterest Media AWS bucket using the URL and metadata returned to you in the preceding step.
- Confirm the upload.
Get detailed steps for uploading assets.
You will use the media_id returned in the first step to create the media library asset in this endpoint.
A request with multiple assets succeeds if at least one asset is created, even if the others fail.
post/media_library/businesses/{business_id}/assets
Request
- Base URLhttps://api.pinterest.com/v5
- AuthOAuth 2Authorization codehttps://www.pinterest.com/oauth/Token URLhttps://api.pinterest.com/v5/oauth/tokenScopesads:write
Path parameters
business_idstring required
Identifier of the business that owns the media library.
Request body
Example request
{
"assets": [
{
"media_id": "12345",
"name": "test name",
"ad_account_id": "596736294873",
"tags": [
"lifestyle",
"fashion"
]
}
]
}Response
The request has succeeded.
Example response
{
"items": [
{
"error_code": "INTERNAL_ERROR",
"asset_id": "549755885175"
}
],
"success_count": 1,
"failure_count": 1
}Changes
- info
endpoint added
- info