media

Register media upload

Register your intent to upload media.

The response includes all of the information needed to upload the media to Pinterest.

To upload the media, make an HTTP POST request (using curl, for example) to upload_url using the Content-Type header value. Send the media file's contents as the request's file parameter and also include all of the parameters from upload_parameters.

Learn more about video Pin creation.

post/media

Request body

media_type'video' required

Response

The request has succeeded.

media_idstring required

Unique identifier for this media upload. Used to track status and for attaching during Pin creation.

media_type'video' required
upload_urlstring

The URL where you will POST your media file.

Example response

{
  "media_id": "12345",
  "upload_parameters": {
    "Content-Type": "multipart/form-data",
    "key": "uploads/11/aa/22/3:video:203014033110991560:5212123920968240771",
    "policy": "eyJleHBpcmF0aW9uIjoiMj..==",
    "x-amz-algorithm": "AWS4-HMAC-SHA256",
    "x-amz-credential": "ASIA6QZJ64OPIKV7FRVX/20220127/us-east-1/s3/aws4_request",
    "x-amz-date": "20220127T185143Z",
    "x-amz-security-token": "IQoJb3JpZ2luX2VjEJr...==",
    "x-amz-signature": "fcd6309a6aaee213348666a72abed8b44552a43acb6b340e8e1b288d21a5fe92"
  },
  "upload_url": "https://pinterest-media-upload.s3-accelerate.amazonaws.com/"
}

Changes

Changed in 3 of the 29 revisions of this API.213

  • v514c297539b64112See the full diff
    • the media_type request property type/format changed from string/ to /

      request-property-type-changed

    • the request required property media_type became not write-only

      request-required-property-became-not-write-only

    • removed subschema #1 from the response body allOf list for the response status 201

      response-body-all-of-removed

    • added the non-success response with the status 400

      response-non-success-status-added

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the non-success response with the status 403

      response-non-success-status-added

    • added the non-success response with the status 404

      response-non-success-status-added

    • added the non-success response with the status 429

      response-non-success-status-added

    • added the optional property upload_parameters to the response with the 201 status

      response-optional-property-added

    • added the optional property upload_url to the response with the 201 status

      response-optional-property-added

    • added the required property media_id to the response with the 201 status

      response-required-property-added

    • added the required property media_type to the response with the 201 status

      response-required-property-added

    • added the success response with the status 200

      response-success-status-added

    This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the response's body type/format changed from / to object/ for status 201

      response-body-type-changed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added