Skip to main content
POST
/
ai
/
patient
/
suggestions
Generate Patient Suggestions
curl --request POST \
  --url https://api.decodahealth.com/ai/patient/suggestions \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "context": {
    "patient": {
      "firstName": "<string>",
      "lastName": "<string>",
      "dateOfBirth": "<string>",
      "gender": "<string>",
      "phoneNumber": "<string>",
      "email": "<string>",
      "createdDate": "<string>"
    },
    "upcomingAppointments": [
      {
        "title": "<string>",
        "start": "<string>",
        "id": "<string>",
        "status": "<string>",
        "providerName": "<string>"
      }
    ],
    "recentAppointments": [
      {
        "title": "<string>",
        "start": "<string>",
        "id": "<string>",
        "status": "<string>",
        "providerName": "<string>"
      }
    ],
    "recentNotes": [
      {
        "createdDate": "<string>",
        "summary": "<string>",
        "content": "<string>"
      }
    ],
    "measurements": [
      {
        "measurementDate": "<string>",
        "weight": 123,
        "height": 123,
        "systolicBp": 123,
        "diastolicBp": 123,
        "pulse": 123,
        "temperature": 123,
        "waistCircumference": 123
      }
    ],
    "medications": [
      {
        "name": "<string>",
        "amount": 123,
        "unit": "<string>",
        "frequency": "<string>",
        "quantity": 123,
        "comment": "<string>",
        "administrationLocation": "<string>"
      }
    ],
    "recentCharges": [
      {
        "id": "<string>",
        "total": 123,
        "totalOutstanding": 123,
        "status": "<string>",
        "description": "<string>",
        "createdDate": "<string>",
        "items": [
          {
            "quantity": 123,
            "price": 123,
            "name": "<string>",
            "description": "<string>",
            "discountAmount": 123
          }
        ],
        "payments": [
          {}
        ]
      }
    ],
    "recentForms": [
      {
        "submissionDate": "<string>",
        "isCompleted": true,
        "name": "<string>"
      }
    ],
    "quickNotes": [
      {
        "note": "<string>",
        "createdDate": "<string>",
        "eventId": "<string>"
      }
    ],
    "tenant": {
      "name": "<string>",
      "clinicType": "DEFAULT",
      "timezone": "<string>"
    }
  },
  "modelName": "gemini-2.5-flash-lite",
  "useStructuredOutput": false,
  "conversationHistory": [
    {
      "role": "user",
      "content": "<string>",
      "timestamp": "<string>",
      "files": [
        {
          "name": "<string>",
          "size": 123,
          "type": "<string>",
          "data": "<string>"
        }
      ]
    }
  ],
  "files": [
    {
      "name": "<string>",
      "size": 123,
      "type": "<string>",
      "data": "<string>"
    }
  ]
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

application/json

Request schema for generating follow-up suggestions.

context
PatientSummaryContext · object
required

Patient context from frontend

modelName
string
default:gemini-2.5-flash-lite

Model to use for generation

useStructuredOutput
boolean
default:false

Whether to request structured JSON output

conversationHistory
ConversationMessage · object[] | null

Previous conversation messages for context

files
FileAttachment · object[] | null

File attachments for the current request

Response

Successful Response