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

# Search attachments

> Search attachments using filters and an optional sort. Multiple filters are combined with AND. Results are offset-paginated.



## OpenAPI

````yaml /openapi-private.json post /attachments/_search
openapi: 3.1.0
info:
  title: Spott API Reference
  version: '0.1'
servers:
  - url: https://api.gospott.com
security: []
tags: []
paths:
  /attachments/_search:
    post:
      tags:
        - Attachments
      summary: Search attachments
      description: >-
        Search attachments using filters and an optional sort. Multiple filters
        are combined with AND. Results are offset-paginated.
      operationId: searchAttachments
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchAttachmentsDto'
      responses:
        '200':
          description: Paginated list of attachments matching the filters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchAttachmentsResponseDto'
        '400':
          description: Bad request - invalid filters, sort, or pagination offset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '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:
    SearchAttachmentsDto:
      type: object
      properties:
        filters:
          type: array
          items:
            $ref: '#/components/schemas/AppliedAttachmentFilterDto'
        sort:
          $ref: '#/components/schemas/AppliedAttachmentSortDto'
        page:
          default: 0
          type: integer
          minimum: 0
          maximum: 9007199254740991
        pageSize:
          default: 20
          type: integer
          minimum: 1
          maximum: 100
      id: PrivateSearchAttachmentsDto
    SearchAttachmentsResponseDto:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/SearchAttachmentsPaginationDto'
        items:
          type: array
          items:
            $ref: '#/components/schemas/AttachmentSearchItemDto'
      required:
        - pagination
        - items
      id: PrivateSearchAttachmentsResponseDto
    ExceptionBaseDto:
      type: object
      properties:
        status:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        message:
          type: string
        requestId:
          type: string
      required:
        - status
        - message
        - requestId
      id: ExceptionBaseDto
    AppliedAttachmentFilterDto:
      anyOf:
        - $ref: '#/components/schemas/AppliedAttachmentEntityFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentTypeFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentDateFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentEmptyDateFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentDateRangeFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomFilterDto'
      id: PrivateAppliedAttachmentFilterDto
    AppliedAttachmentSortDto:
      type: object
      properties:
        sortId:
          type: string
          enum:
            - attachment.createdAt
        sortDirection:
          type: string
          enum:
            - ASC
            - DESC
        attributePath:
          type: string
          enum:
            - attachment.createdAt
        sortType:
          type: string
          enum:
            - predefined
      required:
        - sortId
        - sortDirection
        - attributePath
        - sortType
      id: PrivateAppliedAttachmentSortDto
    SearchAttachmentsPaginationDto:
      type: object
      properties:
        hasNextPage:
          type: boolean
      required:
        - hasNextPage
      id: PrivateSearchAttachmentsPaginationDto
    AttachmentSearchItemDto:
      type: object
      properties:
        attachmentId:
          type: string
        attachmentName:
          anyOf:
            - type: string
            - type: 'null'
        type:
          anyOf:
            - $ref: '#/components/schemas/SearchAttachmentTypeDto'
            - type: 'null'
        createdAt:
          $ref: '#/components/schemas/DateISO'
        extension:
          anyOf:
            - type: string
            - type: 'null'
        size:
          anyOf:
            - type: number
            - type: 'null'
        links:
          $ref: '#/components/schemas/AttachmentLinksDto'
      required:
        - attachmentId
        - attachmentName
        - type
        - createdAt
        - extension
        - size
        - links
      id: PrivateAttachmentSearchItemDto
    AppliedAttachmentEntityFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - entitySelect
        operator:
          type: string
          enum:
            - in
            - notIn
        path:
          type: string
          enum:
            - attachment.candidate
            - attachment.vacancy
            - attachment.client
        value:
          type: array
          items:
            anyOf:
              - type: string
              - type: 'null'
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentEntityFilterDto
    AppliedAttachmentTypeFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - enumSelect
        operator:
          type: string
          enum:
            - in
            - notIn
        path:
          type: string
          enum:
            - attachment.type
        value:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/AttachmentTypeFilterValueDto'
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentTypeFilterDto
    AppliedAttachmentDateFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - date
        operator:
          type: string
          enum:
            - lessThanOrEqual
            - greaterThanOrEqual
            - equals
            - notEquals
        path:
          type: string
          enum:
            - attachment.expiryDate
            - attachment.validFrom
        value:
          $ref: '#/components/schemas/DateISO'
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentDateFilterDto
    AppliedAttachmentEmptyDateFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - date
        operator:
          type: string
          enum:
            - isEmpty
            - isNotEmpty
        path:
          type: string
          enum:
            - attachment.expiryDate
            - attachment.validFrom
      required:
        - type
        - operator
        - path
      id: PrivateAppliedAttachmentEmptyDateFilterDto
    AppliedAttachmentDateRangeFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - date
        operator:
          type: string
          enum:
            - between
        path:
          type: string
          enum:
            - attachment.expiryDate
            - attachment.validFrom
        value:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/DateISO'
            to:
              $ref: '#/components/schemas/DateISO'
          required:
            - from
            - to
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentDateRangeFilterDto
    AppliedAttachmentCustomFilterDto:
      anyOf:
        - $ref: '#/components/schemas/AppliedAttachmentCustomTextFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomDateFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomEmptyDateFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomDateRangeFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomNumberFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomNumberRangeFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomEntitySelectFilterDto'
        - $ref: >-
            #/components/schemas/AppliedAttachmentCustomEntityMultiSelectFilterDto
        - $ref: '#/components/schemas/AppliedAttachmentCustomBooleanFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomEnumSelectFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomEnumListSelectFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomCurrencyFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomDurationFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomUrlFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomTimeStampFilterDto'
        - $ref: '#/components/schemas/AppliedAttachmentCustomRatingFilterDto'
      id: PrivateAppliedAttachmentCustomFilterDto
    SearchAttachmentTypeDto:
      anyOf:
        - $ref: '#/components/schemas/AttachmentCustomTypeDto'
        - $ref: '#/components/schemas/SearchAttachmentSystemTypeDto'
      id: PrivateSearchAttachmentTypeDto
    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])))$
    AttachmentLinksDto:
      type: object
      properties:
        candidates:
          type: array
          items:
            $ref: '#/components/schemas/IdDto'
        clients:
          type: array
          items:
            $ref: '#/components/schemas/IdDto'
        clientContacts:
          type: array
          items:
            $ref: '#/components/schemas/IdDto'
        vacancies:
          type: array
          items:
            $ref: '#/components/schemas/IdDto'
        opportunities:
          type: array
          items:
            $ref: '#/components/schemas/IdDto'
        placements:
          type: array
          items:
            $ref: '#/components/schemas/IdDto'
        applications:
          type: array
          items:
            $ref: '#/components/schemas/IdDto'
      required:
        - candidates
        - clients
        - clientContacts
        - vacancies
        - opportunities
        - placements
        - applications
      id: PrivateAttachmentLinksDto
    AttachmentTypeFilterValueDto:
      anyOf:
        - $ref: '#/components/schemas/AttachmentSystemTypeFilterValueDto'
        - $ref: '#/components/schemas/AttachmentCustomTypeFilterValueDto'
      id: PrivateAttachmentTypeFilterValueDto
    AppliedAttachmentCustomTextFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        operator:
          type: string
          enum:
            - contains
            - equals
            - startsWith
            - notEquals
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          type: string
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomTextFilterDto
    AppliedAttachmentCustomDateFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - date
        operator:
          type: string
          enum:
            - lessThanOrEqual
            - greaterThanOrEqual
            - equals
            - notEquals
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          $ref: '#/components/schemas/DateISO'
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomDateFilterDto
    AppliedAttachmentCustomEmptyDateFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - date
        operator:
          type: string
          enum:
            - isEmpty
            - isNotEmpty
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
      required:
        - type
        - operator
        - path
      id: PrivateAppliedAttachmentCustomEmptyDateFilterDto
    AppliedAttachmentCustomDateRangeFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - date
        operator:
          type: string
          enum:
            - between
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          type: object
          properties:
            from:
              $ref: '#/components/schemas/DateISO'
            to:
              $ref: '#/components/schemas/DateISO'
          required:
            - from
            - to
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomDateRangeFilterDto
    AppliedAttachmentCustomNumberFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - number
        operator:
          type: string
          enum:
            - greaterThanOrEqual
            - lessThanOrEqual
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          type: number
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomNumberFilterDto
    AppliedAttachmentCustomNumberRangeFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - number
        operator:
          type: string
          enum:
            - between
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          type: object
          properties:
            from:
              type: number
            to:
              type: number
          required:
            - from
            - to
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomNumberRangeFilterDto
    AppliedAttachmentCustomEntitySelectFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - entitySelect
        operator:
          type: string
          enum:
            - in
            - notIn
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomEntitySelectFilterDto
    AppliedAttachmentCustomEntityMultiSelectFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - entitySelect
        operator:
          type: string
          enum:
            - in
            - notIn
            - isAllOf
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          type: array
          items:
            anyOf:
              - type: string
              - type: 'null'
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomEntityMultiSelectFilterDto
    AppliedAttachmentCustomBooleanFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - boolean
        operator:
          type: string
          enum:
            - equals
            - notEquals
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          type: boolean
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomBooleanFilterDto
    AppliedAttachmentCustomEnumSelectFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - enumSelect
        operator:
          type: string
          enum:
            - in
            - notIn
            - isAllOf
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          type: array
          items:
            anyOf:
              - type: string
              - type: 'null'
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomEnumSelectFilterDto
    AppliedAttachmentCustomEnumListSelectFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - enumListSelect
        operator:
          type: string
          enum:
            - contains
            - doesNotContain
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomEnumListSelectFilterDto
    AppliedAttachmentCustomCurrencyFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - currency
        operator:
          type: string
          enum:
            - greaterThanOrEqual
            - lessThanOrEqual
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          type: object
          properties:
            amount:
              type: number
            currency:
              $ref: '#/components/schemas/DmCurrency'
          required:
            - amount
            - currency
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomCurrencyFilterDto
    AppliedAttachmentCustomDurationFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - duration
        operator:
          type: string
          enum:
            - greaterThanOrEqual
            - lessThanOrEqual
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          type: number
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomDurationFilterDto
    AppliedAttachmentCustomUrlFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - url
        operator:
          type: string
          enum:
            - equals
            - notEquals
            - contains
            - startsWith
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          type: string
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomUrlFilterDto
    AppliedAttachmentCustomTimeStampFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - timestamp
        operator:
          type: string
          enum:
            - greaterThanOrEqual
            - lessThanOrEqual
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          $ref: '#/components/schemas/DateISO'
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomTimeStampFilterDto
    AppliedAttachmentCustomRatingFilterDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - rating
        operator:
          type: string
          enum:
            - greaterThanOrEqual
            - lessThanOrEqual
            - equals
        path:
          $ref: '#/components/schemas/AttachmentCustomAttributePathDto'
        value:
          type: number
      required:
        - type
        - operator
        - path
        - value
      id: PrivateAppliedAttachmentCustomRatingFilterDto
    AttachmentCustomTypeDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      id: PrivateAttachmentCustomTypeDto
    SearchAttachmentSystemTypeDto:
      type: object
      properties:
        name:
          type: string
          enum:
            - UNASSIGNED
            - CV
      required:
        - name
      id: PrivateSearchAttachmentSystemTypeDto
    IdDto:
      type: object
      properties:
        id:
          type: string
          minLength: 1
      required:
        - id
      id: IdDto
    AttachmentSystemTypeFilterValueDto:
      type: object
      properties:
        name:
          type: string
          enum:
            - UNASSIGNED
            - CV
      required:
        - name
      id: PrivateAttachmentSystemTypeFilterValueDto
    AttachmentCustomTypeFilterValueDto:
      type: object
      properties:
        id:
          type: string
      required:
        - id
      id: PrivateAttachmentCustomTypeFilterValueDto
    AttachmentCustomAttributePathDto:
      type: string
      pattern: ^attachment\.custom\.[^\r\n]+$
      id: PrivateAttachmentCustomAttributePathDto
    DmCurrency:
      type: string
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTC
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLF
        - CLP
        - CNH
        - CNY
        - COP
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GGP
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - IMP
        - INR
        - IQD
        - IRR
        - ISK
        - JEP
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLE
        - SLL
        - SOS
        - SRD
        - SSP
        - STD
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VEF
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XAG
        - XAU
        - XCD
        - XCG
        - XDR
        - XOF
        - XPD
        - XPF
        - XPT
        - YER
        - ZAR
        - ZMW
        - ZWG
        - ZWL
      id: DmCurrency
  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.

````