Goals & Mood Tracking (1.0.0)

Download OpenAPI specification:

Goal setting, tracking, reminders and mood logging with statistics

external

Create or Update Goal

Creates a new goal or updates an existing one for a user. Supports one-time and recurring goals with frequency tracking.

Used when:

  • Client sets a new therapy goal
  • Updating an existing goal's details or frequency
  • AI-generated goals from treatment plans

Input:

  • is_onetime (required): Whether this is a one-time goal
  • frequency (optional): Goal frequency (auto-set to "One Time" if is_onetime=true)
  • goalid (optional): Include to update an existing goal

Returns: goalid of the created or updated goal

Common errors:

  • 400: Invalid parameters or unable to create goal
  • 201: Goal created successfully
Authorizations:
cookieAuthbasicAuth
Request Body schema:
required
userid
integer or null
status
string or null <= 50 characters
title
string or null <= 255 characters
is_onetime
required
boolean
criticality
string or null <= 255 characters
reminder
boolean or null
frequency
string or null <= 255 characters
targetdate
string or null <date-time>
days
any or null
required
Array of objects (GoalTrackingCreateUpdate)
reminderdate
required
string or null <date>
remindertime
required
string or null <time>
startdate
string or null <date-time>
description
string or null
is_therapist_approved
boolean

Responses

Request samples

Content type
{
  • "userid": 0,
  • "status": "string",
  • "title": "string",
  • "is_onetime": true,
  • "criticality": "string",
  • "reminder": true,
  • "frequency": "string",
  • "targetdate": "2019-08-24T14:15:22Z",
  • "days": null,
  • "goaltracking": [
    ],
  • "reminderdate": "2019-08-24",
  • "remindertime": "14:15:22Z",
  • "startdate": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "is_therapist_approved": true
}

Response samples

Content type
application/json
{
  • "userid": 0,
  • "goalid": 0,
  • "status": "string",
  • "title": "string",
  • "is_onetime": true,
  • "criticality": "string",
  • "reminder": true,
  • "frequency": "string",
  • "targetdate": "2019-08-24T14:15:22Z",
  • "days": null,
  • "goaltracking": [
    ],
  • "description": "string",
  • "is_therapist_approved": true
}

apis

Update an existing goal

Updates the details of an existing goal identified by goalid in the URL path. If is_onetime is true, frequency is automatically set to "One Time". Future goal tracking entries (after today) are deleted and regenerated based on the updated schedule. Returns 204 if the goal is not found.

Authorizations:
cookieAuthbasicAuth
path Parameters
goalid
required
integer

A unique integer value identifying this goal.

Request Body schema:
required
userid
integer or null
status
string or null <= 50 characters
title
string or null <= 255 characters
is_onetime
required
boolean
criticality
string or null <= 255 characters
reminder
boolean or null
frequency
string or null <= 255 characters
targetdate
string or null <date-time>
days
any or null
required
Array of objects (GoalTrackingCreateUpdate)
reminderdate
required
string or null <date>
remindertime
required
string or null <time>
startdate
string or null <date-time>
description
string or null
is_therapist_approved
boolean

Responses

Request samples

Content type
{
  • "userid": 0,
  • "status": "string",
  • "title": "string",
  • "is_onetime": true,
  • "criticality": "string",
  • "reminder": true,
  • "frequency": "string",
  • "targetdate": "2019-08-24T14:15:22Z",
  • "days": null,
  • "goaltracking": [
    ],
  • "reminderdate": "2019-08-24",
  • "remindertime": "14:15:22Z",
  • "startdate": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "is_therapist_approved": true
}

Delete a goal

Soft-deletes a goal and all its associated goal tracking entries by setting is_deleted=True. Requires the goalid as a URL path parameter. Returns 204 if no goal with the given ID exists.

Authorizations:
cookieAuthbasicAuth
path Parameters
goalid
required
integer

A unique integer value identifying this goal.

Responses

apis_goal_multiple_list

Authorizations:
cookieAuthbasicAuthNone

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update multiple goals in a single request

