# Overview - [Support & Contact](/contact): Get help with technical emergencies or learn how to become a Copilot via API customer. - [Copilot via API](/): Integrate Haufe's AI-powered copilots — specialized in Tax, HR, Sustainability, and more — directly into your applications. - [Usage Guidelines](/usage-guidelines): Guidelines for using Copilot via API responses — answer integrity, retraining restrictions, and brand visibility requirements. - [Build a chatbot](/capabilities/use-case-chat): Build a multi-turn chatbot powered by Haufe expert knowledge using Threads. - [Tailored answers to your document](/capabilities/use-case-document): Upload documents and get precise, expert-backed answers instead of sifting through pages yourself. - [Use as a tool in your agent](/capabilities/use-case-tool): Consume the Haufe Copilot as a tool within your own AI agent or workflow using Chat Completions. # Documentation - [Overview](/docs): Guides, concepts, and reference material for integrating with Copilot via API. - [Copilot Usage](/docs/faq/copilot-usage): Questions about content packages, language models, sources, and usage metrics. - [Data & Privacy](/docs/faq/data-privacy): Questions about data storage, anonymization, and thread deletion. - [Overview](/docs/faq): Frequently asked questions about the Copilot API, content, and integration. - [Integration](/docs/faq/integration): Prerequisites and compatibility for API integration. - [Troubleshooting](/docs/faq/troubleshooting): Common errors and how to resolve them. - [Anonymization](/docs/guides/anonymization): How Copilot via API detects and anonymizes personally identifiable information (PII). - [Data Deletion](/docs/guides/data-deletion): How to delete threads and remove user information from Copilot via API. - [Deep Agent](/docs/guides/deep-agent): Event-driven streaming from Deep Agent, exposing typed content blocks. - [Error Handling](/docs/guides/error-handling): Error response structure, HTTP error codes, rate limit headers, and streaming errors. - [LLM-Friendly Documentation](/docs/guides/llms-txt): Use the llms.txt and llms-full.txt endpoints to feed documentation into LLMs for summarization, search, or context. - [MCP Integration](/docs/guides/mcp): Connect Haufe Copilot tools to AI agents and workflows via the Model Context Protocol (MCP). - [Overview](/docs/guides/overview): One agent, two ways to use it — threads or chat completions. - [Rate Limits](/docs/guides/rate-limits): Request rate limits for Copilot via API endpoints. - [Use Your Own Documents](/docs/guides/uploading-files): Learn how to upload text documents and integrate them to enable your assistant to deliver context-aware responses based on the content of your files. - [Overview](/docs/validation): Validation rules enforced by the Copilot API on request payloads. - [Message Validation](/docs/validation/messages): Validation rules applied to the messages collections in Chat Completions and Run requests. - [Request Metadata Validation](/docs/validation/metadata): Dynamic required-field validation for the meta_data field - [Authentication](/docs/getting-started/authentication): How to obtain and use your API key for Copilot via API. - [Developer Portal](/docs/getting-started/developer-portal): How to register for the Developer Portal and get your account validated before you can start using it. - [Overview](/docs/getting-started): Guides, concepts, and reference material for integrating with Copilot via API. - [Quickstart](/docs/getting-started/quickstart): Make your first Copilot via API call in minutes with this step-by-step guide. # API Reference - [API Reference](/api-reference): Haufe.ai Copilot via API documentation - [List assistants](/api-reference/assistants/get_all_assistants_v1_assistants_get): Returns all assistants available for the authenticated tenant. - [Get an assistant](/api-reference/assistants/get_assistant_properties_v1_assistants__assistant_id__get): Returns the properties of a single assistant by ID. - [Stream a chat completion with content blocks](/api-reference/chat-completions/create_chat_completions_events_stream_v1_chat_completions_events_stream_post): Streams an assistant response as NDJSON with a list of content blocks. - [Create a chat completion](/api-reference/chat-completions/create_chat_completions_new_v1_chat_completions_post): Returns an assistant response by sending one or more user messages. Does not stream the response. - [Stream a chat completion](/api-reference/chat-completions/create_chat_completions_stream_new_v1_chat_completions_stream_post): Streams an assistant response by sending one or more user messages. Returns an NDJSON stream. - [Delete feedback](/api-reference/feedback/delete_feedback_message_v1_threads__thread_id__messages__message_id__feedback_delete): Removes feedback from an assistant message. - [List negative feedback reasons](/api-reference/feedback/get_feedback_reasons_v1_feedback_negative_reasons_get): Returns the available categorized reasons for negative feedback. - [Create or update feedback](/api-reference/feedback/upsert_feedback_message_v1_threads__thread_id__messages__message_id__feedback_post): Adds or overwrites user feedback on an assistant message. Positive feedback must not include a reason or comment. - [Delete a file](/api-reference/files/delete_file_v1_files__file_id__delete): Deletes the file. Files already attached to a thread stay available within that thread until the thread itself is deleted. - [Get file content](/api-reference/files/get_file_content_v1_files__file_id__get): Returns the extracted text content of the file as plain text. - [Get file metadata](/api-reference/files/get_file_metadata_v1_files__file_id__metadata_get): Returns the file name, chunk and character counts, and the AI-extracted metadata of a file, such as language, summary, domain, document kind and author. The AI-extracted fields are populated once `extraction_status` is `completed`. - [Get file processing status](/api-reference/files/get_file_status_v1_files__file_id__status_get): Returns the current processing status, pipeline steps, and warnings. Poll until `processingStatus` is `PROCESSED` before attaching the file to a message. - [Request an upload URL](/api-reference/files/get_signed_url_v1_files_signed_url_get): Returns a pre-signed URL and a `file_id`. Upload your file via HTTP PUT to the returned `file_url`. Then poll `GET /files/{file_id}/status` until processing is complete, and attach the `file_id` to a message. - [List files](/api-reference/files/list_files_v1_files_get): Lists files for the given user, paginated. - [Health probe](/api-reference/healthchecks/handler_health_get): Returns overall service health status. - [Liveness probe](/api-reference/healthchecks/handler_health_liveness_get): Returns whether the service process is running. - [Readiness probe](/api-reference/healthchecks/handler_health_readiness_get): Returns whether the service is ready to accept requests. - [Create a message](/api-reference/threads/create_messages_new): Adds a message to a thread's message stack. Supports user, system, tool, and assistant roles. Cannot add messages to threads created via Chat Completions. Tool messages must follow an assistant message whose tool_call_id matches. System messages should be the first message in a thread. - [Stream a run](/api-reference/threads/create_run_events_stream_v1_threads__thread_id__run_events_stream_post): Invokes the assistant on a thread and streams the response as NDJSON with a list of content blocks. - [Create a run](/api-reference/threads/create_run_new_v1_threads__thread_id__run_post): Invokes the assistant on a thread and returns the response. Accepts optional tool configuration. The thread must contain at least one user message. An assistant message requesting tool calls must be followed by the corresponding tool messages. For every tool message, a corresponding assistant message with the same tool_call_id must exist. - [Stream a run](/api-reference/threads/create_run_stream_new_v1_threads__thread_id__run_stream_post): Invokes the assistant on a thread and streams the response as NDJSON. The thread must contain at least one user message and end on a user or tool message. An assistant message requesting tool calls must be followed by the corresponding tool messages. For every tool message, a corresponding assistant message with the same tool_call_id must exist. - [Create a thread](/api-reference/threads/create_thread_v1_threads_post): Creates a new conversation thread for stateful dialogues between an end user and an assistant. - [Delete a message](/api-reference/threads/delete_message_new_v1_threads__thread_id__messages__message_id__delete): Deletes a single message from a thread. - [Delete a thread](/api-reference/threads/delete_thread_v1_threads__thread_id__delete): Soft-deletes a thread and schedules redaction of the content of all its messages. - [List messages](/api-reference/threads/get_all_messages_new_v1_threads__thread_id__messages_get): Returns a paginated list of messages for a thread, ordered by creation date descending. Supports cursor-based pagination. - [List threads](/api-reference/threads/get_all_threads_v1_threads_get): Returns a paginated list of threads for the current tenant. Supports cursor-based pagination and filtering by user ID. - [Get a thread](/api-reference/threads/get_thread_by_id_v1_threads__thread_id__get): Returns the properties of a single thread by ID. - [Update a thread](/api-reference/threads/update_thread_v1_threads__thread_id__patch): Updates mutable properties of a thread such as its title.