openapi: 3.0.3
info:
  title: Everflow Network API - File Upload
  description: >
    Endpoint for uploading temporary files to the Everflow platform. Uploaded
    files are temporary resources that must be referenced by a subsequent API
    call (e.g. to create an image creative or import conversions via CSV).
    Files are destroyed after a single use.
  version: 1.0.0
servers:
  - url: https://api.eflow.team/v1
tags:
  - name: File Upload
paths:
  /networks/uploads/temp:
    post:
      summary: Upload Temp File
      tags:
        - File Upload
      parameters:
        - in: query
          name: unzip
          required: false
          schema:
            type: boolean
          description: Set to true to decompress a compressed file after upload.
      requestBody:
        required: true
        content:
          application/json:
            example:
              mime_type: "application/json"
              content_base64: "YmFzZTY0"
            schema:
              type: object
              required:
                - mime_type
                - content_base64
              properties:
                mime_type:
                  type: string
                  description: MIME type of the file (e.g. application/json, text/csv, image/png).
                content_base64:
                  type: string
                  description: File content encoded in Base64.
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  urls:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: Temporary URL for the uploaded file.
                        name:
                          type: string
                          description: Name of the uploaded file.
                    description: Array of temporary file URLs.
      security:
        - API Key: []
components:
  securitySchemes:
    API Key:
      description: The Everflow API key generated from the Control Center > Security.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey
