---
agentTools:
  projectIndex: https://curedao.readme.io/llms.txt
---

# Get user info

Returns user info.  If no userId is specified, returns info for currently authenticated user

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "CureDAO Unified Health API",
    "description": "A platform for participant-centered research and personal data exploration",
    "termsOfService": "https://quantimo.do/tos",
    "contact": {
      "name": "hello@curedao.org"
    },
    "license": {
      "name": "GNU General Public License v3 (GPL-3)",
      "url": "https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)"
    },
    "version": "0.0.1"
  },
  "servers": [
    {
      "url": "https://app.quantimo.do/api"
    }
  ],
  "tags": [
    {
      "name": "user",
      "description": "Get or update user info and settings",
      "externalDocs": {
        "description": "See it in action",
        "url": "https://web.quantimo.do/#/app/settings?accessToken=demo"
      }
    }
  ],
  "paths": {
    "/v3/user": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Get user info",
        "description": "Returns user info.  If no userId is specified, returns info for currently authenticated user",
        "operationId": "getUser",
        "parameters": [
          {
            "$ref": "#/components/parameters/userIdParam"
          },
          {
            "$ref": "#/components/parameters/createdAtParam"
          },
          {
            "$ref": "#/components/parameters/updatedAtParam"
          },
          {
            "$ref": "#/components/parameters/limitParam"
          },
          {
            "$ref": "#/components/parameters/offsetParam"
          },
          {
            "$ref": "#/components/parameters/sortParam"
          },
          {
            "$ref": "#/components/parameters/clientIdParam"
          },
          {
            "$ref": "#/components/parameters/appVersionParam"
          },
          {
            "$ref": "#/components/parameters/clientUserIdParam"
          },
          {
            "$ref": "#/components/parameters/log"
          },
          {
            "$ref": "#/components/parameters/pwd"
          },
          {
            "$ref": "#/components/parameters/includeAuthorizedClientsParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "description": "Not Authenticated",
            "content": {}
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "curedao_oauth2": [
              "basic"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AppSettings": {
        "type": "object",
        "properties": {
          "additionalSettings": {
            "type": "object",
            "properties": {}
          },
          "appDescription": {
            "type": "string"
          },
          "appDesign": {
            "type": "object",
            "properties": {}
          },
          "appDisplayName": {
            "type": "string"
          },
          "appStatus": {
            "type": "object",
            "properties": {}
          },
          "appType": {
            "type": "string"
          },
          "buildEnabled": {
            "type": "string"
          },
          "clientId": {
            "type": "string",
            "description": "Get yours at https:://builder.quantimo.do"
          },
          "clientSecret": {
            "type": "string",
            "description": "Get yours at https:://builder.quantimo.do"
          },
          "collaborators": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "createdAt": {
            "type": "string"
          },
          "userId": {
            "type": "integer",
            "description": "User id of the owner of the application",
            "format": "int32"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "redirectUri": {
            "type": "string"
          },
          "companyName": {
            "type": "string"
          },
          "homepageUrl": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string"
          },
          "longDescription": {
            "type": "string"
          },
          "splashScreen": {
            "type": "string"
          },
          "textLogo": {
            "type": "string"
          }
        }
      },
      "AuthorizedClients": {
        "required": [
          "apps",
          "individuals",
          "studies"
        ],
        "type": "object",
        "properties": {
          "apps": {
            "type": "array",
            "description": "Applications with access to user measurements for all variables",
            "items": {
              "$ref": "#/components/schemas/AppSettings"
            }
          },
          "individuals": {
            "type": "array",
            "description": "Individuals such as physicians or family members with access to user measurements for all variables",
            "items": {
              "$ref": "#/components/schemas/AppSettings"
            }
          },
          "studies": {
            "type": "array",
            "description": "Studies with access to generally anonymous user measurements for a specific predictor and outcome variable",
            "items": {
              "$ref": "#/components/schemas/AppSettings"
            }
          }
        }
      },
      "Button": {
        "required": [
          "link",
          "text"
        ],
        "type": "object",
        "properties": {
          "accessibilityText": {
            "type": "string",
            "description": "Ex: connect"
          },
          "action": {
            "type": "object",
            "properties": {},
            "description": "Action data"
          },
          "additionalInformation": {
            "type": "string",
            "description": "Ex: connect"
          },
          "color": {
            "type": "string",
            "description": "Ex: #f2f2f2"
          },
          "confirmationText": {
            "type": "string",
            "description": "Text to show user before executing functionName"
          },
          "functionName": {
            "type": "string",
            "description": "Name of function to call"
          },
          "parameters": {
            "type": "object",
            "properties": {},
            "description": "Data to provide to functionName or be copied to the card parameters when button is clicked and card is posted to the API"
          },
          "html": {
            "type": "string",
            "description": "Ex: connect"
          },
          "id": {
            "type": "string",
            "description": "HTML element id"
          },
          "image": {
            "type": "string",
            "description": "Ex: https://image.jpg"
          },
          "ionIcon": {
            "type": "string",
            "description": "Ex: ion-refresh"
          },
          "link": {
            "type": "string",
            "description": "Ex: https://local.quantimo.do"
          },
          "stateName": {
            "type": "string",
            "description": "State to go to"
          },
          "stateParams": {
            "type": "object",
            "properties": {},
            "description": "Data to provide to the state"
          },
          "successToastText": {
            "type": "string",
            "description": "Text to show user after executing functionName"
          },
          "successAlertTitle": {
            "type": "string",
            "description": "Text to show user after executing functionName"
          },
          "successAlertBody": {
            "type": "string",
            "description": "Text to show user after executing functionName"
          },
          "text": {
            "type": "string",
            "description": "Ex: Connect"
          },
          "tooltip": {
            "type": "string",
            "description": "Ex: This is a tooltip"
          },
          "webhookUrl": {
            "type": "string",
            "description": "Post here on button click"
          }
        }
      },
      "Card": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "actionSheetButtons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Button"
            }
          },
          "avatar": {
            "type": "string",
            "description": "Smaller square image"
          },
          "avatarCircular": {
            "type": "string",
            "description": "Smaller circular image"
          },
          "backgroundColor": {
            "type": "string",
            "description": "Ex: #f2f2f2"
          },
          "buttons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Button"
            }
          },
          "buttonsSecondary": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Button"
            }
          },
          "content": {
            "type": "string",
            "description": "Ex: Content"
          },
          "headerTitle": {
            "type": "string",
            "description": "Ex: Title"
          },
          "html": {
            "type": "string",
            "description": "HTML for the entire card."
          },
          "htmlContent": {
            "type": "string",
            "description": "Ex: <div>Content</div>"
          },
          "id": {
            "type": "string",
            "description": "HTML element id"
          },
          "image": {
            "type": "string",
            "description": "Larger image of variable dimensions"
          },
          "inputFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InputField"
            }
          },
          "ionIcon": {
            "type": "string",
            "description": "Ex: ion-refresh"
          },
          "link": {
            "type": "string",
            "description": "A link to a web page or something. Not much more to say about that."
          },
          "parameters": {
            "type": "object",
            "properties": {},
            "description": "Key value pairs derived from user input fields, button clicks, or preset defaults"
          },
          "relatedCards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Card"
            }
          },
          "selectedButton": {
            "$ref": "#/components/schemas/Button"
          },
          "sharingBody": {
            "type": "string",
            "description": "Ex: sharingBody"
          },
          "sharingButtons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Button"
            }
          },
          "sharingTitle": {
            "type": "string",
            "description": "Ex: sharingTitle"
          },
          "subHeader": {
            "type": "string",
            "description": "Ex: subTitle"
          },
          "subTitle": {
            "type": "string",
            "description": "Ex: subTitle"
          },
          "title": {
            "type": "string",
            "description": "Ex: Title"
          }
        }
      },
      "InputField": {
        "required": [
          "displayName",
          "type"
        ],
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string"
          },
          "helpText": {
            "type": "string"
          },
          "hint": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "description": "HTML element id"
          },
          "image": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "labelLeft": {
            "type": "string"
          },
          "labelRight": {
            "type": "string"
          },
          "link": {
            "type": "string"
          },
          "maxLength": {
            "type": "integer"
          },
          "maxValue": {
            "type": "number"
          },
          "minLength": {
            "type": "integer"
          },
          "minValue": {
            "type": "number"
          },
          "options": {
            "type": "array",
            "description": "Selector list options",
            "items": {
              "type": "string"
            }
          },
          "placeholder": {
            "type": "string",
            "description": "Ex: Title"
          },
          "postUrl": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "show": {
            "type": "boolean",
            "description": "Ex: Title"
          },
          "submitButton": {
            "$ref": "#/components/schemas/Button"
          },
          "type": {
            "type": "string",
            "description": "Ex: Title",
            "enum": [
              "check_box",
              "date",
              "email",
              "number",
              "postal_code",
              "select_option",
              "string",
              "switch",
              "text_area",
              "unit",
              "variable_category"
            ]
          },
          "validationPattern": {
            "type": "string",
            "description": "See http://html5pattern.com/ for examples"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "User": {
        "required": [
          "accessToken",
          "administrator",
          "displayName",
          "email",
          "id",
          "loginName"
        ],
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "description": "User access token"
          },
          "accessTokenExpires": {
            "type": "string",
            "description": "Ex: 2018-08-08 02:41:19"
          },
          "accessTokenExpiresAtMilliseconds": {
            "type": "integer",
            "description": "Ex: 1533696079000"
          },
          "administrator": {
            "type": "boolean",
            "description": "Is user administrator"
          },
          "authorizedClients": {
            "$ref": "#/components/schemas/AuthorizedClients"
          },
          "avatar": {
            "type": "string",
            "description": "Ex: https://lh6.googleusercontent.com/-BHr4hyUWqZU/AAAAAAAAAAI/AAAAAAAIG28/2Lv0en738II/photo.jpg?sz=50"
          },
          "avatarImage": {
            "type": "string",
            "description": "Ex: https://lh6.googleusercontent.com/-BHr4hyUWqZU/AAAAAAAAAAI/AAAAAAAIG28/2Lv0en738II/photo.jpg?sz=50"
          },
          "capabilities": {
            "type": "string",
            "description": "Ex: a:1:{s:13:\"administrator\";b:1;}"
          },
          "card": {
            "$ref": "#/components/schemas/Card"
          },
          "clientId": {
            "type": "string",
            "description": "Ex: curedao"
          },
          "clientUserId": {
            "type": "string",
            "description": "Ex: 118444693184829555362"
          },
          "combineNotifications": {
            "type": "boolean",
            "description": "Ex: 1"
          },
          "createdAt": {
            "type": "string",
            "description": "When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format"
          },
          "description": {
            "type": "string",
            "description": "Your bio will be displayed on your published studies"
          },
          "displayName": {
            "type": "string",
            "description": "User display name"
          },
          "earliestReminderTime": {
            "type": "string",
            "description": "Earliest time user should get notifications. Ex: 05:00:00"
          },
          "email": {
            "type": "string",
            "description": "User email"
          },
          "firstName": {
            "type": "string",
            "description": "Ex: Mike"
          },
          "getPreviewBuilds": {
            "type": "boolean",
            "description": "Ex: false"
          },
          "hasAndroidApp": {
            "type": "boolean",
            "description": "Ex: false"
          },
          "hasChromeExtension": {
            "type": "boolean",
            "description": "Ex: false"
          },
          "hasIosApp": {
            "type": "boolean",
            "description": "Ex: false"
          },
          "id": {
            "type": "integer",
            "description": "User id"
          },
          "lastActive": {
            "type": "string",
            "description": "Ex: Date the user last logged in"
          },
          "lastFour": {
            "type": "string",
            "description": "Ex: 2009"
          },
          "lastName": {
            "type": "string",
            "description": "Ex: Sinn"
          },
          "lastSmsTrackingReminderNotificationId": {
            "type": "string",
            "description": "Ex: 1"
          },
          "latestReminderTime": {
            "type": "string",
            "description": "Latest time user should get notifications. Ex: 23:00:00"
          },
          "loginName": {
            "type": "string",
            "description": "User login name"
          },
          "password": {
            "type": "string",
            "description": "Ex: PASSWORD"
          },
          "phoneNumber": {
            "type": "string",
            "description": "Ex: 618-391-0002"
          },
          "phoneVerificationCode": {
            "type": "string",
            "description": "Ex: 1234"
          },
          "primaryOutcomeVariableId": {
            "type": "integer",
            "description": "A good primary outcome variable is something that you want to improve and that changes inexplicably. For instance, if you have anxiety, back pain or arthritis which is worse on some days than others, these would be good candidates for primary outcome variables.  Recording their severity and potential factors will help you identify hidden factors exacerbating or improving them. "
          },
          "primaryOutcomeVariableName": {
            "type": "string",
            "description": "A good primary outcome variable is something that you want to improve and that changes inexplicably. For instance, if you have anxiety, back pain or arthritis which is worse on some days than others, these would be good candidates for primary outcome variables.  Recording their severity and potential factors will help you identify hidden factors exacerbating or improving them. "
          },
          "pushNotificationsEnabled": {
            "type": "boolean",
            "description": "Ex: 1"
          },
          "refreshToken": {
            "type": "string",
            "description": "See https://oauth.net/2/grant-types/refresh-token/"
          },
          "roles": {
            "type": "string",
            "description": "Ex: [\"admin\"]"
          },
          "sendPredictorEmails": {
            "type": "boolean",
            "description": "Ex: 1"
          },
          "sendReminderNotificationEmails": {
            "type": "boolean",
            "description": "Ex: 1"
          },
          "shareAllData": {
            "type": "boolean",
            "description": "Share all studies, charts, and measurement data with all other users"
          },
          "smsNotificationsEnabled": {
            "type": "boolean",
            "description": "Ex: false"
          },
          "stripeActive": {
            "type": "boolean",
            "description": "Ex: 1"
          },
          "stripeId": {
            "type": "string",
            "description": "Ex: cus_A8CEmcvl8jwLhV"
          },
          "stripePlan": {
            "type": "string",
            "description": "Ex: monthly7"
          },
          "stripeSubscription": {
            "type": "string",
            "description": "Ex: sub_ANTx3nOE7nzjQf"
          },
          "subscriptionEndsAt": {
            "type": "string",
            "description": "UTC ISO 8601 YYYY-MM-DDThh:mm:ss"
          },
          "subscriptionProvider": {
            "type": "string",
            "description": "Ex: google"
          },
          "timeZoneOffset": {
            "type": "integer",
            "description": "Ex: 300"
          },
          "trackLocation": {
            "type": "boolean",
            "description": "Ex: 1"
          },
          "updatedAt": {
            "type": "string",
            "description": "When the record in the database was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format"
          },
          "userRegistered": {
            "type": "string",
            "description": "Ex: 2013-12-03 15:25:13 UTC ISO 8601 YYYY-MM-DDThh:mm:ss"
          },
          "userUrl": {
            "type": "string",
            "description": "Ex: https://plus.google.com/+MikeSinn"
          }
        }
      }
    },
    "parameters": {
      "appVersionParam": {
        "name": "appVersion",
        "in": "query",
        "description": "Ex: 2.1.1.0",
        "schema": {
          "type": "string"
        }
      },
      "clientIdParam": {
        "name": "clientId",
        "in": "query",
        "description": "Your CureDAO client id can be obtained by creating an app at https://builder.quantimo.do",
        "schema": {
          "type": "string"
        }
      },
      "clientUserIdParam": {
        "name": "clientUserId",
        "in": "query",
        "description": "Ex: 74802",
        "schema": {
          "type": "integer"
        }
      },
      "createdAtParam": {
        "name": "createdAt",
        "in": "query",
        "description": "When the record was first created. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local.",
        "schema": {
          "type": "string"
        }
      },
      "includeAuthorizedClientsParam": {
        "name": "includeAuthorizedClients",
        "in": "query",
        "description": "Return list of apps, studies, and individuals with access to user data",
        "schema": {
          "type": "boolean"
        }
      },
      "limitParam": {
        "name": "limit",
        "in": "query",
        "description": "The LIMIT is used to limit the number of results returned. So if youhave 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records.",
        "schema": {
          "type": "integer",
          "default": 100
        }
      },
      "log": {
        "name": "log",
        "in": "query",
        "description": "Username or email",
        "schema": {
          "type": "string"
        }
      },
      "offsetParam": {
        "name": "offset",
        "in": "query",
        "description": "OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause.If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned.",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "pwd": {
        "name": "pwd",
        "in": "query",
        "description": "User password",
        "schema": {
          "type": "string"
        }
      },
      "sortParam": {
        "name": "sort",
        "in": "query",
        "description": "Sort by one of the listed field names. If the field name is prefixed with `-`, it will sort in descending order.",
        "schema": {
          "type": "string"
        }
      },
      "updatedAtParam": {
        "name": "updatedAt",
        "in": "query",
        "description": "When the record was last updated. Use UTC ISO 8601 YYYY-MM-DDThh:mm:ss datetime format. Time zone should be UTC and not local.",
        "schema": {
          "type": "string"
        }
      },
      "userIdParam": {
        "name": "userId",
        "in": "query",
        "description": "User's id",
        "schema": {
          "type": "number"
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "curedao_oauth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.quantimo.do/api/v1/oauth/authorize",
            "tokenUrl": "https://app.quantimo.do/api/v1/oauth/token",
            "scopes": {
              "basic": "Allows you to read user info (display name, email, etc)",
              "readmeasurements": "Allows one to read a user's measurements",
              "writemeasurements": "Allows you to write user measurements"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 98,
      "1": 59,
      "2": 203,
      "3": 63,
      "4": 174,
      "5": 1,
      "6": 81,
      "7": 0,
      "8": 69,
      "9": 170,
      "10": 238,
      "11": 41
    }
  }
}
```