neurotap API (v1)

Download OpenAPI specification:

Health

Rails health check

Responses

Application health check

Responses

[MOBILE] Activities

Mark activity as completed

Authorizations:
Bearer Token
path Parameters
id
required
integer

Activity ID

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "start_stress_score": 0,
  • "end_stress_score": 0,
  • "completed_at": "2019-08-24T14:15:22Z"
}

Create a session activity

Authorizations:
Bearer Token
Request Body schema: application/json
session_id
required
integer

Responses

Request samples

Content type
application/json
{
  • "session_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "start_stress_score": 0,
  • "end_stress_score": 0,
  • "completed_at": "2019-08-24T14:15:22Z"
}

List user's latest completed activities deduplicated by session

Authorizations:
Bearer Token
query Parameters
page
integer

Page number

items_per_page
integer

Items per page

Responses

Response samples

Content type
application/json
{
  • "collection": [
    ],
  • "pagination": {
    }
}

Get activity details

Authorizations:
Bearer Token
path Parameters
id
required
integer

Activity ID

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "start_stress_score": 0,
  • "end_stress_score": 0,
  • "completed_at": "2019-08-24T14:15:22Z"
}

Update activity stress scores

Authorizations:
Bearer Token
path Parameters
id
required
integer

Activity ID

Request Body schema: application/json
start_stress_score
integer or null
end_stress_score
integer or null

Responses

Request samples

Content type
application/json
{
  • "start_stress_score": 0,
  • "end_stress_score": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "start_stress_score": 0,
  • "end_stress_score": 0,
  • "completed_at": "2019-08-24T14:15:22Z"
}

[MOBILE] Analytics Events

Proxy an analytics event to Amplitude

Authorization is optional - anonymous calls are accepted for pre-login events.

Authorizations:
Bearer Token
Request Body schema: application/json
event_name
required
string
device_id
required
string
object or null
object or null

Responses

Request samples

Content type
application/json
{
  • "event_name": "string",
  • "device_id": "string",
  • "properties": { },
  • "user_properties": { }
}

[MOBILE] Auth / Login

Send SMS verification code for login

Request Body schema: application/json
email
required
string

Account email address

password
required
string

Account password

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "password": "Password100!"
}

Response samples

Content type
application/json
{ }

[MOBILE] Auth / Phone

Send SMS verification code

Request Body schema: application/json
dialing_code
required
string

International dialing code with leading '+' (e.g. '+1')

phone_number
required
string

National phone number without the dialing code

Responses

Request samples

Content type
application/json
{
  • "dialing_code": "+1",
  • "phone_number": "2025551234"
}

Response samples

Content type
application/json
{ }

Verify SMS code

Request Body schema: application/json
dialing_code
required
string

International dialing code with leading '+' (e.g. '+1')

phone_number
required
string

National phone number without the dialing code

code
required
string

6-digit verification code

Responses

Request samples

Content type
application/json
{
  • "dialing_code": "+1",
  • "phone_number": "2025551234",
  • "code": "123456"
}

Response samples

Content type
application/json
{
  • "phone_verification_token": "string"
}

[MOBILE] Authentication

Logout

Request Body schema: application/json
token
required
string
device_token
string

Responses

Request samples

Content type
application/json
{
  • "token": "access_token_value",
  • "device_token": "device_token_value"
}

Sign in / Refresh token

Request Body schema: application/json
email
string

only for grant_type=password

password
string

only for grant_type=password

code
string

6-digit SMS code, required for grant_type=password (login 2FA)

refresh_token
string

only for grant_type=refresh_token

grant_type
required
string
Enum: "password" "refresh_token"
scope
required
string
Value: "mobile"

Responses

Request samples

Content type
application/json
Example
{
  • "email": "john.doe@example.com",
  • "password": "Password100!",
  • "code": "123456",
  • "grant_type": "password",
  • "scope": "mobile"
}

Response samples

Content type
application/json
{
  • "user_id": 0,
  • "access_token": "string",
  • "refresh_token": "string",
  • "refresh_token_expires_at": 0,
  • "scope": "string",
  • "created_at": 0,
  • "expires_in": 0,
  • "token_type": "string"
}

[MOBILE] Customizations

Show customization options and user settings

Authorizations:
Bearer Token

Responses

Response samples

Content type
application/json
{
  • "available_settings": {
    },
  • "avatar": {
    },
  • "background_image": {
    },
  • "background_sound": {
    },
  • "music_volume": 0,
  • "auto_stop_music": true,
  • "display_captions": true
}

