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

# Add Items To Collection

> Add directories and/or assets to a collection



## OpenAPI

````yaml /api-reference/openapi.json post /collections/{collection_id}/items
openapi: 3.1.0
info:
  title: Aspect Platform API
  description: A FastAPI application for Aspect Platform functionality
  version: 0.0.0
servers:
  - url: https://api.aspect.inc
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /collections/{collection_id}/items:
    post:
      tags:
        - Collections
      summary: Add Items To Collection
      description: Add directories and/or assets to a collection
      operationId: post_Collections_collections_collection_id_items
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Collection Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionAddItemsRequest'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CollectionAddItemsRequest:
      properties:
        resource_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Resource Ids
          description: List of resource IDs (directories or assets) to add
      type: object
      required:
        - resource_ids
      title: CollectionAddItemsRequest
      description: API request schema for adding items to a collection
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT in Authorization header. 'Bearer ' prefix optional.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````