User Management (1.0.0)

Download OpenAPI specification:

User profiles, consent management, device tokens and login audit

apis

apis_user_create

Creates or updates a user profile. Behavior varies by role.

User (client) role — four paths:

  • Path A: Update an existing client who has a therapist-client relationship (returning login after invite).
  • Path B: Create a new client completing a therapist invitation (first-time signup). Links the new user to existing TherapistClient, UserConsent, and ClientScreening records, then dispatches an Active status event.
  • Path C: Update an existing self-registered client (no invitation).
  • Path D: Create a new self-registered client with no therapist relationship.

Therapist role: Creates or updates a therapist account. On first login, checks for a matching TherapistInvitation to assign org membership; if none is found, grants org-admin status. Optionally triggers background sample-data seeding when SEEDING_ENABLED is True.

Destroy performs a soft-delete (is_deleted=True) rather than a hard-delete.

Authorizations:
cookieAuthbasicAuth
Request Body schema:
required
userloginname
string or null <= 255 characters
role
string or null <= 255 characters
firstName
string or null <= 255 characters
lastName
string or null <= 255 characters
emailid
string or null <email> <= 255 characters
gender
string or null <= 255 characters
phoneNumber
string or null <= 20 characters
dob
string or null <date>
image
required
string
timezone
string or null <= 155 characters
required
Array of objects (Address)
loginid
string or null <= 255 characters
orgid
integer or null
npi
string or null <= 128 characters
is_org_admin
boolean or null
Default: false

Responses

Request samples

Content type
{
  • "userloginname": "string",
  • "role": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "emailid": "user@example.com",
  • "gender": "string",
  • "phoneNumber": "string",
  • "dob": "2019-08-24",
  • "image": "string",
  • "timezone": "string",
  • "address": [
    ],
  • "loginid": "string",
  • "orgid": 0,
  • "npi": "string",
  • "is_org_admin": false
}

Response samples

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

apis_user_destroy

Creates or updates a user profile. Behavior varies by role.

User (client) role — four paths:

  • Path A: Update an existing client who has a therapist-client relationship (returning login after invite).
  • Path B: Create a new client completing a therapist invitation (first-time signup). Links the new user to existing TherapistClient, UserConsent, and ClientScreening records, then dispatches an Active status event.
  • Path C: Update an existing self-registered client (no invitation).
  • Path D: Create a new self-registered client with no therapist relationship.

Therapist role: Creates or updates a therapist account. On first login, checks for a matching TherapistInvitation to assign org membership; if none is found, grants org-admin status. Optionally triggers background sample-data seeding when SEEDING_ENABLED is True.

Destroy performs a soft-delete (is_deleted=True) rather than a hard-delete.

Authorizations:
cookieAuthbasicAuth
path Parameters
userid
required
integer

A unique integer value identifying this users.

Responses

apis_user_activity_latestassessment_userid_retrieve

Aggregates all notification-relevant activity data for a given userId into a single response. Send the userId as a URL path parameter.

The response includes the most recent log date for each tracked activity:

  • screen_gad7_logdate / screen_phq9_logdate: Date of the last GAD-7 or PHQ-9 screening. Falls back to the TherapistClient create_timestamp if the user has never been screened.
  • journal_logdate: Timestamp of the most recent journal entry. Falls back to TherapistClient create_timestamp if none exist.
  • mood_logdate: Timestamp of the most recent mood tracker log. Falls back to TherapistClient create_timestamp if none exist.
  • goaltracking: Incomplete goal-tracking entries due within the last 10 days, grouped by due date.
  • recommendation: Latest incomplete RecommendationDetail per recommendation type, joined with RecommendationMeta for display metadata.
  • chat: Start time of the most recent ConversationSession for the user.
Authorizations:
cookieAuthbasicAuthNone

Responses

apis_user_activity_latestassessment_userid_retrieve_2

Aggregates all notification-relevant activity data for a given userId into a single response. Send the userId as a URL path parameter.

