> ## 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.

# Upload temporary attachments

> Step 1 of the two-step upload flow:
1. Upload one or more files here — the response returns a temporary attachment ID for each file.
2. Call `POST /attachments/temporary/assign` with those IDs to set each attachment's type and link them to a record (candidate, company, or vacancy), making them permanent.

Attachments uploaded here are stored temporarily and are not persisted until they are assigned.

**Allowed MIME Types:**
- **PDF:** `application/pdf`
- **Word Documents:** `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (.docx), `application/msword` (.doc)
- **Images:** `image/jpeg`, `image/png`, `image/gif`, `image/bmp`, `image/webp`, `image/tiff`, `image/svg+xml`, `image/x-icon`, `image/vnd.microsoft.icon`
- **Excel:** `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` (.xlsx)
- **CSV:** `text/csv` (.csv)

**Limits:**
- Maximum file size: 50MB per file
- Maximum files per request: 10



## OpenAPI

````yaml /api-reference/openapi.json post /attachments/temporary
openapi: 3.1.0
info:
  title: Spott API Reference
  version: '0.1'
servers:
  - url: https://api.gospott.com
security: []
tags: []
paths:
  /attachments/temporary:
    post:
      tags:
        - Attachments
      summary: Upload temporary attachments
      description: >-
        Step 1 of the two-step upload flow:

        1. Upload one or more files here — the response returns a temporary
        attachment ID for each file.

        2. Call `POST /attachments/temporary/assign` with those IDs to set each
        attachment's type and link them to a record (candidate, company, or
        vacancy), making them permanent.


        Attachments uploaded here are stored temporarily and are not persisted
        until they are assigned.


        **Allowed MIME Types:**

        - **PDF:** `application/pdf`

        - **Word Documents:**
        `application/vnd.openxmlformats-officedocument.wordprocessingml.document`
        (.docx), `application/msword` (.doc)

        - **Images:** `image/jpeg`, `image/png`, `image/gif`, `image/bmp`,
        `image/webp`, `image/tiff`, `image/svg+xml`, `image/x-icon`,
        `image/vnd.microsoft.icon`

        - **Excel:**
        `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
        (.xlsx)

        - **CSV:** `text/csv` (.csv)


        **Limits:**

        - Maximum file size: 50MB per file

        - Maximum files per request: 10
      operationId: uploadTemporaryAttachments
      parameters:
        - name: type
          required: true
          in: query
          description: >-
            One of the platform's predefined attachment types. Allowed values:
            UNASSIGNED, CV.
          schema:
            example: CV
            type: string
            enum:
              - UNASSIGNED
              - CV
      requestBody:
        required: true
        description: >-
          One or more files to upload. Accepted formats: PDF (.pdf), Word (.doc,
          .docx), Images (.jpeg, .png, .gif, .bmp, .webp, .tiff, .svg, .ico),
          Excel (.xlsx), CSV (.csv). Max 10 files, 50MB per file.
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: >-
                    Array of files to upload. Supported MIME types:
                    application/pdf,
                    application/vnd.openxmlformats-officedocument.wordprocessingml.document,
                    application/msword, image/jpeg, image/png, image/gif,
                    image/bmp, image/webp, image/tiff, image/svg+xml,
                    image/x-icon, image/vnd.microsoft.icon,
                    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
                    text/csv
      responses:
        '201':
          description: >-
            Attachments uploaded successfully. Returns an array of attachment
            details including IDs to use for assignment.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AttachmentDto'
        '400':
          description: >-
            Bad request - invalid file type (unsupported MIME type), file too
            large (>50MB), or too many files (>10)
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ExceptionBaseDto'
                  - type: object
                    properties:
                      statusCode:
                        type: number
                        example: 400
                      message:
                        type: string
                        example: File type not allowed
                      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:
    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
    ExceptionBaseDto:
      type: object
      properties:
        status:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        message:
          type: string
        requestId:
          type: string
      required:
        - status
        - message
        - requestId
      id: ExceptionBaseDto
    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.

````