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

# Batch Presigned URLs V2

> Generates temporary presigned URLs for multiple documents. Supports both external documents and RMS documents via the `search_type` parameter.

**Two modes:**
- **By document IDs** (RMS only): Pass `document_ids` to get presigned URLs for specific documents from search/analytics references.
- **By filters**: Pass `tickers`, `doc_type`, etc. to browse and get presigned URLs.

For platform API keys, pass `organization_id` to specify which org to query.

Generate temporary presigned URLs for multiple documents in a single request. Supports both external documents (filings, transcripts, news) and RMS documents, controlled by the `search_type` parameter.

## Search Type

| search\_type         | Source                                                     | Supported filters                                                                                      |
| -------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `external` (default) | External documents (filings, transcripts, IR slides, news) | `tickers`, `stock_ids`, `doc_type`, `doc_sub_type`, `fiscal_period`, `calendar_period`                 |
| `rms`                | RMS documents                                              | `tickers`, `stock_ids`, `doc_type`, `doc_sub_type`, `fiscal_period`, `calendar_period`, `document_ids` |

`document_ids` is RMS only — external does not support batch by IDs.

The valid values for `doc_type` and `doc_sub_type` differ by search\_type and by organization. Refer to your organization's specific documentation for available values.

## Quick Start

```bash External documents by ticker (default) theme={null}
curl --request GET \
  --url 'https://api.linqalpha.com/v2/documents/presigned_urls?tickers=AAPL&doc_type=earnings_call&per_page=20' \
  --header 'X-API-KEY: <api-key>'
```

```bash RMS documents by ticker theme={null}
curl --request GET \
  --url 'https://api.linqalpha.com/v2/documents/presigned_urls?search_type=rms&organization_id=<org-id>&tickers=MSFT&per_page=20' \
  --header 'X-API-KEY: <api-key>'
```

```bash RMS documents by IDs (from references) theme={null}
curl --request GET \
  --url 'https://api.linqalpha.com/v2/documents/presigned_urls?search_type=rms&organization_id=<org-id>&document_ids=<id1>&document_ids=<id2>' \
  --header 'X-API-KEY: <api-key>'
```

## Minimum Filter Requirements

* **external**: at least one of `tickers` or `stock_ids`
* **rms**: at least one of `tickers`, `stock_ids`, or `document_ids`

<Note>
  For platform API keys that access multiple organizations, pass `organization_id` to specify which org to query. If omitted, defaults to the API key's primary organization.
</Note>

<Note>
  Presigned URLs expire after approximately 1 hour. Generate new URLs when needed.
</Note>


## OpenAPI

````yaml GET /v2/documents/presigned_urls
openapi: 3.0.1
info:
  title: LinqAlpha API
  description: >-
    Linq helps finance professionals make informed decisions using
    Retrieval-Augmented Generation (RAG)-enhanced answers. By leveraging
    cutting-edge Large Language Models (LLM) and supplementary technology, Linq
    provides the most optimized responses based on your queries.
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.linqalpha.com
security:
  - ApiKeyAuth: []
tags:
  - name: Search
    description: Search and generate responses
  - name: Data
    description: Data retrieval and mapping
  - name: Feedback
    description: Conversation feedback
  - name: RMS
    description: Research Management System
  - name: Source Management
    description: Source batch and file management
  - name: MCP
    description: >-
      LinqAlpha MCP — Financial data tools for AI assistants via Model Context
      Protocol
  - name: Connectors
    description: Customer Connectors — customer-owned MCP connector management
  - name: Briefing
    description: Briefing Agent — automated market briefings with scheduling and delivery
  - name: Status
    description: Sync status — check organization, document, and container sync progress
