Skip to main content
GET
/
medical
/
v1
/
message
List Messages
curl --request GET \
  --url https://api.sandbox.metriport.com/medical/v1/message \
  --header 'x-api-key: <api-key>'
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi("YOUR_API_KEY");

const { meta, messages } = await metriport.listMessages({
  direction: "outbound",
  patientId: "00000000-0000-0000-0000-000000000000",
});
This endpoint is currently under construction. Please reach out to support if you'd like to use it.
Returns all secure messages for your organization - both messages you have sent and messages received from other practitioners.
Note that some inbound messages might not be tied to any specific patient.
For real-time inbound notifications, use the message.received webhook rather than polling this endpoint.
This is a paginated endpoint. For more information see pagination.

Query Params

direction
string
Filter messages by direction. One of outbound or inbound. If not provided, both directions are returned.
patientId
string
Filter messages to those related to a specific Patient.

Response

meta
object
required
Pagination metadata. See pagination.
An array of Communication resources representing inbound and outbound messages. These resources also appear in the patient’s Consolidated Data bundle.
messages
Communication[]
required
See FHIR Communication. Key properties populated for messages:
{
  "meta": {
    "nextPage": "https://api.metriport.com/medical/v1/message?fromItem=33333333-3333-3333-3333-333333333333&count=50&direction=outbound",
    "itemsOnPage": 2,
    "itemsInTotal": 14
  },
  "messages": [
    {
      "resourceType": "Communication",
      "id": "00000000-0000-0000-0000-000000000000",
      "status": "completed",
      "subject": {
        "reference": "Patient/00000000-0000-0000-0000-000000000000",
        "type": "Patient"
      },
      "topic": {
        "text": "Referral - cardiology"
      },
      "sender": {
        "display": "Your Organization Name"
      },
      "recipient": [
        {
          "type": "Organization",
          "display": "1.2.840.114350.1.13.300.3.7.3.688884.100.1"
        },
        {
          "type": "Practitioner",
          "display": "1234567893"
        }
      ],
      "sent": "2026-06-16T18:40:00.000Z",
      "payload": [
        {
          "contentReference": {
            "reference": "DocumentReference/00000000-0000-0000-0000-000000000000"
          }
        }
      ],
      "extension": [
        {
          "url": "https://public.metriport.com/fhir/StructureDefinition/data-source.json",
          "valueCoding": {
            "system": "https://public.metriport.com/fhir/StructureDefinition/data-source.json",
            "code": "METRIPORT"
          }
        }
      ]
    },
    {
      "resourceType": "Communication",
      "id": "11111111-1111-1111-1111-111111111111",
      "status": "completed",
      "subject": {
        "reference": "Patient/00000000-0000-0000-0000-000000000000",
        "type": "Patient"
      },
      "topic": {
        "text": "Follow-up notes"
      },
      "sender": {
        "display": "referrals@cardio.direct.partner.com"
      },
      "recipient": [
        {
          "type": "Organization",
          "display": "Your Organization Name"
        },
        {
          "type": "Practitioner",
          "display": "1234567893"
        }
      ],
      "received": "2026-06-16T19:10:00.000Z",
      "payload": [
        {
          "contentReference": {
            "reference": "DocumentReference/11111111-1111-1111-1111-111111111111"
          }
        }
      ],
      "extension": [
        {
          "url": "https://public.metriport.com/fhir/StructureDefinition/data-source.json",
          "valueCoding": {
            "system": "https://public.metriport.com/fhir/StructureDefinition/data-source.json",
            "code": "MESSAGE_DELIVERY"
          }
        },
        {
          "url": "https://public.metriport.com/fhir/StructureDefinition/data-source.json",
          "valueCoding": {
            "system": "https://public.metriport.com/fhir/StructureDefinition/data-source.json",
            "code": "TEFCA"
          }
        }
      ]
    }
  ]
}
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi("YOUR_API_KEY");

const { meta, messages } = await metriport.listMessages({
  direction: "outbound",
  patientId: "00000000-0000-0000-0000-000000000000",
});

Rate Limits

See limits and throttling