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

# List attachments

> List attachments linked to a candidate, company, or jobs. At least one of `candidateId`, `companyId`, or `vacancyId` must be provided. Results are offset-paginated and can be filtered by attachment `type` (allowed values: `UNASSIGNED`, `CV`). Attachments with platform-internal types are never returned.



## OpenAPI

````yaml /api-reference/openapi.json get /attachments
openapi: 3.1.0
info:
  title: Spott API Reference
  version: '0.1'
servers:
  - url: https://api.gospott.com
security: []
tags: []
paths:
  /attachments:
    get:
      tags:
        - Attachments
      summary: List attachments
      description: >-
        List attachments linked to a candidate, company, or jobs. At least one
        of `candidateId`, `companyId`, or `vacancyId` must be provided. Results
        are offset-paginated and can be filtered by attachment `type` (allowed
        values: `UNASSIGNED`, `CV`). Attachments with platform-internal types
        are never returned.
      operationId: listAttachments
      parameters:
        - name: page
          required: false
          in: query
          schema:
            minimum: 0
            maximum: 10000
            default: 0
            type: integer
        - name: pageSize
          required: false
          in: query
          schema:
            default: 20
            type: integer
            minimum: 1
            maximum: 100
        - name: candidateId
          required: false
          in: query
          schema:
            type: string
            minLength: 1
        - name: companyId
          required: false
          in: query
          schema:
            type: string
            minLength: 1
        - name: vacancyId
          required: false
          in: query
          schema:
            type: string
            minLength: 1
        - name: type
          required: false
          in: query
          description: >-
            Optional filter by one of the platform's predefined attachment
            types. Allowed values: UNASSIGNED, CV.
          schema:
            type: string
            enum:
              - UNASSIGNED
              - CV
      responses:
        '200':
          description: Paginated list of attachments matching the filters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAttachmentsDto'
        '400':
          description: >-
            Bad request - missing required link filter (at least one of
            candidateId, companyId, or vacancyId required) or invalid query
            parameter
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ExceptionBaseDto'
                  - type: object
                    properties:
                      statusCode:
                        type: number
                        example: 400
                      message:
                        type: string
                        example: LINK_FILTER_REQUIRED
                      error:
                        type: string
                        example: Bad Request
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
      security:
        - x-api-key: []
components:
  schemas:
    PaginatedAttachmentsDto:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/PaginationDto'
        items:
          type: array
          items:
            $ref: '#/components/schemas/AttachmentDto'
      required:
        - pagination
        - items
      id: PrivatePaginatedAttachmentsDto
    ExceptionBaseDto:
      type: object
      properties:
        status:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        message:
          type: string
        requestId:
          type: string
      required:
        - status
        - message
        - requestId
      id: ExceptionBaseDto
    PaginationDto:
      type: object
      properties:
        totalItems:
          type: number
        page:
          type: number
        hasNextPage:
          type: boolean
      required:
        - totalItems
        - page
        - hasNextPage
      id: PaginationDto
    AttachmentDto:
      type: object
      properties:
        attachmentId:
          type: string
        attachmentName:
          anyOf:
            - type: string
            - type: 'null'
        type:
          anyOf:
            - type: string
              enum:
                - UNASSIGNED
                - CV
            - type: 'null'
        customType:
          anyOf:
            - $ref: '#/components/schemas/AttachmentCustomTypeDto'
            - type: 'null'
        createdAt:
          $ref: '#/components/schemas/DateISO'
        extension:
          anyOf:
            - type: string
            - type: 'null'
        size:
          anyOf:
            - type: number
            - type: 'null'
      required:
        - attachmentId
        - attachmentName
        - type
        - customType
        - createdAt
        - extension
        - size
      id: PrivateAttachmentDto
    AttachmentCustomTypeDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      id: PrivateAttachmentCustomTypeDto
    DateISO:
      id: DateISO
      format: date-time
      anyOf:
        - type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        - type: string
          format: date
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
  securitySchemes:
    x-api-key:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        API key for authentication. Get your API key from Settings → API Keys in
        your Spott dashboard.

````