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

# Get task attachments

> Lists attachments for a task (paginated), excluding child versions.



## OpenAPI

````yaml /api-reference/openapi.json get /tasks/{task_id}/attachments
openapi: 3.1.0
info:
  title: COR API
  description: >-
    The COR API lets you integrate with projectcor.com applications using simple
    HTTP methods, in either XML or JSON formats, making this an ideal API for
    developing integrations with other softwares, external clients or mobile
    applications
  version: 1.0.0
servers:
  - url: https://api.projectcor.com/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /tasks/{task_id}/attachments:
    get:
      tags:
        - Tasks
      summary: Get task attachments
      description: Lists attachments for a task (paginated), excluding child versions.
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: integer
          description: ID of the task
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          description: Current page number
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            default: 20
          description: Number of items per page
        - name: order
          in: query
          required: false
          schema:
            type: object
            default:
              created_at: DESC
          description: 'Sort criteria (e.g. `{"created_at": "DESC"}`)'
      responses:
        '200':
          description: Paginated list of attachments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskAttachmentListResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                nullable: true
                example: null
components:
  schemas:
    TaskAttachmentListResponse:
      type: object
      properties:
        total:
          type: integer
          description: Total number of attachments
        perPage:
          type: integer
          description: Items per page
        page:
          type: integer
          description: Current page number
        lastPage:
          type: integer
          description: Last page number
        data:
          type: array
          items:
            $ref: '#/components/schemas/TaskAttachmentDetail'
    TaskAttachmentDetail:
      type: object
      properties:
        id:
          type: integer
        url:
          type: string
        size:
          type: integer
          description: File size in bytes
        source:
          type: string
          description: Storage source (e.g. `S3`, `GoogleDrive`, `DropBox`, `OneDrive`)
        user_id:
          type: integer
        available:
          type: boolean
        file_type:
          type: string
          description: File extension (e.g. `png`, `pdf`)
        media_type:
          type: string
          description: Media category (e.g. `image`, `pdf`, `video`)
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        originalname:
          type: string
          description: Original file name
        discussions_id:
          type: integer
          nullable: true
        parent_type:
          type: string
          description: Parent entity type (e.g. `tasks`)
        name:
          type: string
        parent_id:
          type: integer
        attachment_parent_id:
          type: integer
          nullable: true
          description: Parent attachment ID for versioning
        version:
          type: integer
        status:
          type: string
          nullable: true
          enum:
            - approved
            - pending
            - required
            - null
        currentVersionData:
          type: object
          nullable: true
        currentVersionId:
          type: integer
        currentVersion:
          type: integer
        user:
          type: object
          properties:
            id:
              type: integer
            first_name:
              type: string
            last_name:
              type: string
            picture:
              type: string
        graphicsCount:
          type: string
          nullable: true
        taskLogReworksId:
          type: integer
          nullable: true
        createdFrom:
          type: string
          description: 'Origin: `task_panel`, `rework`, or `feedback`'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````