Account
The Account Object represents a user account within an Organization.
_id ObjectId
The account identifier.
access Number
The current caller's context access level.
activationRequired Boolean
True if the account must be activated before use. Dependant on Org settings.
age Number
The age of the account holder (based on the dob property).
connections Reference[]
Connections associated with the Account.
created Date
The date the context was created.
dob Date
Account holder date of birth.
email* String
The email address for the account and must be unique within the Org.
favorite Boolean
Tags the context as a favorite, which can then be filtered using the API.
gender String
Account holder gender. Available values are:
f
- Female
m
- Male
n
- Neither
o
- Other
t
- Trans
u
- Unspecified
image File
The account profile image.
inherited_roles ObjectId[]
Any roles that are inherited from my current role. If my current role has no sub-roles then this is an empty array.
key Document
A fingerprint and secret, re-generated on password change. Useful for client-side PHI encryption/caching scenarios, it is available to the account holder for the life of an authenticated session.
mobile String
The mobile number of the account holder. This number should be capable of receiving SMS messages and must be in E.164 format.
name Document
Name of the account holder (split into first and last names as well as optional prefix, middle, suffix and additional[]).
object String
The context’s object name.
preferences Document
The account preferences.
profile Document
The account profile.
roles ObjectId[]
Account roles (e.g. Provider, Administrator, Developer). Accounts can have more than one role.
shared Boolean
True if there are any active or pending connections for this context.
state String
Current state for the account. (e.g. unverified, verified)
tz String
updated Date
The date the latest update was made to a context’s properties
updater Reference
The account id of the context updater
List
GET
https://api.dev.medable.com/your_org_name/v2/accounts
Retrieve all accounts
Path Parameters
your_org_name
string
Read
GET
https://api.dev.medable.com/your_org_name/v2/accounts/account_id
Retrieve an account
Path Parameters
account_id
string
your_org_name
string
Current User
GET
https://api.dev.medable.com/your_org_name/v2/accounts/me
Path Parameters
your_org_name
string
Register
POST
https://api.dev.medable.com/your_org_name/v2/accounts/register
Account Registration
Path Parameters
your_org_name
string
Request Body
name
object
first
string
This is attached to the name object.
last
string
This is attached to the name object.
string
This is later used with the password to log in
mobile
string
in E.164 format
password
string
Must meet org password strength requirements
dob
string
YYYY-MM-DD
gender
string
"m" or "f"
tz
string
The timezone for the user
token
object
Invite/connection token (if applicable)
Login
POST
https://api.dev.medable.com/your_org_name/v2/accounts/login
Path Parameters
your_org_name
string
Request Body
string
password
string
location
object
verificationToken
string
6 digit verification token sent to user's mobile device for 2FA. Attached to location object.
locationName
string
if you want to associate a string with a given authorized access point. Attached to location object.
singleUse
boolean
The equivalent of "Remember Me" checkbox common in login options. Attached to location object.
iosNotificationToken
string
The iOS notification token received from APN for push notifications (if applicable). Attached to location object.
gcmRegistrationId
string
The Android FCM/GCM push registration id (if applicable). Attached to location object.
Logout
POST
https://api.dev.medable.com/your_org_name/v2/accounts/me/logout
Invalidate the currently authenticated session
Path Parameters
your_org_name
string
Request Password Reset
POST
https://api.dev.medable.com/your_org_name/v2/accounts/request-password-reset
Request a password reset via email This endpoint would typically be used when a user is trying to login but cannot remember his/her password. They can simply enter their email address associated with the account (which gets passed into this endpoint) and an email will be automatically generated by Medable with the proper link to set a new password.
Path Parameters
your_org_name
string
Request Body
string
Example:
Request Password Reset gets called
Medable sends the email with a one-time secure reset password token (string)
The user opens that email and clicks a link which has this token as a url parameter
User gets navigated to a Medable web GUI for setting the new password
You can override the destination link in part 4 to be your own page on your own domain for app look and feel consistency.
Update My Password
POST
https://api.dev.medable.com/your_org_name/accounts/me/update-password
Update the currently logged in user's password directly through the API This endpoint would typically be used for a currently logged in user who wants to change his/her password directly from your app without having to go through the email password reset flow.
Path Parameters
your_org_name
string
Request Body
current
string
this is the old (current) password
password
string
this is the new password
Update Password (Token)
POST
https://api.dev.medable.com/your_org_name/accounts/reset-password
This endpoint would typically be used if you wanted to build a custom page that is linked in the email reset.
Path Parameters
your_org_name
string
Request Body
password
string
token
string
Verify Email From Token
POST
https://api.dev.medable.com/your_org_name/v2/token
Path Parameters
token
string
The email verification process generates a token that can be passed in to mark an email as verified.
your_org_name
string
Resend Email Verification
POST
https://api.dev.medable.com/your_org_name/v2/accounts/me/resend-verification
Path Parameters
your_org_name
string
Update
PUT
https://api.dev.medable.com/your_org_name/v2/accounts/me/resend-verification
To modify a property on an Account object
Path Parameters
your_org_name
string
account_id
string
Request Body
name
string
first
string
last
string
mobile
string
dob
string
gender
string
any account property
string
Due to security reasons, we do not allow modifying of the email address of a given account.
Update
PATCH
https://api.dev.medable.com/your_org_name/v2/accounts/account_id
To modify a property on an Account object via PATCH
Path Parameters
your_org_name
string
account_id
string
Request Body
op
string
path
string
value
string
Last updated