Variable postAsyncMessageSchemaConst
postAsyncMessageSchema: ZodObject<
{
idempotencyKey: ZodOptional<ZodString>;
text: ZodOptional<ZodString>;
attachments: ZodOptional<
ZodArray<
ZodObject<
{
stagingKey: ZodString;
fileName: ZodOptional<ZodString>;
mimeType: ZodOptional<ZodString>;
},
$strict,
>,
>,
>;
},
$strict,
> = ...
Body of
POST /v1/async-consults/{id}/messages— a PATIENT-authored message from your own chat UI (headless integration).Accepted with
202: the message is enqueued into the per-patient FIFO pipeline (same lane as every other channel) and appears on the transcript (and as anasync_consult.messagewebhook) moments later. If the thread closes before processing, you receiveasync_consult.message_rejectedinstead — a patient message is never silently dropped.At least one of
text/attachmentsis required.