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

# Upload file with metadata

> Upload a file using multipart/form-data with metadata.
    Returns an object_id for the uploaded file and submission_id for the metadata submission.

    Example:
    ```
    curl -k -u n:n -F "file=@example.txt"          -F 'metadata={"agent_id":"agent123","project":"proj1","timestamp":"2024-01-29T12:00:00Z","expiration":"2024-02-29T12:00:00Z","path":"/tmp/example.txt"}'          https://nemesis:7443/api/files
    ```



## OpenAPI

````yaml /nemesis-docs/docs/nemesis-api.json post /files
openapi: 3.1.0
info:
  title: Enrichment API
  description: API for file enrichment services
  version: 0.1.0
servers:
  - url: /api
security: []
tags:
  - name: files
    description: File management operations
  - name: workflows
    description: Workflow management operations
  - name: enrichments
    description: Enrichment management operations
  - name: system
    description: System and health check endpoints
paths:
  /files:
    post:
      tags:
        - files
      summary: Upload file with metadata
      description: |-
        Upload a file using multipart/form-data with metadata.
            Returns an object_id for the uploaded file and submission_id for the metadata submission.

            Example:
            ```
            curl -k -u n:n -F "file=@example.txt"          -F 'metadata={"agent_id":"agent123","project":"proj1","timestamp":"2024-01-29T12:00:00Z","expiration":"2024-02-29T12:00:00Z","path":"/tmp/example.txt"}'          https://nemesis:7443/api/files
            ```
      operationId: upload_file_files_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_file_files_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileWithMetadataResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_upload_file_files_post:
      properties:
        file:
          type: string
          format: binary
          title: File
          description: The file to upload
        metadata:
          type: string
          title: Metadata
          description: JSON string containing file metadata
      type: object
      required:
        - file
        - metadata
      title: Body_upload_file_files_post
    FileWithMetadataResponse:
      properties:
        object_id:
          type: string
          format: uuid
          title: Object Id
          description: Unique identifier for the uploaded file
        submission_id:
          type: string
          format: uuid
          title: Submission Id
          description: Unique identifier for the metadata submission
      type: object
      required:
        - object_id
        - submission_id
      title: FileWithMetadataResponse
      description: Response for combined file and metadata uploads
    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

````