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

# Get dossiers in collection

> Retrieve dossiers associated with a specific collection with optional filtering and pagination



## OpenAPI

````yaml post /v2/collections/{collectionId}/dossiers
openapi: 3.0.0
info:
  title: Forestreet API
  version: 1.0.0
  description: API documentation for Forestreet API
servers:
  - url: https://rest.forestreet.com
    description: Forestreet API V2 server
security:
  - apiKeyAuth: []
  - bearerAuth: []
  - sessionIdQuery: []
tags: []
paths:
  /v2/collections/{collectionId}/dossiers:
    post:
      tags:
        - Dossier
      summary: Get dossiers in collection
      description: >-
        Retrieve dossiers associated with a specific collection with optional
        filtering and pagination
      parameters:
        - schema:
            type: number
            nullable: true
            description: The collection ID to which the new dossier belongs.
          required: false
          description: The collection ID to which the new dossier belongs.
          name: collectionId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filters:
                  type: object
                  properties:
                    agentIds:
                      type: array
                      items:
                        type: string
                        format: uuid
                      description: Filter agents by the agent's unique identifier.
                    agentTypes:
                      type: array
                      items:
                        type: string
                        enum:
                          - supplierDossier
                          - marketInsight
                        description: Type of agent, e.g., 'supplierDossier'
                      description: Filter agents by their type, e.g., 'supplierDossier'.
                    query:
                      type: string
                      description: Filter agents by substring match on the original query.
                    createdBy:
                      type: array
                      items:
                        type: string
                        format: uuid
                      description: >-
                        Filter agents by the unique identifier of the user who
                        created them.
                  description: Optional filters to apply to the dossiers.
                sort:
                  type: array
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                        enum:
                          - createdAt
                          - lastModified
                        description: Fields to sort agents by.
                      order:
                        type: string
                        enum:
                          - asc
                          - desc
                        description: Sort order according to the specified field.
                    required:
                      - field
                      - order
                  description: Optional sorting criteria for the dossiers.
      responses:
        '200':
          description: Dossiers retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          totalItems:
                            type: number
                            description: >-
                              Total number of items for the returned dataset
                              after filtering.
                          totalPages:
                            type: number
                            description: >-
                              Total number of pages for the returned dataset
                              after filtering.
                          currentPage:
                            type: number
                            description: Current page number.
                          pageSize:
                            type: number
                            description: Number of items per page.
                          unfilteredTotalItems:
                            type: number
                            description: >-
                              Total number of items for the original dataset
                              before filtering.
                          unfilteredTotalPages:
                            type: number
                            description: >-
                              Total number of pages for the original dataset
                              before filtering.
                        required:
                          - totalItems
                          - totalPages
                          - currentPage
                          - pageSize
                        description: >-
                          Schema for pagination metadata, including total items,
                          total pages, current page, and page size.
                        example:
                          totalItems: 123
                          totalPages: 13
                          currentPage: 1
                          pageSize: 10
                          unfilteredTotalItems: 196
                          unfilteredTotalPages: 20
                      filters:
                        type: object
                        properties:
                          agentIds:
                            type: array
                            items:
                              type: string
                              format: uuid
                            description: Filter agents by the agent's unique identifier.
                          agentTypes:
                            type: array
                            items:
                              type: string
                              enum:
                                - supplierDossier
                                - marketInsight
                              description: Type of agent, e.g., 'supplierDossier'
                            description: >-
                              Filter agents by their type, e.g.,
                              'supplierDossier'.
                          query:
                            type: string
                            description: >-
                              Filter agents by substring match on the original
                              query.
                          createdBy:
                            type: array
                            items:
                              type: string
                              format: uuid
                            description: >-
                              Filter agents by the unique identifier of the user
                              who created them.
                      sort:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              enum:
                                - createdAt
                                - lastModified
                              description: Fields to sort agents by.
                            order:
                              type: string
                              enum:
                                - asc
                                - desc
                              description: Sort order according to the specified field.
                          required:
                            - field
                            - order
                        description: Sorting criteria for the agents.
                    required:
                      - pagination
                      - filters
                      - sort
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        agentId:
                          type: string
                          description: Unique identifier for the agent
                        query:
                          type: string
                          description: Original query used to create the agent
                        agentType:
                          type: string
                          enum:
                            - supplierDossier
                            - marketInsight
                          description: Type of agent, e.g., 'supplierDossier'
                        createdBy:
                          type: string
                          format: uuid
                          description: User ID of the creator of this agent
                        createdAt:
                          type: string
                          nullable: true
                          description: Timestamp when the agent was created
                        lastModifiedAt:
                          type: string
                          nullable: true
                          description: Timestamp when the agent was last modified
                        lastTaskId:
                          type: string
                          nullable: true
                          format: uuid
                          description: ID of the last task associated with this agent
                        lastTaskStatus:
                          type: object
                          nullable: true
                          properties:
                            taskId:
                              type: string
                              format: uuid
                              description: Unique identifier for the task
                            agentId:
                              type: string
                              description: >-
                                Unique identifier for the agent associated with
                                this task
                            createdAt:
                              type: string
                              nullable: true
                              description: Timestamp when the task was created
                            success:
                              type: boolean
                              nullable: true
                              description: >-
                                Indicates whether the task was successful; if
                                `null`, the task is still in progress
                            status:
                              type: string
                              enum:
                                - CREATED
                                - INITIALIZING
                                - ACQUIRING_TARGET
                                - GATHERING_RESOURCES
                                - GATHERING_INSIGHTS
                                - FINDING_COMPETITORS
                                - FINALIZING
                                - COMPLETED
                                - FAILED
                              description: >-
                                Current status of the task, indicating its
                                progress
                            lastReportedAt:
                              type: string
                              nullable: true
                              description: Timestamp of the last status update for the task
                            lastReportedBy:
                              type: string
                              nullable: true
                              description: >-
                                Hostname of the worker that last reported the
                                status
                          required:
                            - taskId
                            - createdAt
                            - status
                            - lastReportedAt
                            - lastReportedBy
                          description: Status of the last task associated with this agent
                      required:
                        - agentId
                        - query
                        - agentType
                        - createdBy
                        - lastModifiedAt
                        - lastTaskId
                        - lastTaskStatus
                    description: List of agents associated with the collection.
                required:
                  - metadata
                  - data
        '400':
          description: Bad Request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  errorCode:
                    type: string
                    enum:
                      - USER_NOT_CONFIRMED
                      - INVALID_CREDENTIALS
                      - INCOMPLETE_CREDENTIALS
                      - INVALID_SESSION_TOKEN
                      - FORCE_CHANGE_PASSWORD
                      - PASSWORD_RESET_REQUIRED
                      - PASSWORD_EXPIRED
                      - CODE_EXPIRED
                      - SESSION_EXPIRED
                      - UNAUTHORISED
                      - AUTHENTICATOR_ERROR
                      - SSO_ACCOUNT
                      - FORBIDDEN
                      - METHOD_NOT_ALLOWED
                      - INVALID_INPUT
                      - PATH_VALIDATION_FAILED
                      - QUERY_VALIDATION_FAILED
                      - BODY_VALIDATION_FAILED
                      - RESPONSE_VALIDATION_FAILED
                      - INVALID_OR_MALFORMED_JSON
                      - INTERNAL_SERVER_ERROR
                      - CONFIGURATION_ERROR
                      - SERVICE_UNAVAILABLE
                      - NOT_FOUND
                      - CONFLICT
                      - LIMIT_EXCEEDED
                      - REVIEW_ALREADY_PENDING
                      - REVIEW_NOT_PENDING
                      - REVIEW_PENDING
                      - REVIEW_INSUFFICIENT_DOMAINS
                      - QUOTA_EXCEEDED
                      - UNSUPPORTED_ENDPOINT_VERSION
                      - ENDPOINT_NOT_FOUND
                      - ENDPOINT_ALREADY_EXISTS
                  message:
                    type: string
                  detail:
                    type: object
                    additionalProperties:
                      nullable: true
                required:
                  - success
                  - errorCode
              examples:
                INVALID_INPUT:
                  value:
                    success: false
                    errorCode: INVALID_INPUT
                    message: Bad Request - Invalid input parameters
        '403':
          description: >-
            Forbidden - You do not have permission to list dossiers in this
            collection
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  errorCode:
                    type: string
                    enum:
                      - USER_NOT_CONFIRMED
                      - INVALID_CREDENTIALS
                      - INCOMPLETE_CREDENTIALS
                      - INVALID_SESSION_TOKEN
                      - FORCE_CHANGE_PASSWORD
                      - PASSWORD_RESET_REQUIRED
                      - PASSWORD_EXPIRED
                      - CODE_EXPIRED
                      - SESSION_EXPIRED
                      - UNAUTHORISED
                      - AUTHENTICATOR_ERROR
                      - SSO_ACCOUNT
                      - FORBIDDEN
                      - METHOD_NOT_ALLOWED
                      - INVALID_INPUT
                      - PATH_VALIDATION_FAILED
                      - QUERY_VALIDATION_FAILED
                      - BODY_VALIDATION_FAILED
                      - RESPONSE_VALIDATION_FAILED
                      - INVALID_OR_MALFORMED_JSON
                      - INTERNAL_SERVER_ERROR
                      - CONFIGURATION_ERROR
                      - SERVICE_UNAVAILABLE
                      - NOT_FOUND
                      - CONFLICT
                      - LIMIT_EXCEEDED
                      - REVIEW_ALREADY_PENDING
                      - REVIEW_NOT_PENDING
                      - REVIEW_PENDING
                      - REVIEW_INSUFFICIENT_DOMAINS
                      - QUOTA_EXCEEDED
                      - UNSUPPORTED_ENDPOINT_VERSION
                      - ENDPOINT_NOT_FOUND
                      - ENDPOINT_ALREADY_EXISTS
                  message:
                    type: string
                  detail:
                    type: object
                    additionalProperties:
                      nullable: true
                required:
                  - success
                  - errorCode
              examples:
                FORBIDDEN:
                  value:
                    success: false
                    errorCode: FORBIDDEN
                    message: >-
                      Forbidden - You do not have permission to list dossiers in
                      this collection
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Pass a static API key for every request, provided by your customer
        support.
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token authentication, using a sessionId generated by `GET
        /v2/auth/session`.
    sessionIdQuery:
      type: apiKey
      in: query
      name: sessionId
      description: >-
        Session ID passed as a query parameter for authentication, provided by
        `GET /v2/auth/session`.

````