Executing Text Bots Programmatically

A text bot can be started programmatically by calling into the MedChat start text bot execution endpoint.

Start Text Bot Execution Endpoint

The start text bot execution endpoint is available for customers who have purchased a texting number in the MedChat Texting product. Text bots started via this endpoint will run under the corresponding SMS chat for the specified recipient and sender phone number. They will be visible in the Texting section of the MedChat app, as will any SMS responses from the patient.

API documentation for the start text bot execution endpoint can be found here.

The call is an authenticated POST to https://medchatapp.com/smschatapi/external/orgs/{orgId}/textBotExecutions, with the following example request body:

{
  "textBotId": "146DFD69-B637-42F1-A3ED-D24AD15C6A3C",
  "recipientPhoneNumber": "2175551234",
  "name": "Jane Doe",
  "senderPhoneNumber": "8005559876"
}