Retrieve a session

GET
/sessions/{id}

Authorization

BearerAuth
AuthorizationBearer <token>

Medblocks API key for server-side requests.

In: header

Path Parameters

id*string

Session ID from the return URL.

Header Parameters

Version?string

Date-pinned API version. If omitted, Medblocks uses the version pinned on your API key.

Response Body

application/json

application/json

curl -X GET "https://example.com/sessions/string" \  -H "Version: 2026-04-25"
{  "id": "sess_01J9YQ8M2X4VZ6P2K5RH7M3KQT",  "resource_type": "session",  "status": "open",  "url": "https://app.medblocks.com/c/9c9b6f7a8e4f4a3b9c1e6f3a2d8b7c4d",  "patient_id": "user_42",  "connection_id": null,  "recommended_connection_ids": [    "fhirsrc_02Zh2bnvRoWQJYgOAkI0Twcc",    "fhirsrc_0a9Ea55aR4u7HaWMyFBN8wcc",    "fhirsrc_lcvXRHLSSI2WK9Prrt5Qggcc"  ],  "return_url": "https://app.example.com/connected",  "return_button_label": "Acme Health",  "connections": [],  "expires_at": "2026-04-25T15:00:00.000Z",  "metadata": {    "signup_source": "checkout"  },  "created_at": "2026-04-25T14:30:00.000Z"}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "doc_url": "http://example.com",    "request_id": "string"  }}
Non-2xx responses use the standard API error envelope. Log error.code and error.request_id for support.