Update user customization settings

Authorizations:
Bearer Token
Request Body schema: application/json
avatar_id
integer

ID of the avatar to set

background_image_id
integer or null

ID of the background image to set, or null to clear

background_sound_id
integer or null

ID of the background sound to set, or null to clear

music_volume
integer

Music volume level

auto_stop_music
boolean

Whether to auto-stop background sound

display_captions
boolean

Whether to display captions

Responses

Request samples

Content type
application/json
{
  • "avatar_id": 0,
  • "background_image_id": 0,
  • "background_sound_id": 0,
  • "music_volume": 0,
  • "auto_stop_music": true,
  • "display_captions": true
}

Response samples

Content type
application/json
{
  • "available_settings": {
    },
  • "avatar": {
    },
  • "background_image": {
    },
  • "background_sound": {
    },
  • "music_volume": 0,
  • "auto_stop_music": true,
  • "display_captions": true
}

[MOBILE] Devices

Create device

Authorizations:
Bearer Token
Request Body schema: application/json
required
token
string

Responses

Request samples

Content type
application/json
{
  • "token": "device_token_value"
}

[MOBILE] Insights

List user insights

Authorizations:
Bearer Token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

[MOBILE] Library

Show library

Authorizations:
Bearer Token
query Parameters
category_id
integer

Filter by category ID

Responses

Response samples

Content type
application/json
{
  • "categories": [
    ],
  • "sessions": [
    ]
}

[MOBILE] Notifications

List notifications

Authorizations:
Bearer Token
query Parameters
page
integer

Page number

items_per_page
integer

Items per page

Responses

Response samples

Content type
application/json
{
  • "collection": [
    ],
  • "pagination": {
    }
}

Mark all notifications as read

Authorizations:
Bearer Token

Responses

[MOBILE] Phases

List phases for the user's track

Authorizations:
Bearer Token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

[MOBILE] Session Feedbacks

Submit session feedback

Authorizations:
Bearer Token
Request Body schema: application/json
activity_id
required
integer
message
required
string

Responses

Request samples

Content type
application/json
{
  • "activity_id": 0,
  • "message": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "message": "string",
  • "created_at": "2019-08-24T14:15:22Z"
}

[MOBILE] Sessions

Favorite a session

Authorizations:
Bearer Token
path Parameters
id
required
integer

Session ID

Responses

Unfavorite a session

Authorizations:
Bearer Token
path Parameters
id
required
integer

Session ID

Responses

List sessions

Authorizations:
Bearer Token
query Parameters
query
string

Full-text search on name and description

is_favorite
boolean

Filter by favorited sessions

page
integer

Page number

items_per_page
integer

Items per page

Responses

Response samples

Content type
application/json
{
  • "collection": [
    ],
  • "pagination": {
    }
}

Get session details

Authorizations:
Bearer Token
path Parameters
id
required
integer

Session ID

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "description": "string",
  • "name": "string",
  • "duration": 0,
  • "audio_url": "string",
  • "category": {
    },
  • "start_stress_checkin_time": 0,
  • "end_stress_checkin_time": 0,
  • "is_favorited": true,
  • "taps": [
    ],
  • "author": {
    }
}

[MOBILE] Survey Definitions

Survey definitions

Returns survey definitions (questions, answer options, scoring info) based on the authenticated user's track. Before the onboarding survey is submitted, definitions match the user's track; afterwards they form the follow-up set.

Authorizations:
Bearer Token

Responses

Response samples

Content type
application/json
{
  • "survey_definitions": [
    ]
}

[MOBILE] Surveys

Submit survey answers

onboarding submits the user's selected track survey (the union of the track's instruments) and advances registration_checkpoint to intro_pending. follow_up covers the same instruments plus PGIC and requires the follow-up conditions to be met.

Authorizations:
Bearer Token
Request Body schema: application/json
survey_phase
required
string
Enum: "onboarding" "follow_up"

Type of survey submission

required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "survey_phase": "onboarding",
  • "survey": [
    ]
}

Response samples

Content type
application/json
{
  • "sub_survey_results": [
    ]
}

List user survey history

Authorizations:
Bearer Token
query Parameters
page
integer

Page number

items_per_page
integer

Items per page

scope
string

Limit results to a single set: 'onboarding' (baseline cards) or 'latest' (the most recent check-in batch). Omit for the full history.:

  • onboarding
  • latest

Responses

Response samples

Content type
application/json
{
  • "collection": [
    ],
  • "pagination": {
    }
}

