{
  "opencollection": "1.0.0",
  "info": {
    "name": "Unisson agent-evals documents API",
    "version": "1.0.0"
  },
  "items": [
    {
      "info": {
        "name": "documents",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Documents",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/customers/:customer_id/documents",
            "params": [
              {
                "name": "customer_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List all documents linked to a customer."
        },
        {
          "info": {
            "name": "Add Document",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v1/customers/:customer_id/documents",
            "params": [
              {
                "name": "customer_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Link a document to a customer."
        },
        {
          "info": {
            "name": "Upload Document",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v1/customers/:customer_id/documents/upload",
            "params": [
              {
                "name": "customer_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "document_type",
                "value": "",
                "type": "query"
              }
            ],
            "body": {
              "type": "multipart-form",
              "data": []
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Upload a document from the user's device into a customer.\n\nStores the original file (downloadable via ``/download``), extracts text\nwhere possible, and kicks off background summarization. Non-extractable\ntypes (images, slide decks) are still stored — they just show up\nunsummarized."
        },
        {
          "info": {
            "name": "Download Document",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/customers/:customer_id/documents/:document_id/download",
            "params": [
              {
                "name": "customer_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "document_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Return a short-lived presigned URL for an uploaded document's file.\n\nOnly ``provider=\"upload\"`` rows carry an ``s3_key``; Drive/Notion rows keep\ntheir provider ``file_url`` and never hit this endpoint."
        },
        {
          "info": {
            "name": "Get Document File",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/customers/:customer_id/documents/:document_id/file",
            "params": [
              {
                "name": "customer_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "document_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Stream an uploaded document's raw bytes for the in-app previewer.\n\nProxied through the backend (rather than the presigned URL) so the browser\nfetch isn't blocked by S3 CORS, and served with the stored mime type —\nthe presigned URL carries ``Content-Disposition: attachment``, which would\nforce a download instead of rendering."
        },
        {
          "info": {
            "name": "Remove Document",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/api/v1/customers/:customer_id/documents/:document_id",
            "params": [
              {
                "name": "customer_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "document_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Remove a document link from a customer (soft delete)."
        }
      ]
    }
  ],
  "bundled": true
}