The response includes the most recent log date for each tracked activity:

  • screen_gad7_logdate / screen_phq9_logdate: Date of the last GAD-7 or PHQ-9 screening. Falls back to the TherapistClient create_timestamp if the user has never been screened.
  • journal_logdate: Timestamp of the most recent journal entry. Falls back to TherapistClient create_timestamp if none exist.
  • mood_logdate: Timestamp of the most recent mood tracker log. Falls back to TherapistClient create_timestamp if none exist.
  • goaltracking: Incomplete goal-tracking entries due within the last 10 days, grouped by due date.
  • recommendation: Latest incomplete RecommendationDetail per recommendation type, joined with RecommendationMeta for display metadata.
  • chat: Start time of the most recent ConversationSession for the user.
Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_user_login_audit_create

Creates or updates a login audit trail record for a user. Accepts a POST request with user_id and any audit fields in the request body. If a UserLoginAudit record already exists for the given user_id it is updated; otherwise a new record is created. Returns the id of the upserted record.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema:
user_id
integer or null
last_login
string or null <date-time>
last_logout
string or null <date-time>

Responses

Request samples

Content type
{
  • "user_id": 0,
  • "last_login": "2019-08-24T14:15:22Z",
  • "last_logout": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "user_id": 0,
  • "last_login": "2019-08-24T14:15:22Z",
  • "last_logout": "2019-08-24T14:15:22Z"
}

apis_user_loginid_retrieve

Retrieves user details by loginId. Returns basic user profile information for the active (non-deleted) user whose loginId matches the provided value. Send loginId as a URL path parameter.

Authorizations:
cookieAuthbasicAuthNone

Responses

apis_user_loginid_retrieve_2

Retrieves user details by loginId. Returns basic user profile information for the active (non-deleted) user whose loginId matches the provided value. Send loginId as a URL path parameter.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
userid
required
integer

A unique integer value identifying this users.

Responses

apis_user_register_device_token_create

Registers or updates a device push-notification token for a user.

POST — Accepts "userid" and "device_id" in the request body. If an active UserDeviceToken record already exists for that userid + device_id combination, it is partially updated (e.g. refreshed token value) and returns the record id with HTTP 200. If no matching record exists, a new token record is created and returned with HTTP 201.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema:
required
userid
integer or null
device_id
required
string
device_token
required
string
device_type
string or null <= 20 characters
device_model
string or null <= 100 characters
os_version
string or null <= 50 characters
app_version
string or null <= 20 characters
last_seen
required
string <date-time>
date
required
string <date-time>

Responses

Request samples

Content type
{
  • "userid": 0,
  • "device_id": "string",
  • "device_token": "string",
  • "device_type": "string",
  • "device_model": "string",
  • "os_version": "string",
  • "app_version": "string",
  • "last_seen": "2019-08-24T14:15:22Z",
  • "date": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "userid": 0,
  • "device_id": "string",
  • "device_token": "string",
  • "device_type": "string",
  • "device_model": "string",
  • "os_version": "string",
  • "app_version": "string",
  • "last_seen": "2019-08-24T14:15:22Z",
  • "date": "2019-08-24T14:15:22Z"
}

apis_user_screening_list

Retrieves all pending (incomplete) screening records for a given userId. Returns ClientScreening rows where is_completed=False. Send userId as a URL path parameter. Returns 204 if an error occurs.

Authorizations:
cookieAuthbasicAuthNone

Responses

Response samples

Content type
application/json
[
  • {
    }
]

apis_user_screening_retrieve

Retrieves all pending (incomplete) screening records for a given userId. Returns ClientScreening rows where is_completed=False. Send userId as a URL path parameter. Returns 204 if an error occurs.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
integer

A unique integer value identifying this client screening.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "screening_type_id": {
    }
}

apis_user_search_retrieve

Searches for a user by email address. Accepts a POST request with an "emailid" field in the request body. Performs a case-insensitive partial match and returns the first matching active (non-deleted) user. Returns 400 if the emailid field is missing.

Authorizations:
cookieAuthbasicAuthNone

Responses

apis_user_search_retrieve_2

Searches for a user by email address. Accepts a POST request with an "emailid" field in the request body. Performs a case-insensitive partial match and returns the first matching active (non-deleted) user. Returns 400 if the emailid field is missing.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
userid
required
integer

A unique integer value identifying this users.

Responses