[MOBILE] User Consents

Accept Medicare program participation consent

Authorizations:
Bearer Token
Request Body schema: application/json
consent_definition_id
required
integer

ID of the consent definition being accepted

Responses

Request samples

Content type
application/json
{
  • "consent_definition_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "email": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "birthdate": "2019-08-24",
  • "push_enabled": true,
  • "email_enabled": true,
  • "daily_notification_time": "string",
  • "time_zone": "string",
  • "activated_at": "2019-08-24T14:15:22Z",
  • "phone_number": {
    },
  • "track_type": "anxiety",
  • "pain_location": "back_joints_multiple",
  • "registration_checkpoint": "medicare_consent_pending",
  • "next_follow_up_quarter": 0,
  • "follow_up_available": true
}

Submit care team updates consent

Authorizations:
Bearer Token
Request Body schema: application/json
consent_definition_id
required
integer

ID of the consent definition being submitted

accepted
required
boolean

Whether the user agrees to share data with their care team

Responses

Request samples

Content type
application/json
Example
{
  • "consent_definition_id": 1,
  • "accepted": true
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "email": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "birthdate": "2019-08-24",
  • "push_enabled": true,
  • "email_enabled": true,
  • "daily_notification_time": "string",
  • "time_zone": "string",
  • "activated_at": "2019-08-24T14:15:22Z",
  • "phone_number": {
    },
  • "track_type": "anxiety",
  • "pain_location": "back_joints_multiple",
  • "registration_checkpoint": "medicare_consent_pending",
  • "next_follow_up_quarter": 0,
  • "follow_up_available": true
}

[MOBILE] User Referrals

Submit referral information

Authorizations:
Bearer Token
Request Body schema: application/json
required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "referrals": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "email": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "birthdate": "2019-08-24",
  • "push_enabled": true,
  • "email_enabled": true,
  • "daily_notification_time": "string",
  • "time_zone": "string",
  • "activated_at": "2019-08-24T14:15:22Z",
  • "phone_number": {
    },
  • "track_type": "anxiety",
  • "pain_location": "back_joints_multiple",
  • "registration_checkpoint": "medicare_consent_pending",
  • "next_follow_up_quarter": 0,
  • "follow_up_available": true
}

List user referrals

Authorizations:
Bearer Token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

[MOBILE] Users / Passwords

Change password using a password reset token

Request Body schema: application/json
password_reset_token
required
string

Encrypted token issued by the verify_code endpoint, valid for 30 minutes

password
required
string

min. 8 characters, must contain uppercase letter, lowercase letter, digit and special character, no spaces allowed

password_confirmation
required
string

Responses

Request samples

Content type
application/json
{
  • "password_reset_token": "string",
  • "password": "string",
  • "password_confirmation": "string"
}

Response samples

Content type
application/json
{ }

Send password reset code to email

Request Body schema: application/json
email
required
string

Email address of the account to reset

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{ }

Verify password reset code

Request Body schema: application/json
email
required
string

Email address used in send_code

code
required
string

6-digit verification code

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "code": "123456"
}

Response samples

Content type
application/json
{
  • "password_reset_token": "string"
}

[MOBILE] Profiles

Change password

Authorizations:
Bearer Token
Request Body schema: application/json
current_password
required
string
password
required
string

min. 8 characters, must contain uppercase letter, lowercase letter, digit and special character, no spaces allowed

password_confirmation
required
string

Responses

Request samples

Content type
application/json
{
  • "current_password": "OldPassword1!",
  • "password": "NewPassword1!",
  • "password_confirmation": "NewPassword1!"
}

Mark intro screens as completed

Authorizations:
Bearer Token

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "email": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "birthdate": "2019-08-24",
  • "push_enabled": true,
  • "email_enabled": true,
  • "daily_notification_time": "string",
  • "time_zone": "string",
  • "activated_at": "2019-08-24T14:15:22Z",
  • "phone_number": {
    },
  • "track_type": "anxiety",
  • "pain_location": "back_joints_multiple",
  • "registration_checkpoint": "medicare_consent_pending",
  • "next_follow_up_quarter": 0,
  • "follow_up_available": true
}

Soft delete user account

Authorizations:
Bearer Token

Responses

Get current user profile

Authorizations:
Bearer Token

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "email": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "birthdate": "2019-08-24",
  • "push_enabled": true,
  • "email_enabled": true,
  • "daily_notification_time": "string",
  • "time_zone": "string",
  • "activated_at": "2019-08-24T14:15:22Z",
  • "phone_number": {
    },
  • "track_type": "anxiety",
  • "pain_location": "back_joints_multiple",
  • "registration_checkpoint": "medicare_consent_pending",
  • "next_follow_up_quarter": 0,
  • "follow_up_available": true
}