Accepts a JSON array of goal objects and processes them in a batch. For each item, if id is a non-zero value and the goal exists, the goal is updated; otherwise a new goal is created. Supports the same fields as the single goal endpoint, including is_onetime, frequency, targetdate, days, and reminder settings. Returns a list of all created or updated goal IDs.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema:
required
Array
userid
integer or null
status
string or null <= 50 characters
title
string or null <= 255 characters
is_onetime
required
boolean
criticality
string or null <= 255 characters
reminder
boolean or null
frequency
string or null <= 255 characters
targetdate
string or null <date-time>
days
any or null
required
Array of objects (GoalTrackingCreateUpdate)
reminderdate
required
string or null <date>
remindertime
required
string or null <time>
startdate
string or null <date-time>
description
string or null
is_therapist_approved
boolean

Responses

Request samples

Content type
[
  • [
    ]
]

apis_goal_multiple_retrieve

Authorizations:
cookieAuthbasicAuthNone
path Parameters
goalid
required
integer

A unique integer value identifying this goal.

Responses

Response samples

Content type
application/json
{
  • "userid": 0,
  • "goalid": 0,
  • "status": "string",
  • "title": "string",
  • "is_onetime": true,
  • "criticality": "string",
  • "reminder": true,
  • "frequency": "string",
  • "targetdate": "2019-08-24T14:15:22Z",
  • "days": null,
  • "goaltracking": [
    ],
  • "description": "string",
  • "is_therapist_approved": true
}

apis_goal_multiple_update

Authorizations:
cookieAuthbasicAuthNone
path Parameters
goalid
required
integer

A unique integer value identifying this goal.

Request Body schema:
required
userid
integer or null
status
string or null <= 50 characters
title
string or null <= 255 characters
is_onetime
required
boolean
criticality
string or null <= 255 characters
reminder
boolean or null
frequency
string or null <= 255 characters
targetdate
string or null <date-time>
days
any or null
required
Array of objects (GoalTrackingCreateUpdate)
reminderdate
required
string or null <date>
remindertime
required
string or null <time>
startdate
string or null <date-time>
description
string or null
is_therapist_approved
boolean

Responses

Request samples

Content type
{
  • "userid": 0,
  • "status": "string",
  • "title": "string",
  • "is_onetime": true,
  • "criticality": "string",
  • "reminder": true,
  • "frequency": "string",
  • "targetdate": "2019-08-24T14:15:22Z",
  • "days": null,
  • "goaltracking": [
    ],
  • "reminderdate": "2019-08-24",
  • "remindertime": "14:15:22Z",
  • "startdate": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "is_therapist_approved": true
}

Response samples

Content type
application/json
{
  • "userid": 0,
  • "goalid": 0,
  • "status": "string",
  • "title": "string",
  • "is_onetime": true,
  • "criticality": "string",
  • "reminder": true,
  • "frequency": "string",
  • "targetdate": "2019-08-24T14:15:22Z",
  • "days": null,
  • "goaltracking": [
    ],
  • "description": "string",
  • "is_therapist_approved": true
}

apis_goal_multiple_destroy

Authorizations:
cookieAuthbasicAuthNone
path Parameters
goalid
required
integer

A unique integer value identifying this goal.

Responses

Update goal reminder settings

Updates the reminder toggle and reminder time for an existing goal. The new reminder time is also propagated to all associated, non-deleted goal tracking entries. Requires goalid, reminder (boolean), and remindertime (HH:MM:SS) in the request body.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema:
goalid
integer
remindertime
string or null <time>
reminder
boolean or null

Responses

Request samples

Content type
{
  • "goalid": 0,
  • "remindertime": "14:15:22Z",
  • "reminder": true
}

Retrieve all goals for a user

Returns all non-deleted goals associated with the given user ID. Each goal includes its title, frequency, criticality, reminder settings, completion status, target date, days list, and therapist approval flag.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
userid
required
integer

The unique identifier of the user whose goals are being retrieved.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve all goals for a user

Returns all non-deleted goals associated with the given user ID. Each goal includes its title, frequency, criticality, reminder settings, completion status, target date, days list, and therapist approval flag.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
goalid
required
integer

A unique integer value identifying this goal.

userid
required
integer

The unique identifier of the user whose goals are being retrieved.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Mark a goal tracking entry as completed

Updates the completion status of a specific goal tracking entry (goalTrackId) for a given goal (goalid in the URL path). Send iscompleted: true to mark the entry as completed, or false to unmark it. If all tracking entries for the parent goal are completed, the goal itself is also marked as "Completed". Conversely, if any entry is incomplete, the goal status is reset to null.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
goalid
required
integer

A unique integer value identifying this goal.

Request Body schema:
property name*
additional property
any

Responses

Request samples

Content type
{
  • "goalTrackId": 101,
  • "iscompleted": true
}

