Send Chat Message
Send one message to Chat and wait for the complete reply. Chat runs with a workflow as context and can call its tools (edit blocks, read logs, query tables, and so on) on behalf of the API key's user. The request is synchronous: the response arrives once the turn finishes, which can take minutes for multi-step work. Pass the returned `chatId` on the next request to continue the same conversation. For a new chat, if `workflowId` is omitted, Chat uses the workflow named by `workflowName`, or else the user's first workflow. When continuing with `chatId`, Chat keeps that conversation's workflow and history; you do not need to repeat the workflow. An explicit workflow must match the chat's workflow. Chats without an attached workflow cannot be continued through this endpoint. Chat acts with the key owner's full access, so this endpoint needs an unrestricted personal API key with write access to the target workflow, in a workspace that allows personal API keys. Scoped, workspace and organization keys are rejected with `403` for now. Requests count against the same v1 API request limit as the workflows, logs, and audit logs endpoints. `/api/v1/copilot/chat` is a compatibility alias for this endpoint and accepts the same request.
/api/v1/chatAuthorization
apiKey Your SteelEngine API key (personal, workspace, or organization). Create personal and workspace keys under Settings > API Keys. Create organization keys under Organization Settings > API Keys.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/chat" \ -H "Content-Type: application/json" \ -d '{ "message": "Add a Slack notification after the Agent block", "workflowId": "wf_abc123" }'{ "success": true, "content": "I added a Slack block after Agent 1 and connected it.", "toolCalls": [ { "id": "call_1", "name": "edit_workflow", "status": "success", "durationMs": 840 } ], "chatId": "chat_abc123"}