List Messages
curl --request GET \
--url https://api.sandbox.metriport.com/medical/v1/message \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sandbox.metriport.com/medical/v1/message"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.metriport.com/medical/v1/message', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.metriport.com/medical/v1/message",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.metriport.com/medical/v1/message"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.metriport.com/medical/v1/message")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.metriport.com/medical/v1/message")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyimport { 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",
});
Message
List Messages
List all inbound and outbound messages.
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 requests
url = "https://api.sandbox.metriport.com/medical/v1/message"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.metriport.com/medical/v1/message', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.metriport.com/medical/v1/message",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.metriport.com/medical/v1/message"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.metriport.com/medical/v1/message")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.metriport.com/medical/v1/message")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyimport { 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.
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.Query Params
Filter messages by direction. One of
outbound or
inbound. If not provided, both directions are returned.Filter messages to those related to a specific Patient.
Response
Pagination metadata. See
pagination.
See FHIR Communication. Key properties populated for messages:
Show Communication properties
Show Communication properties
Always
Communication.The ID of the message.
The delivery status. See Communication.status.
For outbound messages, one of
in-progress, completed,
not-done (error on the recipient’s end).
For inbound messages, completed.Reason for the status. Will only be provided if the status is
not-done.Reference to the Patient the message relates to. May be absent for unmatched inbound messages.
The subject line of the message.
Your organization’s name.
The intended recipient(s). Present on outbound messages. See Communication.recipient.
ISO 8601 timestamp of when the message was sent. Present on outbound messages.
ISO 8601 timestamp of when the message was received. Present on inbound messages.
The message body and attached documents. See Communication.payload.
Metriport extensions, including message direction (
outbound or inbound).{
"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⌘I

