Messaging

Start a patient conversation or send a patient reply

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/patient/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 required

Response

Success

idstring required
patientIdstring
kind'conversation' required
titlestring required
statusstring required
owner'gp' required
visibleTostring[] required
priority'routine' | 'urgent' required
createdAtnumber required

Simulation Unix timestamp in milliseconds.

dueAtnumber

Simulation Unix timestamp in milliseconds.

versioninteger required

Changes

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