{
  "info": {
    "name": "Hippocampus API (beta)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Beta, 5 Oct 2026: endpoints and fields can still change.\n\nRun \"Start here → Sign in\" first: it stores your token. Then set folder_name (a folder path such as contracts/master-agreements), and folder_id / document_id from the Browse calls. Reference: https://www.thalius.ai/developers/api"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{token}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "core_url",
      "value": "https://hippocampuscore.thalius.ai"
    },
    {
      "key": "vault_url",
      "value": "https://hippocampusvault.thalius.ai"
    },
    {
      "key": "token",
      "value": ""
    },
    {
      "key": "web_api_key",
      "value": ""
    },
    {
      "key": "tenant_id",
      "value": ""
    },
    {
      "key": "script_email",
      "value": ""
    },
    {
      "key": "script_password",
      "value": ""
    },
    {
      "key": "folder_name",
      "value": "contracts"
    },
    {
      "key": "folder_id",
      "value": ""
    },
    {
      "key": "document_id",
      "value": ""
    },
    {
      "key": "job_id",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Start here",
      "item": [
        {
          "name": "Sign in (sets {{token}})",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key={{web_api_key}}",
              "protocol": "https",
              "host": [
                "identitytoolkit",
                "googleapis",
                "com"
              ],
              "path": [
                "v1",
                "accounts:signInWithPassword"
              ],
              "query": [
                {
                  "key": "key",
                  "value": "{{web_api_key}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"{{script_email}}\",\n  \"password\": \"{{script_password}}\",\n  \"tenantId\": \"{{tenant_id}}\",\n  \"returnSecureToken\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Exchanges the sign-in of your script user for an ID token and stores it in {{token}}. The token lasts about an hour; run this again when calls answer 401. The web key, tenant id and sign-in come with API access."
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const r = pm.response.json();",
                  "if (r.idToken) { pm.collectionVariables.set('token', r.idToken); }",
                  "pm.test('signed in', () => pm.expect(r.idToken).to.be.a('string'));"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Import",
      "item": [
        {
          "name": "POST /ingest — import a file",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{core_url}}/ingest",
              "host": [
                "{{core_url}}"
              ],
              "path": [
                "ingest"
              ]
            },
            "description": "Returns a job; stores its id in {{job_id}}.",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "files",
                  "type": "file",
                  "src": [],
                  "description": "Pick a .pdf, .docx, .md or .txt file"
                },
                {
                  "key": "file_metadata",
                  "type": "text",
                  "value": "[{\"folder_name\":\"{{folder_name}}\",\"tags\":[]}]"
                }
              ]
            }
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{core_url}}/ingest",
                  "host": [
                    "{{core_url}}"
                  ],
                  "path": [
                    "ingest"
                  ]
                },
                "description": "Returns a job; stores its id in {{job_id}}.",
                "body": {
                  "mode": "formdata",
                  "formdata": [
                    {
                      "key": "files",
                      "type": "file",
                      "src": [],
                      "description": "Pick a .pdf, .docx, .md or .txt file"
                    },
                    {
                      "key": "file_metadata",
                      "type": "text",
                      "value": "[{\"folder_name\":\"{{folder_name}}\",\"tags\":[]}]"
                    }
                  ]
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"job_id\": \"c0a9f6d2-…\",\n  \"status\": \"processing\",\n  \"message\": \"Queued 1 file\",\n  \"total_files\": 1,\n  \"done\": false\n}"
            }
          ],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const r = pm.response.json();",
                  "if (r.job_id) { pm.collectionVariables.set('job_id', r.job_id); }"
                ]
              }
            }
          ]
        },
        {
          "name": "GET /jobs/{job_id} — check the import",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{core_url}}/jobs/{{job_id}}",
              "host": [
                "{{core_url}}"
              ],
              "path": [
                "jobs",
                "{{job_id}}"
              ]
            },
            "description": "Poll until done is true."
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{core_url}}/jobs/{{job_id}}",
                  "host": [
                    "{{core_url}}"
                  ],
                  "path": [
                    "jobs",
                    "{{job_id}}"
                  ]
                },
                "description": "Poll until done is true."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"job_id\": \"c0a9f6d2-…\",\n  \"status\": \"complete\",\n  \"successful\": 1,\n  \"failed\": 0,\n  \"results\": [\n    {\n      \"filename\": \"MSA-2025.pdf\",\n      \"success\": true,\n      \"document_id\": \"8c1f0e4a-…\",\n      \"folder_name\": \"contracts/master-agreements\",\n      \"duplicate\": false\n    }\n  ],\n  \"done\": true\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Search and answers",
      "item": [
        {
          "name": "POST /search — find passages",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{core_url}}/search",
              "host": [
                "{{core_url}}"
              ],
              "path": [
                "search"
              ]
            },
            "description": "Passages with pages and a link to the original.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"query\": \"What is the notice period for termination?\",\n  \"folder_name\": \"{{folder_name}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{core_url}}/search",
                  "host": [
                    "{{core_url}}"
                  ],
                  "path": [
                    "search"
                  ]
                },
                "description": "Passages with pages and a link to the original.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"query\": \"What is the notice period for termination?\",\n  \"folder_name\": \"{{folder_name}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"sources\": [\n    {\n      \"doc_id\": \"8c1f0e4a-…\",\n      \"document_title\": \"Master Services Agreement 2025\",\n      \"leaf_title\": \"12. Term and Termination\",\n      \"start_page\": 14,\n      \"end_page\": 15,\n      \"score\": 0.91,\n      \"text\": \"Either party may terminate this Agreement on ninety (90) days' written notice…\",\n      \"deep_link\": \"/documents/5b7d2c90-….pdf#page=14\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "POST /ask — short answer",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{core_url}}/ask",
              "host": [
                "{{core_url}}"
              ],
              "path": [
                "ask"
              ]
            },
            "description": "Answer, reasoning, confidence. No passages: use /search for them.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"query\": \"What is the notice period for termination?\",\n  \"folder_name\": \"{{folder_name}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{core_url}}/ask",
                  "host": [
                    "{{core_url}}"
                  ],
                  "path": [
                    "ask"
                  ]
                },
                "description": "Answer, reasoning, confidence. No passages: use /search for them.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"query\": \"What is the notice period for termination?\",\n  \"folder_name\": \"{{folder_name}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"answer\": \"Either party may terminate on 90 days' written notice (section 12.2).\",\n  \"reasoning\": \"Section 12.2 of the Master Services Agreement states…\",\n  \"confidence\": 0.86\n}"
            }
          ]
        }
      ]
    },
    {
      "name": "Browse",
      "item": [
        {
          "name": "GET /folders/summary — what a folder holds",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{core_url}}/folders/summary?folder_name={{folder_name}}",
              "host": [
                "{{core_url}}"
              ],
              "path": [
                "folders",
                "summary"
              ],
              "query": [
                {
                  "key": "folder_name",
                  "value": "{{folder_name}}"
                }
              ]
            },
            "description": ""
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{core_url}}/folders/summary?folder_name={{folder_name}}",
                  "host": [
                    "{{core_url}}"
                  ],
                  "path": [
                    "folders",
                    "summary"
                  ],
                  "query": [
                    {
                      "key": "folder_name",
                      "value": "{{folder_name}}"
                    }
                  ]
                },
                "description": ""
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"status\": \"ok\",\n  \"folder_summary\": {\n    \"folder\": \"contracts/master-agreements\",\n    \"title\": \"Master agreements\",\n    \"description\": \"Signed MSAs with customers and suppliers, 2019–2025.\",\n    \"content\": \"- Master Services Agreement 2025: term, termination, liability caps…\",\n    \"truncated\": false\n  }\n}"
            }
          ]
        },
        {
          "name": "GET /folders — list folders",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{vault_url}}/folders",
              "host": [
                "{{vault_url}}"
              ],
              "path": [
                "folders"
              ]
            },
            "description": "Add ?parentFolderId=… for the folders inside one folder."
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{vault_url}}/folders",
                  "host": [
                    "{{vault_url}}"
                  ],
                  "path": [
                    "folders"
                  ]
                },
                "description": "Add ?parentFolderId=… for the folders inside one folder."
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "[\n  {\n    \"id\": \"0144f7ed-…\",\n    \"name\": \"Onboarding notes\",\n    \"parentFolderId\": \"0c25a285-…\",\n    \"createdAt\": \"2026-09-08T09:15:16.000Z\",\n    \"updatedAt\": \"2026-09-08T09:15:16.000Z\"\n  }\n]"
            }
          ]
        },
        {
          "name": "GET /folders/{id} — one folder",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{vault_url}}/folders/{{folder_id}}?include=true",
              "host": [
                "{{vault_url}}"
              ],
              "path": [
                "folders",
                "{{folder_id}}"
              ],
              "query": [
                {
                  "key": "include",
                  "value": "true"
                }
              ]
            },
            "description": ""
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{vault_url}}/folders/{{folder_id}}?include=true",
                  "host": [
                    "{{vault_url}}"
                  ],
                  "path": [
                    "folders",
                    "{{folder_id}}"
                  ],
                  "query": [
                    {
                      "key": "include",
                      "value": "true"
                    }
                  ]
                },
                "description": ""
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"0144f7ed-…\",\n  \"name\": \"Onboarding notes\",\n  \"parentFolderId\": \"0c25a285-…\",\n  \"ancestors\": [\n    {\n      \"id\": \"0c25a285-…\",\n      \"name\": \"HR\"\n    }\n  ],\n  \"documents\": [\n    {\n      \"id\": \"3c76ff09-…\",\n      \"name\": \"comments.md\",\n      \"contentType\": \"text/markdown\",\n      \"folderId\": \"0144f7ed-…\",\n      \"version\": 1\n    }\n  ],\n  \"subfolders\": [\n    {\n      \"id\": \"9e2a…\",\n      \"name\": \"_hippocampus\"\n    }\n  ]\n}"
            }
          ]
        },
        {
          "name": "GET /documents — documents in a folder",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{vault_url}}/documents?folderId={{folder_id}}",
              "host": [
                "{{vault_url}}"
              ],
              "path": [
                "documents"
              ],
              "query": [
                {
                  "key": "folderId",
                  "value": "{{folder_id}}"
                }
              ]
            },
            "description": ""
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{vault_url}}/documents?folderId={{folder_id}}",
                  "host": [
                    "{{vault_url}}"
                  ],
                  "path": [
                    "documents"
                  ],
                  "query": [
                    {
                      "key": "folderId",
                      "value": "{{folder_id}}"
                    }
                  ]
                },
                "description": ""
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "[\n  {\n    \"id\": \"0001b85f-…\",\n    \"name\": \"Onboarding notes.md\",\n    \"contentType\": \"text/markdown\",\n    \"folderId\": \"0144f7ed-…\",\n    \"version\": 1,\n    \"createdAt\": \"2026-09-08T09:15:17.000Z\"\n  }\n]"
            }
          ]
        }
      ]
    },
    {
      "name": "Read",
      "item": [
        {
          "name": "GET /documents/{id} — one document",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{vault_url}}/documents/{{document_id}}",
              "host": [
                "{{vault_url}}"
              ],
              "path": [
                "documents",
                "{{document_id}}"
              ]
            },
            "description": ""
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{vault_url}}/documents/{{document_id}}",
                  "host": [
                    "{{vault_url}}"
                  ],
                  "path": [
                    "documents",
                    "{{document_id}}"
                  ]
                },
                "description": ""
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"0001b85f-…\",\n  \"name\": \"Onboarding notes.md\",\n  \"contentType\": \"text/markdown\",\n  \"size\": 510,\n  \"version\": 1,\n  \"folderId\": \"d3f3ed56-…\",\n  \"createdAt\": \"2026-09-08T09:15:17.000Z\",\n  \"content\": \"---\\ntype: document\\ntitle: Onboarding notes\\n---\\n…\"\n}"
            }
          ]
        },
        {
          "name": "POST /documents/batch — up to 100 documents",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{vault_url}}/documents/batch",
              "host": [
                "{{vault_url}}"
              ],
              "path": [
                "documents",
                "batch"
              ]
            },
            "description": "",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ids\": [\n    \"{{document_id}}\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{vault_url}}/documents/batch",
                  "host": [
                    "{{vault_url}}"
                  ],
                  "path": [
                    "documents",
                    "batch"
                  ]
                },
                "description": "",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"ids\": [\n    \"{{document_id}}\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "[\n  {\n    \"id\": \"0001b85f-…\",\n    \"name\": \"Onboarding notes.md\",\n    \"contentType\": \"text/markdown\",\n    \"content\": \"---\\ntype: document\\n…\"\n  },\n  {\n    \"id\": \"3c76ff09-…\",\n    \"name\": \"comments.md\",\n    \"contentType\": \"text/markdown\",\n    \"content\": \"…\"\n  }\n]"
            }
          ]
        },
        {
          "name": "GET /documents/{id}/content — the stored file",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{vault_url}}/documents/{{document_id}}/content",
              "host": [
                "{{vault_url}}"
              ],
              "path": [
                "documents",
                "{{document_id}}",
                "content"
              ]
            },
            "description": "Use \"Send and Download\" to save the file."
          },
          "response": []
        },
        {
          "name": "GET /documents/{id}/tags — tags",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{vault_url}}/documents/{{document_id}}/tags",
              "host": [
                "{{vault_url}}"
              ],
              "path": [
                "documents",
                "{{document_id}}",
                "tags"
              ]
            },
            "description": ""
          },
          "response": [
            {
              "name": "Example",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{vault_url}}/documents/{{document_id}}/tags",
                  "host": [
                    "{{vault_url}}"
                  ],
                  "path": [
                    "documents",
                    "{{document_id}}",
                    "tags"
                  ]
                },
                "description": ""
              },
              "status": "OK",
              "code": 200,
              "_postman_previewlanguage": "json",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"tags\": [\n    \"onboarding\",\n    \"hr\"\n  ]\n}"
            }
          ]
        }
      ]
    }
  ]
}
