Pinterest Pins API

The Pins API from Pinterest — 11 operation(s) for pins.

OpenAPI Specification

pinterest-pins-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 5.13.0
  title: Pinterest Pins API
  description: This is the description of your API.
  contact:
    name: Pinterest, Inc.
    url: https://developers.pinterest.com/
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://developers.pinterest.com/terms/
servers:
- url: https://api.pinterest.com/v5
tags:
- name: Pins
paths:
  /boards/{board_id}/pins:
    get:
      summary: List Pins on board
      description: 'Get a list of the Pins on a board owned by the "operation user_account" - or on a group board that has been shared with this account.

        - Optional: Business Access: Specify an ad_account_id to use the owner of that ad_account as the "operation user_account".

        - By default, the "operation user_account" is the token user_account.'
      tags:
      - Pins
      operationId: boards/list_pins
      security:
      - pinterest_oauth2:
        - boards:read
        - pins:read
      x-ratelimit-category: org_read
      x-sandbox: enabled
      parameters:
      - $ref: '#/components/parameters/path_board_id'
      - $ref: '#/components/parameters/query_bookmark'
      - $ref: '#/components/parameters/query_page_size'
      - $ref: '#/components/parameters/query_creative_types'
      - $ref: '#/components/parameters/query_ad_account_id'
      - $ref: '#/components/parameters/query_pin_metrics'
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Paginated'
                - type: object
                  properties:
                    items:
                      description: Pins
                      items:
                        $ref: '#/components/schemas/Pin'
        '404':
          description: Board not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 404
                message: Board not found.
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /boards/{board_id}/sections/{section_id}/pins:
    get:
      summary: List Pins on board section
      description: 'Get a list of the Pins on a board section of a board owned by the "operation user_account" - or on a group board that has been shared with this account.

        Optional: Business Access: Specify an ad_account_id to use the owner of that ad_account as the "operation user_account".

        - By default, the "operation user_account" is the token user_account.'
      tags:
      - Pins
      operationId: board_sections/list_pins
      security:
      - pinterest_oauth2:
        - boards:read
        - pins:read
      x-ratelimit-category: org_read
      x-sandbox: enabled
      parameters:
      - $ref: '#/components/parameters/path_board_id'
      - $ref: '#/components/parameters/path_board_section_id'
      - $ref: '#/components/parameters/query_ad_account_id'
      - $ref: '#/components/parameters/query_bookmark'
      - $ref: '#/components/parameters/query_page_size'
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Paginated'
                - type: object
                  properties:
                    items:
                      description: Pins
                      items:
                        $ref: '#/components/schemas/Pin'
        '403':
          description: Not authorized to access Pins on board section.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 403
                message: Not authorized to access Pins on board section.
        '404':
          description: Board or section not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 404
                message: Board or section not found.
        '409':
          description: Board section conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 409
                message: Board section conflict.
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pins:
    get:
      summary: List Pins
      description: "Get a list of the Pins owned by the \"operation user_account\".\n  - By default, the \"operation user_account\" is the token user_account.\n  - All Pins owned by the \"operation user_account\" are included, regardless of who owns the board they are on.\nOptional: Business Access: Specify an ad_account_id to use the owner of that ad_account as the \"operation user_account\".\n\nDisclaimer: there are known performance issues when filtering by field <code>creative_type</code> and including protected pins. If your\nrequest is timing out in this scenario we encourage you to use <a href='/docs/api/v5/#operation/boards/list_pins'>GET List Pins on Board</a>."
      operationId: pins/list
      security:
      - pinterest_oauth2:
        - boards:read
        - pins:read
      x-ratelimit-category: org_read
      x-sandbox: enabled
      x-codeSamples:
      - lang: cURL
        label: curl
        source: 'curl --location --request GET ''https://api.pinterest.com/v5/pins'' \

          --header ''Authorization: Bearer <Add your token here>'' \

          --header ''Content-Type: application/json''

          '
      - lang: cURL
        label: curl (Sandbox)
        source: 'curl --location --request GET ''https://api-sandbox.pinterest.com/v5/pins'' \

          --header ''Authorization: Bearer <Add your token here>'' \

          --header ''Content-Type: application/json''

          '
      parameters:
      - $ref: '#/components/parameters/query_bookmark'
      - $ref: '#/components/parameters/query_page_size'
      - $ref: '#/components/parameters/query_pin_filter'
      - $ref: '#/components/parameters/query_include_protected_pins'
      - $ref: '#/components/parameters/query_pin_type'
      - $ref: '#/components/parameters/query_creative_types'
      - $ref: '#/components/parameters/query_ad_account_id'
      - $ref: '#/components/parameters/query_pin_metrics'
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Paginated'
                - type: object
                  properties:
                    items:
                      type: array
                      items:
                        $ref: '#/components/schemas/Pin'
          description: Success
        '400':
          description: Invalid pin filter value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 400
                message: Invalid pin filter value
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Pins
    post:
      summary: Create Pin
      description: 'Create a Pin on a board or board section owned by the "operation user_account".


        Note: If the current "operation user_account" (defined by the access token) has access to another user''s Ad Accounts via Pinterest Business Access, you can modify your request to make use of the current operation_user_account''s permissions to those Ad Accounts by including the ad_account_id in the path parameters for the request (e.g. .../?ad_account_id=12345&...).


        - This function is intended solely for publishing new content created by the user. If you are interested in saving content created by others to your Pinterest boards, sometimes called ''curated content'', please use our <a href=''/docs/add-ons/save-button''>Save button</a> instead. For more tips on creating fresh content for Pinterest, review our <a href=''/docs/content/content-creation/''>Content App Solutions Guide</a>.


        <strong><a href=''/docs/content/content-creation/#Creating%20video%20Pins''>Learn more</a></strong> about video Pin creation.'
      tags:
      - Pins
      operationId: pins/create
      security:
      - pinterest_oauth2:
        - boards:read
        - boards:write
        - pins:read
        - pins:write
      x-ratelimit-category: org_write
      x-sandbox: enabled
      x-codeSamples:
      - lang: python
        label: Python SDK
        source: "# Follow this link for initial setup: https://github.com/pinterest/pinterest-python-sdk#getting-started\n\nfrom pinterest.organic.pins import Pin\n# Board information can be fetched from profile page or from create/list board method here:\n# https://developers.pinterest.com/docs/api/v5/#operation/boards/list\nBOARD_ID=\"<Add your board id here>\"\n\npin_create = Pin.create(\n  board_id=BOARD_ID,\n  title=\"My Pin\",\n  description=\"Pin Description\",\n  media_source={\n      \"source_type\": \"image_url\",\n      \"content_type\": \"image/jpeg\",\n      \"data\": \"string\",\n      'url':'https://i.pinimg.com/564x/28/75/e9/2875e94f8055227e72d514b837adb271.jpg'\n      }\n  )\nprint(\"Pin Id: %s, Pin Title:%s\" %(pin_create.id, pin_create.title))\n"
      - lang: cURL
        label: curl
        source: "# Board information can be fetched from profile page or from create/list board method here:\n# https://developers.pinterest.com/docs/api/v5/#operation/boards/list\n\ncurl --location --request POST 'https://api.pinterest.com/v5/pins' \\\n--header 'Authorization: Bearer <Add your token here>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n      \"title\": \"My Pin\",\n      \"description\": \"Pin Description\",\n      \"board_id\": \"<insert_your_board_id>,\n      \"media_source\": {\n        \"source_type\": \"image_url\",\n        \"url\": \"https://i.pinimg.com/564x/28/75/e9/2875e94f8055227e72d514b837adb271.jpg\"\n      }\n  }'\n"
      - lang: cURL
        label: curl (Sandbox)
        source: "# Board information can be fetched from profile page or from create/list board method here:\n# https://developers.pinterest.com/docs/api/v5/#operation/boards/list\n\ncurl --location --request POST 'https://api-sandbox.pinterest.com/v5/pins' \\\n--header 'Authorization: Bearer <Add your token here>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n      \"title\": \"My Pin\",\n      \"description\": \"Pin Description\",\n      \"board_id\": \"<insert_your_sandbox_board_id>,\n      \"media_source\": {\n        \"source_type\": \"image_url\",\n        \"url\": \"https://i.pinimg.com/564x/28/75/e9/2875e94f8055227e72d514b837adb271.jpg\"\n      }\n  }'\n"
      parameters:
      - $ref: '#/components/parameters/query_ad_account_id'
      requestBody:
        description: Create a new Pin.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PinCreate'
      responses:
        '201':
          description: Successful pin creation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pin'
        '400':
          description: Invalid Pin parameters response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InvalidPinUrl:
                  value:
                    code: 1
                    message: Whoops! It looks like you entered an invalid URL. Try creating a Pin again with a valid URL.
        '403':
          description: The Pin's image is too small, too large or is broken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                PinImageTooSmall:
                  value:
                    code: 233
                    message: Your image is too small. Please choose a larger image and try again.
                PinImageBroken:
                  value:
                    code: 235
                    message: Sorry, this image is broken. Please pick a different image.
        '404':
          description: Board or section not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                BoardNotFound:
                  value:
                    code: 40
                    message: Board not found.
                BoardSectionNotFound:
                  value:
                    code: 2031
                    message: Sorry! We couldn't find this board section.
        '429':
          description: 'This request exceeded a rate limit. This can happen if the client exceeds one

            of the published rate limits or if multiple write operations are applied to

            an object within a short time window.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 8
                message: 'This request exceeded a rate limit. This can happen if the client exceeds one

                  of the published rate limits or if multiple write operations are applied to

                  an object within a short time window.'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pins/{pin_id}:
    get:
      summary: Get Pin
      description: 'Get a Pin owned by the "operation user_account" - or on a group board that has been shared with this account.

        - By default, the "operation user_account" is the token user_account.


        Optional: Business Access: Specify an <code>ad_account_id</code> (obtained via <a href=''/docs/api/v5/#operation/ad_accounts/list''>List ad accounts</a>) to use the owner of that ad_account as the "operation user_account". In order to do this, the token user_account must have one of the following <a href="https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts">Business Access</a> roles on the ad_account:


        - For Pins on public or protected boards: Owner, Admin, Analyst, Campaign Manager.

        - For Pins on secret boards: Owner, Admin.'
      tags:
      - Pins
      operationId: pins/get
      security:
      - pinterest_oauth2:
        - boards:read
        - pins:read
      x-ratelimit-category: org_read
      x-sandbox: enabled
      x-codeSamples:
      - lang: python
        label: Python SDK
        source: '# Follow this link for initial setup: https://github.com/pinterest/pinterest-python-sdk#getting-started


          from pinterest.organic.pins import Pin

          # Pin information can be fetched from profile page or from list pin method here:

          # https://developers.pinterest.com/docs/api/v5/#operation/pins/list

          PIN_ID="<Add your pin id here>"


          pin_get = Pin(pin_id=PIN_ID)

          print("Pin Id: %s, Pin Title:%s" %(pin_get.id, pin_get.title))

          '
      - lang: cURL
        label: curl
        source: '# Pin information can be fetched from profile page or from list pin method here:

          # https://developers.pinterest.com/docs/api/v5/#operation/pins/list


          curl --location --request GET ''https://api.pinterest.com/v5/pins/<insert_pin_id>'' \

          --header ''Authorization: Bearer <Add your token here>'' \

          --header ''Content-Type: application/json''

          '
      - lang: cURL
        label: curl (Sandbox)
        source: '# Pin information can be fetched from profile page or from list pin method here:

          # https://developers.pinterest.com/docs/api/v5/#operation/pins/list


          curl --location --request GET ''https://api-sandbox.pinterest.com/v5/pins/<insert_sandbox_pin_id>'' \

          --header ''Authorization: Bearer <Add your token here>'' \

          --header ''Content-Type: application/json''

          '
      parameters:
      - $ref: '#/components/parameters/path_pin_id'
      - $ref: '#/components/parameters/query_pin_metrics'
      - $ref: '#/components/parameters/query_ad_account_id'
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pin'
        '403':
          description: Not authorized to access board or Pin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 29
                message: You are not permitted to access that resource.
        '404':
          description: Pin not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 50
                message: Pin not found.
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Delete Pin
      description: 'Delete a Pins owned by the "operation user_account" - or on a group board that has been shared with this account.

        - By default, the "operation user_account" is the token user_account.


        Optional: Business Access: Specify an <code>ad_account_id</code> (obtained via <a href=''/docs/api/v5/#operation/ad_accounts/list''>List ad accounts</a>) to use the owner of that ad_account as the "operation user_account". In order to do this, the token user_account must have one of the following <a href="https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts">Business Access</a> roles on the ad_account:


        - For Pins on public or protected boards: Owner, Admin, Analyst, Campaign Manager.

        - For Pins on secret boards: Owner, Admin.'
      tags:
      - Pins
      operationId: pins/delete
      security:
      - pinterest_oauth2:
        - boards:read
        - boards:write
        - pins:read
        - pins:write
      x-ratelimit-category: org_write
      x-sandbox: enabled
      x-codeSamples:
      - lang: python
        label: Python SDK
        source: '# Follow this link for initial setup: https://github.com/pinterest/pinterest-python-sdk#getting-started


          from pinterest.organic.pins import Pin

          # Pin information can be fetched from profile page or from create/list pin method here:

          # https://developers.pinterest.com/docs/api/v5/#operation/pins/list

          PIN_ID="<Add your pin id here>"


          pin_delete=Pin.delete(pin_id=PIN_ID)


          print("Pin was deleted? %s" % (pin_delete))

          '
      - lang: cURL
        label: curl
        source: '# Pin information can be fetched from profile page or from create/list pin method here:

          # https://developers.pinterest.com/docs/api/v5/#operation/pins/list


          curl --request DELETE ''https://api.pinterest.com/v5/pins/<insert_pin_id>'' \

          --header ''Authorization: Bearer <Add your token here>'' \

          --header ''Content-Type: application/json''

          '
      - lang: cURL
        label: curl (Sandbox)
        source: '# Pin information can be fetched from profile page or from create/list pin method here:

          # https://developers.pinterest.com/docs/api/v5/#operation/pins/list


          curl --request DELETE ''https://api-sandbox.pinterest.com/v5/pins/<insert_sandbox_pin_id>'' \

          --header ''Authorization: Bearer <Add your token here>'' \

          --header ''Content-Type: application/json''

          '
      parameters:
      - $ref: '#/components/parameters/path_pin_id'
      - $ref: '#/components/parameters/query_ad_account_id'
      responses:
        '204':
          description: Successfully deleted Pin
        '403':
          description: Not authorized to access board or Pin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 403
                message: Not authorized to access board or Pin.
        '404':
          description: Pin not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 404
                message: Pin not found.
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update Pin
      description: 'Update a pin owned by the "operating user_account".

        - By default, the "operation user_account" is the token user_account.


        Optional: Business Access: Specify an <code>ad_account_id</code> (obtained via <a href=''/docs/api/v5/#operation/ad_accounts/list''>List ad accounts</a>) to use the owner of that ad_account as the "operation user_account". In order to do this, the token user_account must have one of the following <a href="https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts">Business Access</a> roles on the ad_account:


        - For Pins on public or protected boards: Owner, Admin, Analyst, Campaign Manager.

        - For Pins on secret boards: Owner, Admin.


        <strong>This endpoint is currently in beta and not available to all apps. <a href=''/docs/new/about-beta-access/''>Learn more</a>.</strong>'
      tags:
      - Pins
      operationId: pins/update
      security:
      - pinterest_oauth2:
        - boards:read
        - boards:write
        - pins:read
        - pins:write
      x-ratelimit-category: org_write
      x-sandbox: enabled
      x-codeSamples:
      - lang: cURL
        label: curl
        source: "# Pin information can be fetched from profile page or from create/list pin method here:\n# https://developers.pinterest.com/docs/api/v5/#operation/pins/list\n\ncurl --location --request PATCH 'https://api.pinterest.com/v5/pins/<insert_pin_id>' \\\n--header 'Authorization: Bearer <Add your token here>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"title\": \"My updated Pin title\"\n}'\n"
      - lang: cURL
        label: curl (Sandbox)
        source: "# Pin information can be fetched from profile page or from create/list pin method here:\n# https://developers.pinterest.com/docs/api/v5/#operation/pins/list\n\ncurl --location --request GET 'https://api-sandbox.pinterest.com/v5/pins/<insert_sandbox_pin_id>' \\\n--header 'Authorization: Bearer <Add your token here>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"title\": \"My updated Pin title\"\n}'\n"
      parameters:
      - $ref: '#/components/parameters/path_pin_id'
      - $ref: '#/components/parameters/query_ad_account_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PinUpdate'
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pin'
        '403':
          description: Not authorized to update Pin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 29
                message: Not authorized to update Pin.
        '404':
          description: Pin not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 50
                message: Pin not found.
        '429':
          description: 'This request exceeded a rate limit. This can happen if the client exceeds one

            of the published rate limits or if multiple write operations are applied to

            an object within a short time window.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 8
                message: 'This request exceeded a rate limit. This can happen if the client exceeds one

                  of the published rate limits or if multiple write operations are applied to

                  an object within a short time window.'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pins/{pin_id}/analytics:
    get:
      summary: Get Pin analytics
      description: 'Get analytics for a Pin owned by the "operation user_account" - or on a group board that has been shared with this account.

        - By default, the "operation user_account" is the token user_account.


        Optional: Business Access: Specify an <code>ad_account_id</code> (obtained via <a href="https://developers.pinterest.com/docs/api/v5/#operation/ad_accounts/list">List ad accounts</a>) to use the owner of that ad_account as the "operation user_account". In order to do this, the token user_account must have one of the following <a href="https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts">Business Access</a> roles on the ad_account:


        - For Pins on public or protected boards: Admin, Analyst.

        - For Pins on secret boards: Admin.


        If Pin was created before <code>2023-03-20</code> lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then.'
      tags:
      - Pins
      operationId: pins/analytics
      security:
      - pinterest_oauth2:
        - boards:read
        - pins:read
      x-ratelimit-category: org_analytics
      x-sandbox: disabled
      parameters:
      - $ref: '#/components/parameters/path_pin_id'
      - $ref: '#/components/parameters/query_start_date'
      - $ref: '#/components/parameters/query_end_date'
      - $ref: '#/components/parameters/query_app_types'
      - $ref: '#/components/parameters/query_pin_analytics_metric_types'
      - $ref: '#/components/parameters/query_split_field_pins'
      - $ref: '#/components/parameters/query_ad_account_id'
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PinAnalyticsResponse'
        '400':
          description: Invalid pins analytics parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 400
                message: Invalid pins analytics parameters.
        '403':
          description: Not authorized to access board or Pin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 403
                message: Not authorized to access board or Pin.
        '404':
          description: Pin not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 404
                message: Pin not found.
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /pins/analytics:
    get:
      summary: Get multiple Pin analytics
      description: '<strong>This endpoint is currently in beta and not available to all apps. <a href=''/docs/new/about-beta-access/''>Learn more</a>.</strong>


        Get analytics for multiple pins owned by the "operation user_account" - or on a group board that has been shared with this account.

        - The maximum number of pins supported in a single request is 100.

        - By default, the "operation user_account" is the token user_account.


        Optional: Business Access: Specify an <code>ad_account_id</code> (obtained via <a href="https://developers.pinterest.com/docs/api/v5/#operation/ad_accounts/list">List ad accounts</a>) to use the owner of that ad_account as the "operation user_account". In order to do this, the token user_account must have one of the following <a href="https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts">Business Access</a> roles on the ad_account:


        - For Pins on public or protected boards: Admin, Analyst.

        - For Pins on secret boards: Admin.


        If Pin was created before <code>2023-03-20</code> lifetime metrics will only be available for Video and Idea Pin formats. Lifetime metrics are available for all Pin formats since then.'
      tags:
      - Pins
      operationId: multi_pins/analytics
      security:
      - pinterest_oauth2:
        - boards:read
        - pins:read
      x-ratelimit-category: org_analytics
      x-sandbox: disabled
      parameters:
      - name: pin_ids
        description: List of Pin IDs.
        in: query
        schema:
          type: array
          items:
            type: string
            pattern: ^\d+$
          minItems: 1
          maxItems: 100
      - $ref: '#/components/parameters/query_start_date'
      - $ref: '#/components/parameters/query_end_date'
      - $ref: '#/components/parameters/query_app_types'
      - description: Pin metric types to get data for.
        explode: false
        in: query
        name: metric_types
        required: true
        schema:
          type: array
          items:
            oneOf:
            - description: Standard Pin metric types
              type: string
              enum:
              - IMPRESSION
              - OUTBOUND_CLICK
              - PIN_CLICK
              - SAVE
              - SAVE_RATE
              - TOTAL_COMMENTS
              - TOTAL_REACTIONS
            - description: Video Pin metric types
              type: string
              enum:
              - IMPRESSION
              - OUTBOUND_CLICK
              - PIN_CLICK
              - SAVE
              - SAVE_RATE
              - VIDEO_MRC_VIEW
              - VIDEO_10S_VIEW
              - QUARTILE_95_PERCENT_VIEW
              - VIDEO_V50_WATCH_TIME
              - VIDEO_START
              - VIDEO_AVG_WATCH_TIME
              - TOTAL_COMMENTS
              - TOTAL_REACTIONS
        style: form
      - $ref: '#/components/parameters/query_ad_account_id'
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkPinAnalyticsResponse'
        '400':
          description: Invalid pins analytics parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 1
                message: Invalid multi_pins analytics parameters.
        '401':
          description: Not authorized to access board or Pin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 7
                message: Not authorized to access board or Pin.
        '404':
          description: Pin not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 50
                message: Pin not found.
        '429':
          description: 'This request exceeded a rate limit. This can happen if the client exceeds one

            of the published rate limits

# --- truncated at 32 KB (79 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/pinterest/refs/heads/main/openapi/pinterest-pins-api-openapi.yml