apis_user_therapist_practiceinfo_create

Creates or updates all sections of a therapist's practice profile in a single request. Requires "userId" in the request body. Processes four profile sections in sequence:

  • credentials: Professional licences/certifications. Items with a non-null "id" are updated; items with id=null are created.
  • theoreticalOrientation: Therapeutic modalities, each with nested "UserInterventionTech" entries which are also individually upserted.
  • populations: Patient population groups the therapist works with.
  • specialties: Clinical specialty areas.

Returns {"success": true} on completion.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema:
required
userloginname
string or null <= 255 characters
role
string or null <= 255 characters
firstName
string or null <= 255 characters
lastName
string or null <= 255 characters
emailid
string or null <email> <= 255 characters
gender
string or null <= 255 characters
phoneNumber
string or null <= 20 characters
dob
string or null <date>
image
required
string
timezone
string or null <= 155 characters
required
Array of objects (Address)
loginid
string or null <= 255 characters
orgid
integer or null
npi
string or null <= 128 characters
is_org_admin
boolean or null
Default: false

Responses

Request samples

Content type
{
  • "userloginname": "string",
  • "role": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "emailid": "user@example.com",
  • "gender": "string",
  • "phoneNumber": "string",
  • "dob": "2019-08-24",
  • "image": "string",
  • "timezone": "string",
  • "address": [
    ],
  • "loginid": "string",
  • "orgid": 0,
  • "npi": "string",
  • "is_org_admin": false
}

Response samples

Content type
application/json
{
  • "userloginname": "string",
  • "role": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "emailid": "user@example.com",
  • "gender": "string",
  • "phoneNumber": "string",
  • "dob": "2019-08-24",
  • "image": "string",
  • "timezone": "string",
  • "address": [
    ],
  • "loginid": "string",
  • "orgid": 0,
  • "npi": "string",
  • "is_org_admin": false
}

apis_user_therapist_practiceinfo_user_retrieve

Retrieves the complete practice profile for a therapist by userId. Returns all four profile sections in a single response:

  • credentials: Professional licences and certifications.
  • theoreticalOrientation: Therapeutic modalities with nested intervention techniques.
  • Populations: Patient population groups the therapist works with.
  • Specialties: Clinical specialty areas.

Send the therapist userId as a URL path parameter.

Authorizations:
cookieAuthbasicAuthNone

Responses

apis_user_therapist_practiceinfo_user_retrieve_2

Retrieves the complete practice profile for a therapist by userId. Returns all four profile sections in a single response:

  • credentials: Professional licences and certifications.
  • theoreticalOrientation: Therapeutic modalities with nested intervention techniques.
  • Populations: Patient population groups the therapist works with.
  • Specialties: Clinical specialty areas.

Send the therapist userId as a URL path parameter.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

apis_user_userid_retrieve

Retrieves user details by userId. Returns basic user profile information merged with therapist-relationship fields (is_profile_active, invite_sent) sourced from the TherapistClient table. Returns null for those fields if no therapist-client relationship exists. Send userId as a URL path parameter.

Authorizations:
cookieAuthbasicAuthNone

Responses

apis_user_userid_retrieve_2

Retrieves user details by userId. Returns basic user profile information merged with therapist-relationship fields (is_profile_active, invite_sent) sourced from the TherapistClient table. Returns null for those fields if no therapist-client relationship exists. Send userId as a URL path parameter.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
userid
required
integer

A unique integer value identifying this users.

Responses

apis_user_userloginname_retrieve

Retrieves user details by userLoginName. Returns full user profile information for any active (non-deleted) user whose userLoginName matches the provided value. Supports listing all users (GET, no param) or fetching a single user by their userLoginName (GET /{userloginname}/).

Authorizations:
cookieAuthbasicAuthNone

Responses

apis_user_userloginname_retrieve_2

Retrieves user details by userLoginName. Returns full user profile information for any active (non-deleted) user whose userLoginName matches the provided value. Supports listing all users (GET, no param) or fetching a single user by their userLoginName (GET /{userloginname}/).

Authorizations:
cookieAuthbasicAuthNone
path Parameters
userid
required
integer

A unique integer value identifying this users.

Responses