Messages

A message is a note between a subject and a study administrator (user) sent through the BioStamp® nPoint™ Link app or BioStamp® nPoint™ Investigator Portal.

Get Messages for Subject

Get all messages to or from a subject.

URL

GET https://mc10cloud.com/api/v1/studies/{studyId}/subjects/{subjectId}/messages

Parameters

  • studyId: Study UUID

  • subjectId: Subject UUID

Sample Response

{
"items": [
{
"author": {
"displayName": "John Smith",
"id": "e3ec488c-6564-11e9-8d34-0637976ce150",
"parentId": "7aa46580-46b4-11e5-8080-808080808080",
"principalType": "USER"
},
"body": "This is Dr. Smith. Checking in to see if you've had any issues with the exercise protocol. Thanks!",
"createdTs": 1556823451217,
"id": "2361fc10-6d0c-11e9-9b07-2610f99b5a02",
"isRead": true,
"studyId": "f7888660-4f14-11e8-a47c-028eb5a65596",
"subjectId": "22785730-520b-11e8-a47c-028eb5a65596"
}
],
...
"size": 3
}

Get Unread Messages for Account

Get a list of unread messages from subjects to administrators, across all studies.

URL

GET https://mc10cloud.com/api/v1/accounts/{accountId}/messages

Parameters

  • accountId: Account UUID

Sample Response

{
"items": [
{
"author": {
"displayName": "S27",
"id": "936ff950-7e2c-11e8-9d8c-025a9bf91026",
"parentId": "961c8740-7e22-11e8-b5a4-06a3c48479e6",
"principalType": "SUBJECT"
},
"body": "My skin is a little irritated from the thigh sensor. See this pic. Can I move it over a few inches?",
"createdTs": 1530634179890,
"id": "7d3d3120-7edb-11e8-b5a4-06a3c48479e6",
"image": {
"href": "https://mc10-cdn-int.s3.us-west-2.amazonaws.com/private/...",
"mimeType": "image/jpeg",
"sizeBytes": 38584
},
"isRead": false,
"studyId": "961c8740-7e22-11e8-b5a4-06a3c48479e6",
"subjectId": "936ff950-7e2c-11e8-9d8c-025a9bf91026"
},
...
],
"size": 15
}

Send Message to Subject

Send a message from yourself to a subject. (These messages appear in the BioStamp® nPoint™ Link app.)

URL

POST /studies/{studyId}/subjects/{subjectId}/messages

Parameters

  • studyId: Study UUID

  • subjectId: Subject UUID

Sample Request

Unlike other POST requests, this request must be encoded as multipart/form-data, in which each block of data is enclosed by a boundary defined by your user agent. In the following example, the "body" of the message is "Testing 1-2-3":

------FormBoundaryAdfJpfCIPHpBu18p
Content-Disposition: form-data; name="body"
Testing 1-2-3
------FormBoundaryAdfJpfCIPHpBu18p--

Sample Response

{
"id": "e877e000-7022-11e9-b5b3-e9750c9818f0",
"links": [
{
"href": "/v1/studies/d3adbd70-3a46-11e7-8c2f-0a2e9e9dd655/subjects/a40868b0-3a62-11e7-8c2f-0a2e9e9dd655/messages/e877e000-7022-11e9-b5b3-e9750c9818f0",
"rel": "self"
}
]
}