FollowMyPatient API (1.0.0)

Download OpenAPI specification:Download

API integration for FollowMyPatient systems.

How to Start

  1. Register in the FMP system or log in here
  2. Generate an apiKey on FMP Profile
  3. Set the basic voices here
  4. Adds questions to the system here
  5. Creates your first Flow here

Flow

A Flow is a structured sequence of questions and end actions. End actions are executed at the conclusion of the flow, such as sending an SMS or email, or making an API call. Within a flow, you can create scenarios and assign points to possible answers. These points help determine the appropriate course of action when the flow reaches a specific point. Assigning points is optional, but it allows for more granular decision-making based on user responses.

Get Flows By Partner

Returns all Flows for the Partner based on their API KEY

Request Body schema: application/json
apiKey
required
string

Responses

Request samples

Content type
application/json
{
  • "apiKey": "your_api_key"
}

Response samples

Content type
application/json
{
  • "errorMsg": "string",
  • "success": true,
  • "flows": [
    ]
}

Set Flow End Action URL

Sets a callback URL to call with POST method after the event has run and send data back in JSON. More on callbacks part.

Request Body schema: application/json
apiKey
required
string
flowId
required
string
endActionURL
required
string

Responses

Callbacks

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "flowId": "string",
  • "success": true,
  • "errorMsg": "string"
}

Callback payload samples

Callback
POST: https://example.com/callbackUrl
Content type
application/json
{
  • "eventId": "string",
  • "originalEventId": "string",
  • "client": {
    },
  • "status": "Active",
  • "flowId": "string"
}

Event

An Event triggers the execution of a flow by specifying a client and a scheduled time. Events can be configured to run the flow either once or on a recurring basis—daily, weekly, yearly, or at any other interval. This allows you to automate the flow's execution according to your desired schedule.

Set Event

Set Event

Request Body schema: application/json
apiKey
required
string
flowId
required
string
required
object
date
required
string <date-time>

ISO 8601 standard

repeatCount
required
integer
Default: 0

How many times should repeat based on repeatType

isInfinite
required
boolean
Default: false

If true, it will repeat this event based on the repeatType until it is turned off.

repeatType
required
string
Enum: "Daily" "Weekly" "Monthly" "Yearly"

Responses

Request samples

Content type
application/json
{
  • "apiKey": "your_api_key",
  • "flowId": "flow_id",
  • "client": {
    },
  • "date": "2024-05-22T13:12:01.470Z",
  • "repeatCount": 0,
  • "isInfinite": false,
  • "repeatType": "Daily"
}

Response samples

Content type
application/json
{
  • "eventId": "string",
  • "success": true,
  • "errorMsg": "string"
}

Get Event Status

Returns the status of an event and, if the status is "Completed", returns the questions and answers too

Request Body schema: application/json
apiKey
required
string
eventId
required
string

Responses

Request samples

Content type
application/json
{
  • "apiKey": "your_api_key",
  • "eventId": "event_id"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "errorMsg": "string",
  • "status": "Active",
  • "eventId": "string",
  • "answers": [
    ]
}

DynamicCall

Dynamic Calls let you trigger a fully customisable outbound voice call without setting up a Flow. You supply a template ID and a set of variables; the system renders the text, converts it to speech, and places the call. Results are delivered asynchronously to your webhookUrl.

Get Templates

Returns all available voice templates for the company associated with the provided API key. Only returns the template name, text, and required variable keys.

Request Body schema: application/json
apiKey
required
string

Responses

Request samples

Content type
application/json
{
  • "apiKey": "your_api_key"
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "templates": [
    ]
}

Initiate a Dynamic Call

Triggers an outbound call to the specified phone number using a pre-configured voice template. The template text is rendered with the provided variables and converted to speech before calling.

If a webhookUrl is provided, the system will POST the call result to that URL once the call ends. No webhook is sent while the call is still in progress.

Concurrency limit: Maximum of 3 simultaneous calls per account. Requests exceeding this limit will be rejected until a slot becomes available.

Webhook timing:

  • For busy, no-answer, or failed calls: webhook fires immediately after the status is received.
  • For completed calls: webhook fires after the recording is uploaded to storage (a few seconds after the call ends).
Request Body schema: application/json
apiKey
required
string

Your company API key (accessToken from your FMP account).

templateId
required
string

ID of the voice template to use. Must belong to the company associated with the apiKey.

phoneNumber
required
string

Destination phone number in E.164 format.

userId
required
string

Your internal user or patient identifier. Stored as-is and returned in the webhook.

object

Key-value pairs to fill in the template's dynamic placeholders. Required keys depend on the template.

webhookUrl
string

Optional URL to receive a POST notification when the call ends.

Responses

Callbacks

Request samples

Content type
application/json
{
  • "apiKey": "your_api_key",
  • "templateId": "64f1a2b3c4d5e6f7a8b9c0d1",
  • "phoneNumber": "+36201234567",
  • "userId": "patient-abc-123",
  • "variables": {
    },
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "eventId": "64f1a2b3c4d5e6f7a8b9c0d2",
  • "message": "Call initiated"
}

Callback payload samples

Callback
POST: Call result webhook
Content type
application/json
{
  • "status": "completed",
  • "recordingUrl": "string",
  • "userId": "string",
  • "templateId": "string",
  • "callDuration": 0
}