Update current user profile

Authorizations:
Bearer Token
Request Body schema: application/json
first_name
string
last_name
string
dialing_code
string

International dialing code with leading '+' (e.g. '+1'). Required together with phone_number.

phone_number
string

National phone number without the dialing code. Required together with dialing_code.

push_enabled
boolean
email_enabled
boolean
daily_notification_time
string

Daily notification time in HH:MM format

time_zone
string

IANA time zone name (e.g. 'America/New_York')

Responses

Request samples

Content type
application/json
{
  • "first_name": "Jane",
  • "last_name": "Smith",
  • "push_enabled": false,
  • "email_enabled": true,
  • "daily_notification_time": "09:00",
  • "avatar_id": 1,
  • "music_volume": 75
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "email": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "birthdate": "2019-08-24",
  • "push_enabled": true,
  • "email_enabled": true,
  • "daily_notification_time": "string",
  • "time_zone": "string",
  • "activated_at": "2019-08-24T14:15:22Z",
  • "phone_number": {
    },
  • "track_type": "anxiety",
  • "pain_location": "back_joints_multiple",
  • "registration_checkpoint": "medicare_consent_pending",
  • "next_follow_up_quarter": 0,
  • "follow_up_available": true
}

Set user track

Authorizations:
Bearer Token
Request Body schema: application/json
track_type
required
string
Enum: "anxiety" "mood" "pain" "anxiety_mood" "anxiety_pain" "mood_pain" "anxiety_mood_pain"

The track to assign to the user (one of the seven base/combined conditions). Determines which surveys are required.

pain_location
string
Enum: "back_joints_multiple" "shoulder_arm_hand" "legs_hips_knees_feet" "low_back" "neck"

Where the user feels pain most. Required for pain-bearing tracks (pain, anxiety_pain, mood_pain, anxiety_mood_pain).

Responses

Request samples

Content type
application/json
{
  • "track_type": "anxiety",
  • "pain_location": "back_joints_multiple"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "email": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "birthdate": "2019-08-24",
  • "push_enabled": true,
  • "email_enabled": true,
  • "daily_notification_time": "string",
  • "time_zone": "string",
  • "activated_at": "2019-08-24T14:15:22Z",
  • "phone_number": {
    },
  • "track_type": "anxiety",
  • "pain_location": "back_joints_multiple",
  • "registration_checkpoint": "medicare_consent_pending",
  • "next_follow_up_quarter": 0,
  • "follow_up_available": true
}

[MOBILE] Users

Sign Up

Request Body schema: application/json
email
required
string
password
required
string

min. 8 characters, must contain uppercase letter, lowercase letter, digit and special character

first_name
required
string
last_name
required
string
birthdate
required
string <date>
terms_accepted
required
boolean

Must be true to complete registration

consent_definition_id
required
integer

ID of the terms of service consent definition

time_zone
required
string

IANA time zone name (e.g. 'America/New_York', 'Europe/London')

dialing_code
required
string

International dialing code with leading '+' (e.g. '+1'), must match the one used in /auth/phone/verify_code

phone_number
required
string

National phone number without the dialing code, must match the one used in /auth/phone/verify_code

phone_verification_token
required
string

Signed token returned from /auth/phone/verify_code (valid for 10 minutes)

gender
required
string
Enum: "male" "female" "unknown"

Birth sex. UI renders 'unknown' as 'Prefer not to say'.

medicare_id
required
string

11-character Medicare Beneficiary Identifier (MBI). Dashes optional (e.g. '1EG4-TE5-MK73' or '1EG4TE5MK73').

Responses

Request samples

Content type
application/json
{
  • "email": "john.doe@example.com",
  • "password": "Password100!",
  • "first_name": "John",
  • "last_name": "Doe",
  • "birthdate": "1950-01-01",
  • "terms_accepted": true,
  • "consent_definition_id": 1,
  • "time_zone": "UTC",
  • "dialing_code": "+1",
  • "phone_number": "4254147755",
  • "phone_verification_token": "<token from verify_code>",
  • "gender": "female",
  • "medicare_id": "1EG4-TE5-MK73"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "token_type": "string",
  • "expires_in": 0,
  • "created_at": 0,
  • "refresh_token": "string",
  • "user": {
    }
}