{
  "info": {
    "_postman_id": "a9bcc296-1425-4c4c-ae8f-761d1a292dcb",
    "name": "OutDocAI Public API",
    "description": "Organization-scoped public API for documents, Q&A, conversations, and reports. Authenticate with a Bearer API key from the Organization page.\n## Getting started\n1. Set the `apiKey` variable to a key from **Organization → View API Key** (keys start with `od_`).\n2. Optionally change `baseUrl` from the local default.\n3. Send any request.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Organization",
      "item": [
        {
          "name": "Get organization",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/organization",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "organization"
              ]
            },
            "description": "Confirm your API key works and return the organization bound to it."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Documents",
      "item": [
        {
          "name": "List documents",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/documents?{{q}}=&{{limit}}=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "",
                  "description": "Search by filename",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Max results (up to 100)",
                  "disabled": true
                }
              ]
            },
            "description": "List documents in your organization. Optionally filter by filename."
          },
          "response": []
        },
        {
          "name": "Upload documents",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "multipart/form-data",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/documents/upload",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "upload"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "files",
                  "type": "text",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Upload one or more files. Use multipart form field `files`. Indexing runs in the background."
          },
          "response": []
        },
        {
          "name": "Get document",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/documents/{{document_id}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "{{document_id}}"
              ]
            },
            "description": "Get details for one document."
          },
          "response": []
        },
        {
          "name": "Delete document",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/documents/{{document_id}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "{{document_id}}"
              ]
            },
            "description": "Permanently delete a document and its indexed data."
          },
          "response": []
        },
        {
          "name": "Download document file",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/documents/{{document_id}}/file",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "documents",
                "{{document_id}}",
                "file"
              ]
            },
            "description": "Download the original uploaded file."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Query",
      "item": [
        {
          "name": "Ask a question",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/query",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "query"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Send a question and get an answer grounded in your uploaded documents, with sources."
          },
          "response": []
        },
        {
          "name": "Ask a question (stream)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/x-ndjson",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/query/stream",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "query",
                "stream"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Same as `/query`, but streams the answer for chat UIs."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Conversations",
      "item": [
        {
          "name": "List conversations",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/conversations?{{include_archived}}=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "conversations"
              ],
              "query": [
                {
                  "key": "include_archived",
                  "value": "",
                  "description": "",
                  "disabled": true
                }
              ]
            },
            "description": "List conversations created with this API key's acting user."
          },
          "response": []
        },
        {
          "name": "Get conversation messages",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/conversations/{{conversation_id}}/messages",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "conversations",
                "{{conversation_id}}",
                "messages"
              ]
            },
            "description": "Return messages for a conversation you own."
          },
          "response": []
        },
        {
          "name": "Delete conversation",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/conversations/{{conversation_id}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "conversations",
                "{{conversation_id}}"
              ]
            },
            "description": "Permanently delete a conversation and its messages."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Reports",
      "item": [
        {
          "name": "List reports",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/reports?{{q}}=&{{limit}}=",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "reports"
              ],
              "query": [
                {
                  "key": "q",
                  "value": "",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "",
                  "disabled": true
                }
              ]
            },
            "description": "List generated reports for your organization."
          },
          "response": []
        },
        {
          "name": "Generate report",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "multipart/form-data",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/reports/generate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "reports",
                "generate"
              ]
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "prompt",
                  "type": "file",
                  "src": [],
                  "description": ""
                },
                {
                  "key": "title",
                  "type": "file",
                  "src": [],
                  "description": ""
                },
                {
                  "key": "document_ids",
                  "type": "file",
                  "src": [],
                  "description": "Comma-separated document UUIDs"
                }
              ]
            },
            "description": "Generate a PDF report from selected documents and a prompt."
          },
          "response": []
        },
        {
          "name": "Download report file",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiKey}}",
                "type": "text"
              },
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/reports/{{report_id}}/file",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "reports",
                "{{report_id}}",
                "file"
              ]
            },
            "description": "Download a generated report PDF."
          },
          "response": []
        }
      ]
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "http://localhost:8000/api/v1/public",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "od_",
      "type": "string"
    },
    {
      "key": "document_id",
      "value": "00000000-0000-0000-0000-000000000000",
      "type": "string"
    },
    {
      "key": "conversation_id",
      "value": "00000000-0000-0000-0000-000000000000",
      "type": "string"
    },
    {
      "key": "report_id",
      "value": "00000000-0000-0000-0000-000000000000",
      "type": "string"
    }
  ]
}
