> ## Documentation Index
> Fetch the complete documentation index at: https://hc.starbridge.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Buyer File Download Links

> Returns 1-hour signed download URLs for a single buyer file: the original file (in its native format — PDF, DOCX, VTT, etc.) and the parsed-markdown rendering.

Use `fileId` from `researchBuyerFiles` (per-file IDs in `buyerFiles[].id`). Prefer `viewFileContents` for token-bounded markdown; use this tool only when you need the raw bytes (e.g., to render a PDF for the user, hand off to a parser, or attach the original to an email).

**WARNING — both files may be very large.** Original PDFs are commonly multi-megabyte; parsed markdown is usually smaller but neither size is bounded. Do NOT fetch either link and inline its contents into your context. For text, use `viewFileContents` (token-bounded). To show a file to the user, hand them the URL directly.

Response fields:
- `originalLink` — 1h signed URL to the original file. May be very large; see the warning above.
- `markdownLink` — 1h signed URL to the parsed-markdown rendering, or `null` if the file is not yet processed (e.g., status != Processed). May also be very large; see the warning above.
- `originalSizeBytes` — size of the original blob in bytes. May be null for older files. Use this to decide whether to fetch.
- `contentType` — MIME type of the original (e.g., `application/pdf`, `text/vtt`).
- `type` — buyer-file classification (`Rfp`, `Contract`, `PurchaseOrder`, `BoardMeeting`, `StrategicPlan`, `Other`, …); `null` if not yet detected.
- `originalName` — original file name as uploaded or scraped. For scraped sources this is often a URL-encoded source path (e.g., `https_www_youtube_com_watch_v_xyz.vtt`) — do NOT surface it to the user as-is.

Links expire in 1 hour. Returns 404 if no buyer file with the given id exists.



## OpenAPI

````yaml https://core-http2-157602306522.us-central1.run.app/external/public/swagger/documentation.yaml get /api/external/buyer/file/{fileId}/download-links
openapi: 3.1.1
info:
  title: Starbridge External Public API
  version: '1.0'
servers:
  - url: https://dashboard.starbridge.ai
security: []
paths:
  /api/external/buyer/file/{fileId}/download-links:
    get:
      tags:
        - External MCP
        - External API
        - Buyer
      summary: Get Buyer File Download Links
      description: >-
        Returns 1-hour signed download URLs for a single buyer file: the
        original file (in its native format — PDF, DOCX, VTT, etc.) and the
        parsed-markdown rendering.


        Use `fileId` from `researchBuyerFiles` (per-file IDs in
        `buyerFiles[].id`). Prefer `viewFileContents` for token-bounded
        markdown; use this tool only when you need the raw bytes (e.g., to
        render a PDF for the user, hand off to a parser, or attach the original
        to an email).


        **WARNING — both files may be very large.** Original PDFs are commonly
        multi-megabyte; parsed markdown is usually smaller but neither size is
        bounded. Do NOT fetch either link and inline its contents into your
        context. For text, use `viewFileContents` (token-bounded). To show a
        file to the user, hand them the URL directly.


        Response fields:

        - `originalLink` — 1h signed URL to the original file. May be very
        large; see the warning above.

        - `markdownLink` — 1h signed URL to the parsed-markdown rendering, or
        `null` if the file is not yet processed (e.g., status != Processed). May
        also be very large; see the warning above.

        - `originalSizeBytes` — size of the original blob in bytes. May be null
        for older files. Use this to decide whether to fetch.

        - `contentType` — MIME type of the original (e.g., `application/pdf`,
        `text/vtt`).

        - `type` — buyer-file classification (`Rfp`, `Contract`,
        `PurchaseOrder`, `BoardMeeting`, `StrategicPlan`, `Other`, …); `null` if
        not yet detected.

        - `originalName` — original file name as uploaded or scraped. For
        scraped sources this is often a URL-encoded source path (e.g.,
        `https_www_youtube_com_watch_v_xyz.vtt`) — do NOT surface it to the user
        as-is.


        Links expire in 1 hour. Returns 404 if no buyer file with the given id
        exists.
      operationId: getFileDownloadLinks
      parameters:
        - name: fileId
          in: path
          description: Buyer file ID, from `researchBuyerFiles`.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Signed download links and metadata for the requested buyer file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuyerFileDownloadLinks'
        '400':
          description: Invalid request body or format
        '401':
          description: Missing or invalid authentication
        '403':
          description: Unauthorized to access resource or perform action
        '404':
          description: Resource not found
        '415':
          description: Unsupported media type or request body format
        '429':
          description: Rate limit exceeded
        '500':
          description: Internal server error
      security:
        - apiKey: []
components:
  schemas:
    BuyerFileDownloadLinks:
      type: object
      title: BuyerFileDownloadLinks
      required:
        - id
        - contentType
        - originalLink
      properties:
        id:
          type: string
          description: Unique identifier of the buyer file.
          format: uuid
        originalName:
          type:
            - string
            - 'null'
          description: >-
            Original file name as uploaded or scraped. For scraped sources this
            is often a URL-encoded source path (e.g.,
            `https_www_youtube_com_watch_v_xyz.vtt`) — do NOT surface it to the
            user as-is.
        contentType:
          type: string
          description: >-
            MIME type of the original file (e.g., `application/pdf`,
            `text/vtt`).
        type:
          type:
            - string
            - 'null'
          description: >-
            Buyer-file classification (Rfp, Contract, PurchaseOrder,
            BoardMeeting, StrategicPlan, Other, …). Null if the type has not
            been detected yet.
          enum:
            - Rfp
            - RfpProposal
            - Contract
            - PurchaseOrder
            - VendorList
            - BoardMeeting
            - BoardMeetingAgenda
            - BoardMeetingAgendaPacket
            - StrategicPlan
            - CapitalImprovementPlan
            - AnnualFinancialReport
            - ProposedBudget
            - Budget
            - BudgetAmendment
            - CurriculumAdoptionSchedule
            - Other
        originalSizeBytes:
          type:
            - integer
            - 'null'
          description: >-
            Size of the original file in bytes. May be null for older files
            where size was not recorded. Use this to decide whether the file is
            too large to fetch.
        originalLink:
          type: string
          description: >-
            1-hour signed URL to the original file. WARNING: this file may be
            very large (multi-megabyte PDFs are common) and is not size-bounded.
            Do NOT fetch and inline its contents into your context — use
            `viewFileContents` for token-bounded text, or hand the URL to the
            user.
        markdownLink:
          type:
            - string
            - 'null'
          description: >-
            1-hour signed URL to the parsed-markdown rendering of the file, or
            null if the file is not yet processed. WARNING: markdown is
            typically smaller than the original but is also not size-bounded and
            may itself be very large. Do NOT fetch and inline its contents into
            your context — use `viewFileContents` for token-bounded text, or
            hand the URL to the user.
  securitySchemes:
    apiKey:
      scheme: bearer
      description: HTTP Bearer Authentication
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.