Skip to main content
GET
/
user-health
/
{userId}
/
protocols
User Protocols
curl --request GET \
  --url https://api.dontdie.com/user-health/{userId}/protocols \
  --header 'Authorization: Bearer <token>' \
  --header 'x-dd-client-id: <api-key>'
[
  {
    "id": "1234567890",
    "userId": "1234567890",
    "category": "Sleep",
    "type": "Routine",
    "name": "Protocol 1",
    "description": "Protocol 1 description",
    "goal": "Protocol 1 goal",
    "status": "Published",
    "startedOn": "2021-01-01",
    "endedOn": "2021-01-01"
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

x-dd-client-id
string
header
required

Your API client ID for the request

Path Parameters

userId
string
required

The ID of the user to get the score for

Response

200 - application/json

OK

id
string

The ID of the protocol

Example:

"1234567890"

userId
string

The ID of the user

Example:

"1234567890"

category
enum<string>

The category of the protocol

Available options:
Sleep,
Nutrition,
Hydration,
Exercise,
Personal Care,
Social Life,
Mental Health,
Mindfulness,
Recovery,
Environment,
Avoidance,
Other
Example:

"Sleep"

type
enum<string>

The type of the protocol

Available options:
Routine,
Product,
Habit,
Guided Protocol,
Other
Example:

"Routine"

name
string

The name of the protocol

Example:

"Protocol 1"

description
string

The description of the protocol

Example:

"Protocol 1 description"

goal
string

The goal of the protocol

Example:

"Protocol 1 goal"

status
enum<string>

The status of the protocol

Available options:
Published,
Draft
Example:

"Published"

startedOn
string

The date the protocol was started

Example:

"2021-01-01"

endedOn
string

The date the protocol was ended

Example:

"2021-01-01"