Retrieve goal tracking entries for a user within a date range

Accepts a userid, fromdate, todate, and optional time_zone in the request body. Returns goal tracking entries grouped by due date, with each group listing the goals scheduled for that day along with their completion status, reminder time, and tracking ID. Dates can be supplied as plain date strings (YYYY-MM-DD) or full ISO 8601 datetime strings. The response is timezone-aware; if time_zone is omitted it defaults to Etc/UTC. Returns an empty goaltracker list when no entries are found for the given range.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema:
property name*
additional property
any

Responses

Request samples

Content type
{
  • "userid": 1,
  • "fromdate": "2024-01-01",
  • "todate": "2024-01-07",
  • "time_zone": "America/New_York"
}

Log a mood entry

Creates a new mood log entry for a user. Each entry records the user ID, the date/time the mood was logged, the mood type (e.g. happy, sad, anxious), and an optional list of reasons. The create_timestamp and update_timestamp fields are set automatically.

Authorizations:
cookieAuthbasicAuth
Request Body schema:
userid
integer or null
logdate
string or null <date-time>
mood
string or null <= 255 characters
reasons
any or null

Responses

Request samples

Content type
{
  • "userid": 0,
  • "logdate": "2019-08-24T14:15:22Z",
  • "mood": "string",
  • "reasons": null
}

apis_moodlog_moodstats_list

Authorizations:
cookieAuthbasicAuthNone

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get mood statistics for a user over a date range

Accepts a userid, fromdate, and todate in the request body, then returns aggregated mood statistics for that user within the given date range. The response groups entries by log date and mood type, providing a count of each mood per day alongside the associated reasons. Dates can be supplied as a plain date string (YYYY-MM-DD) or a full ISO 8601 datetime string. Returns 204 No Content when no matching records are found or when an error occurs during aggregation.

Authorizations:
cookieAuthbasicAuthNone
Request Body schema:
property name*
additional property
any

Responses

Request samples

Content type
{
  • "userid": 1,
  • "fromdate": "2024-01-01",
  • "todate": "2024-01-31"
}

apis_moodlog_moodstats_retrieve

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "logdate": "2019-08-24T14:15:22Z",
  • "userid": 0,
  • "mood": "string",
  • "reasons": null
}

apis_moodlog_moodstats_update

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string
Request Body schema:
logdate
string or null <date-time>
userid
integer or null
mood
string or null <= 255 characters
reasons
any or null

Responses

Request samples

Content type
{
  • "logdate": "2019-08-24T14:15:22Z",
  • "userid": 0,
  • "mood": "string",
  • "reasons": null
}

Response samples

Content type
application/json
{
  • "logdate": "2019-08-24T14:15:22Z",
  • "userid": 0,
  • "mood": "string",
  • "reasons": null
}

apis_moodlog_moodstats_destroy

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string

Responses

Retrieve mood logs by user ID

Returns all non-deleted mood log entries associated with a specific user. Use the list endpoint to retrieve all records, or the retrieve endpoint with a userid path parameter to fetch entries for a particular user. Each record includes the mood ID, user ID, log date/time, mood type, and reasons.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
userid
required
integer

The unique identifier of the user whose mood logs are being retrieved.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve mood logs by user ID

Returns all non-deleted mood log entries associated with a specific user. Use the list endpoint to retrieve all records, or the retrieve endpoint with a userid path parameter to fetch entries for a particular user. Each record includes the mood ID, user ID, log date/time, mood type, and reasons.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
moodid
required
integer

A unique integer value identifying this mood tracker.

userid
required
integer

The unique identifier of the user whose mood logs are being retrieved.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve pending therapist-approved goals for a user

Returns all non-deleted goals for the specified user that have not yet been started (status is null) and have been approved by a therapist (is_therapist_approved=True). Each result includes the earliest due date from the associated tracking entries as startdate.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
userid
required
integer

The unique identifier of the user whose pending goals are being retrieved.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve pending therapist-approved goals for a user

Returns all non-deleted goals for the specified user that have not yet been started (status is null) and have been approved by a therapist (is_therapist_approved=True). Each result includes the earliest due date from the associated tracking entries as startdate.

Authorizations:
cookieAuthbasicAuthNone
path Parameters
id
required
string
userid
required
integer

The unique identifier of the user whose pending goals are being retrieved.

Responses

Response samples

Content type
application/json
[
  • {
    }
]