Create a chat
Create a chat for the user identified by `X-Doctronic-User-ID` within the organization identified by the Bearer token.
/chats/Create a chat for the user identified by X-Doctronic-User-ID within the organization identified by the Bearer token.
The optional timezone field accepts an IANA timezone and defaults to UTC. The optional conversationPromptContext field supplies context for the clinical conversation. Content that fails input validation returns 400 error.partner.validation.
The response includes the chat's id and createdAt. Send the next message to POST /chats/{chatId}/stream/ to begin streaming. Both authentication credentials are required.
Authorization
HTTPBearer XDoctronicUserID In: header
Doctronic user ID returned as data.id by POST /users/. This value identifies the user in your organization scope; it is not an API token.
In: header
Header Parameters
Unique key for safely retrying this mutation for 24 hours. Reuse the same key only with the same request payload.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/chats/" \ -H "Content-Type: application/json" \ -d '{}'{ "code": "success", "message": "Request successful", "data": { "id": "string", "createdAt": "2019-08-24T14:15:22Z" }}