🚀 Simplify your work by integrating Haufe CoPilot Connect via API or MCP
Skip to Content
Threads

Create a run

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.

POST/v1/threads/{thread_id}/run

Authorization

api-key<token>

In: header

Path Parameters

thread_id*Thread Id
Formatuuid

Request Body

application/json

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/run" \  -H "Content-Type: application/json" \  -d '{}'
{  "content": "Während der Probezeit beträgt die Kündigungsfrist gemäß § 622 Abs. 3 BGB zwei Wochen. Diese Frist gilt für beide Seiten.",  "created_at": "2025-03-15T09:13:02.654321Z",  "id": "5e6f7081-9012-def0-1234-556677889900",  "meta_data": {    "intent": "Kündigungsfrist Probezeit",    "legal_advice": false,    "type": "53aa66b7-b874-407f-967c-3a959c919d62"  },  "role": "assistant",  "sources": [    {      "meta_data": {        "doc_url": "https://products.haufe.de/{license_id}/document/HI1234567{?auth_realm}",        "hi": "HI1234567",        "title": "Kündigungsfristen in der Probezeit"      }    }  ],  "thread_id": "1a2b3c4d-5678-9abc-def0-112233445566"}