paths:
  /v2/documents/presigned_urls:
    get:
      tags:
        - Data
      summary: Batch Presigned URLs V2
      description: >-
        Generates temporary presigned URLs for multiple documents. Supports both
        external documents and RMS documents via the `search_type` parameter.


        **Two modes:**

        - **By document IDs** (RMS only): Pass `document_ids` to get presigned
        URLs for specific documents from search/analytics references.

        - **By filters**: Pass `tickers`, `doc_type`, etc. to browse and get
        presigned URLs.


        For platform API keys, pass `organization_id` to specify which org to
        query.
      parameters:
        - name: search_type
          in: query
          description: >-
            Document source. `external` (default) returns external documents.
            `rms` returns documents from your Research Management System (RMS).
          required: false
          schema:
            type: string
            enum:
              - external
              - rms
            default: external
        - name: organization_id
          in: query
          description: >-
            Organization ID. Recommended for `search_type=rms` and required for
            platform API keys.
          required: false
          schema:
            type: string
        - name: tickers
          in: query
          description: >-
            Ticker symbol(s). Use multiple params for multiple tickers (e.g.,
            `?tickers=AAPL&tickers=MSFT`).
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: stock_ids
          in: query
          description: Stock ID(s). Can be used instead of or together with tickers.
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: document_ids
          in: query
          description: >-
            Document ID(s) for batch lookup. **RMS only** — not supported for
            `search_type=external`.
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: doc_type
          in: query
          description: >-
            Document type filter. Valid values differ by `search_type` and
            organization.
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: doc_sub_type
          in: query
          description: >-
            Document sub-type filter. Valid values differ by `search_type` and
            organization.
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: fiscal_period
          in: query
          description: >-
            Fiscal period filter. Use nested notation:
            `fiscal_period[start_time][year]=2024&fiscal_period[start_time][quarter]=1`.
          required: false
          style: deepObject
          explode: true
          schema:
            type: object
            properties:
              start_time:
                type: object
                properties:
                  year:
                    type: integer
                    example: 2024
                  quarter:
                    type: integer
                    minimum: 1
                    maximum: 4
                    example: 1
              end_time:
                type: object
                properties:
                  year:
                    type: integer
                    example: 2025
                  quarter:
                    type: integer
                    minimum: 1
                    maximum: 4
                    example: 4
        - name: calendar_period
          in: query
          description: >-
            Calendar period filter. Use nested notation:
            `calendar_period[start_time][year]=2025&calendar_period[start_time][month]=1`.
          required: false
          style: deepObject
          explode: true
          schema:
            type: object
            properties:
              start_time:
                type: object
                properties:
                  year:
                    type: integer
                    example: 2025
                  month:
                    type: integer
                    minimum: 1
                    maximum: 12
                    example: 1
                  day:
                    type: integer
                    minimum: 1
                    maximum: 31
                    example: 1
              end_time:
                type: object
                properties:
                  year:
                    type: integer
                    example: 2025
                  month:
                    type: integer
                    minimum: 1
                    maximum: 12
                    example: 12
                  day:
                    type: integer
                    minimum: 1
                    maximum: 31
                    example: 31
        - name: page
          in: query
          description: 'Page number (default: 1)'
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: per_page
          in: query
          description: 'Results per page (default: 20, max: 200)'
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 20
      responses:
        '200':
          description: Batch presigned URLs with document metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    nullable: true
                  payload:
                    type: object
                    properties:
                      documents:
                        type: array
                        items:
                          type: object
                          properties:
                            document_id:
                              type: string
                              description: Document ID
                            document_name:
                              type: string
                              nullable: true
                              description: Document filename
                            ticker:
                              type: string
                              nullable: true
                              description: Primary ticker
                            doc_type:
                              type: string
                              nullable: true
                              description: Document type
                            doc_sub_type:
                              type: string
                              nullable: true
                              description: Document sub-type
                            source:
                              type: string
                              nullable: true
                              description: Source type (RMS only, e.g. thirdBridge)
                            fiscal_date:
                              type: string
                              nullable: true
                              description: Fiscal period
                            calendar_date:
                              type: string
                              nullable: true
                              description: Calendar date
                            published_at:
                              type: string
                              nullable: true
                              description: Publication date
                            presigned_url:
                              type: string
                              description: Temporary download URL
                            expiration_seconds:
                              type: integer
                              nullable: true
                              description: URL validity. 3600 for RMS, null for external.
                      total_count:
                        type: integer
                        description: Total matching documents
                      page:
                        type: integer
                        description: Current page
                      per_page:
                        type: integer
                        description: Results per page
                      has_more:
                        type: boolean
                        description: Whether more pages exist
                      skipped_count:
                        type: integer
                        description: Documents without downloadable files
              example:
                error: null
                payload:
                  documents:
                    - document_id: 123e4567-e89b-12d3-a456-426614174000
                      document_name: document.pdf
                      ticker: AAPL
                      doc_type: filing
                      doc_sub_type: 10-K
                      source: null
                      fiscal_date: '2025-12-31'
                      calendar_date: '2026-01-30'
                      published_at: '2026-01-30T16:00:00Z'
                      presigned_url: https://example.s3.amazonaws.com/...
                      expiration_seconds: null
                  total_count: 8234
                  page: 1
                  per_page: 20
                  has_more: true
                  skipped_count: 0
        '400':
          description: Bad Request - Missing required filters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                error:
                  code: INVALID_REQUEST_BODY
                  msg: >-
                    At least one of tickers, stock_ids, or document_ids is
                    required for rms search
                  message: >-
                    At least one of tickers, stock_ids, or document_ids is
                    required for rms search
                payload: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    ApiErrorResponse:
      type: object
      description: Standard error response wrapper
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
        payload:
          description: Always null for error responses
          nullable: true
      required:
        - error
        - payload
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: >-
            Error code indicating the type of error. Common codes:

            - Authentication: `API_KEY_MISSING`, `INVALID_API_KEY`

            - Validation: `INVALID_REQUEST_BODY`, `ORGANIZATION_ID_MISSING`,
            `TICKERS_MISSING`, `CHAT_MESSAGE_ID_MISSING`, `DOCUMENT_ID_MISSING`

            - Service: `SEARCH_FAIL`, `TTS_FAIL`, `CREATE_CONV_FAIL`,
            `GET_STOCK_FAIL`, `CREATE_MSG_FAIL`, `ALPHA_COMP_FAIL`,
            `GET_REF_FAIL`

            - Connectors: `CONNECTOR_LIST_FAIL`, `CONNECTOR_NOT_FOUND`,
            `CONNECTOR_CREATE_FAIL`, `CONNECTOR_UPDATE_FAIL`,
            `CONNECTOR_DELETE_FAIL`, `CONNECTOR_TEST_FAIL`

            - Not Found: `NOT_FOUND`
          example: INVALID_REQUEST_BODY
        msg:
          type: string
          description: Error message (deprecated, use `message` instead)
          example: query is required and must be a string
        message:
          type: string
          description: Error message providing more details about the error
          example: query is required and must be a string
      required:
        - code
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````