Messaging

Send practice messages and configure scripted patient replies

Requires GP scope. Existing conversations/templates require resourceId and their latest expectedVersion. New conversations require patientId. Commands are validated by role. Mutations are attributed to the authenticated team; incoming/outgoing direction identifies the simulated role. Patient responses omit private practice information. Practice messages are queued until a delivery command marks them delivered. configure_auto_reply sets an ordered script for future successful deliveries: each delivered outgoing message consumes one step and schedules a reply after delayMinutes of simulation time. Configure before delivery, then POST /api/clock with paused:true and advanceMinutes. Reconfiguration resets the script and cancels pending replies; empty steps disable it. Manual patient replies and completing a conversation cancel pending replies without reusing consumed steps. Read the latest conversation version after clock changes. Existing generic messaging_action commands remain supported.

post/api/sites/gp/messages

Request

  • Base URL
    https://sim.animahealth.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or API key in cookie sim_session

Query parameters

worldstring

Operator only: world to inspect or mutate. Team keys always use their own world.

Headers

Idempotency-Keystring

Stable unique value for retries of the same action. Reuse it after an uncertain response; use a new value for a new action. Takes precedence over body clientRequestId.

Request body

resourceIdstring
expectedVersioninteger
patientIdstring

Response

Success

idstring required
patientIdstring
kindstring required
titlestring required
statusstring required
ownerstring required
visibleTostring[] required
priority'routine' | 'urgent' required
createdAtnumber required

Simulation Unix timestamp in milliseconds.

dueAtnumber

Simulation Unix timestamp in milliseconds.

dataobject required

Kind-specific payload. Hospital notes, medication orders and blood-test orders use the named schemas; the full workspace payload is returned without projection.

versioninteger required

Changes

No recorded changes to this operation across all 1 revision of this API.