APIs intended for internal use by Tidepool.
Messages API (1.0)
The Tidepool API is an HTTP REST API used by Tidepool clients use to communicate with the Tidepool Platform.
For more information, see the Getting Started section.
https://tidepool.redocly.app/_mock/reference/message.v1/
https://external.integration.tidepool.org/
https://api.tidepool.org/
https://dev1.dev.tidepool.org/
https://qa1.development.tidepool.org/
https://qa2.development.tidepool.org/
Messages
List, create and manage messages (also known as notes) in the user's account.
All APIs require a valid session token provided via the X-Tidepool-Session-Token
header. There is currently no unauthenticated access to messages.
The common API input parameter userId
is a Tidepool User ID that identifies the user whose account contains the messages. That user may have shared their account with (=given permission to) other users who can view and manage messages in their account. Therefore, in each API request the user ID identified with the session token must either a) match the userId
parameter, or b) the corresponding user must have been granted the note
permission to manage messages in the user account identified by userId
.
Similarly, in the API responses the groupid
field is a Tidepool User ID that identifies the user whose account contains the messages, corresponding to the userId
parameter in requests. The userid
field identifies the user who actually created the message, corresponding to the user ID encoded within the session token. The message was created by the owner of the account if these two fields match.
Each message has a unique message ID, and the messages can be threaded. A user can create either a new message, or create a reply to another message. Each message contains a parentmessage
field that contains the message ID of previous message in the thread. Messages that have no parentmessage
field value (i.e. it is null
) are top-level messages, that is, the beginning of a message thread.
See the Authorization API for details on how permissions are managed.
- Mock server
https://tidepool.redocly.app/_mock/reference/message.v1/message/all/{userId}
- integration
https://external.integration.tidepool.org/message/all/{userId}
- production
https://api.tidepool.org/message/all/{userId}
- dev1
https://dev1.dev.tidepool.org/message/all/{userId}
- qa1
https://qa1.development.tidepool.org/message/all/{userId}
- qa2
https://qa2.development.tidepool.org/message/all/{userId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://tidepool.redocly.app/_mock/reference/message.v1/message/all/{userId}?starttime=2017-02-06T02%3A37%3A46Z&endtime=2017-02-06T02%3A37%3A46Z' \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'
{ "messages": [ { … } ] }
Request
List only the top-level message threads in the user account identified by userId
, optionally within the time range bounded by starttime
and/or endtime
. Top-level messages are the starting point of each message thread (i.e. parentmessage
== null
), that is, messages that are not responses to other messages.
- Mock server
https://tidepool.redocly.app/_mock/reference/message.v1/message/notes/{userId}
- integration
https://external.integration.tidepool.org/message/notes/{userId}
- production
https://api.tidepool.org/message/notes/{userId}
- dev1
https://dev1.dev.tidepool.org/message/notes/{userId}
- qa1
https://qa1.development.tidepool.org/message/notes/{userId}
- qa2
https://qa2.development.tidepool.org/message/notes/{userId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://tidepool.redocly.app/_mock/reference/message.v1/message/notes/{userId}?starttime=2017-02-06T02%3A37%3A46Z&endtime=2017-02-06T02%3A37%3A46Z' \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'
{ "messages": [ { … } ] }
- Mock server
https://tidepool.redocly.app/_mock/reference/message.v1/message/send/{userId}
- integration
https://external.integration.tidepool.org/message/send/{userId}
- production
https://api.tidepool.org/message/send/{userId}
- dev1
https://dev1.dev.tidepool.org/message/send/{userId}
- qa1
https://qa1.development.tidepool.org/message/send/{userId}
- qa2
https://qa2.development.tidepool.org/message/send/{userId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://tidepool.redocly.app/_mock/reference/message.v1/message/send/{userId}' \
-H 'Content-Type: application/json' \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE' \
-d '{
"message": {
"messagetext": "string",
"timestamp": "2017-02-06T02:37:46Z",
"guid": "b9468a76-4afc-4c33-8d1d-1f08324d9160"
}
}'
{ "id": "60e64ddf98b2350011b0f37f" }
- Mock server
https://tidepool.redocly.app/_mock/reference/message.v1/message/reply/{messageId}
- integration
https://external.integration.tidepool.org/message/reply/{messageId}
- production
https://api.tidepool.org/message/reply/{messageId}
- dev1
https://dev1.dev.tidepool.org/message/reply/{messageId}
- qa1
https://qa1.development.tidepool.org/message/reply/{messageId}
- qa2
https://qa2.development.tidepool.org/message/reply/{messageId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://tidepool.redocly.app/_mock/reference/message.v1/message/reply/60e64ddf98b2350011b0f37f \
-H 'Content-Type: application/json' \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE' \
-d '{
"message": {
"messagetext": "string",
"timestamp": "2017-02-06T02:37:46Z",
"guid": "b9468a76-4afc-4c33-8d1d-1f08324d9160"
}
}'
{ "id": "60e64ddf98b2350011b0f37f" }
- Mock server
https://tidepool.redocly.app/_mock/reference/message.v1/message/read/{messageId}
- integration
https://external.integration.tidepool.org/message/read/{messageId}
- production
https://api.tidepool.org/message/read/{messageId}
- dev1
https://dev1.dev.tidepool.org/message/read/{messageId}
- qa1
https://qa1.development.tidepool.org/message/read/{messageId}
- qa2
https://qa2.development.tidepool.org/message/read/{messageId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://tidepool.redocly.app/_mock/reference/message.v1/message/read/60e64ddf98b2350011b0f37f \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'
{ "message": { "id": "60e64ddf98b2350011b0f37f", "guid": "b9468a76-4afc-4c33-8d1d-1f08324d9160", "parentmessage": "60e64ddf98b2350011b0f37f", "userid": "string", "groupid": "string", "timestamp": "2017-02-06T02:37:46Z", "createdtime": "2017-02-06T02:37:46Z", "modifiedtime": "2017-02-06T02:37:46Z", "messagetext": "I ate a taco with 10g of carbs", "user": { … } } }
- Mock server
https://tidepool.redocly.app/_mock/reference/message.v1/message/thread/{messageId}
- integration
https://external.integration.tidepool.org/message/thread/{messageId}
- production
https://api.tidepool.org/message/thread/{messageId}
- dev1
https://dev1.dev.tidepool.org/message/thread/{messageId}
- qa1
https://qa1.development.tidepool.org/message/thread/{messageId}
- qa2
https://qa2.development.tidepool.org/message/thread/{messageId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://tidepool.redocly.app/_mock/reference/message.v1/message/thread/60e64ddf98b2350011b0f37f \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'
{ "messages": [ { … } ] }
- Mock server
https://tidepool.redocly.app/_mock/reference/message.v1/message/edit/{messageId}
- integration
https://external.integration.tidepool.org/message/edit/{messageId}
- production
https://api.tidepool.org/message/edit/{messageId}
- dev1
https://dev1.dev.tidepool.org/message/edit/{messageId}
- qa1
https://qa1.development.tidepool.org/message/edit/{messageId}
- qa2
https://qa2.development.tidepool.org/message/edit/{messageId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://tidepool.redocly.app/_mock/reference/message.v1/message/edit/60e64ddf98b2350011b0f37f \
-H 'Content-Type: application/json' \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE' \
-d '{
"message": {
"messagetext": "string",
"timestamp": "2017-02-06T02:37:46Z"
}
}'
- Mock server
https://tidepool.redocly.app/_mock/reference/message.v1/message/remove/{messageId}
- integration
https://external.integration.tidepool.org/message/remove/{messageId}
- production
https://api.tidepool.org/message/remove/{messageId}
- dev1
https://dev1.dev.tidepool.org/message/remove/{messageId}
- qa1
https://qa1.development.tidepool.org/message/remove/{messageId}
- qa2
https://qa2.development.tidepool.org/message/remove/{messageId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://tidepool.redocly.app/_mock/reference/message.v1/message/remove/60e64ddf98b2350011b0f37f \
-H 'X-Tidepool-Session-Token: YOUR_API_KEY_HERE'