Run the model using the Thymia Activity Plugin

Create a new run of the Mental Wellness model for a specific user, using the Thymia Activity Plugin to host an activity and capture a recording. The response contains: * A link for the user to perform an activity. The link should then be embedded in the Thymia Activity Plugin. Once the activity is completed, the recording of it will be used automatically as input to the model. * The id of the new model run which can be used to poll for results **after the activity has been completed**.

Authentication

x-api-keystring
Your API Activation Key

Request

This endpoint expects an object.
userobjectRequired
The user that this model run is being submitted for
languageenumRequired
The code of the language being spoken by the user in the recording to be uploaded
accentenumOptional
The accent of the user speaking, in addition to the language they are speaking
Allowed values:
sleepTimedatetimeOptional

When the user fell asleep for their last main sleep before the recording was made (as an ISO 8601 datetime). This should not include timezone information but it is assumed to be in the local timezone of the user in the recording so the time of day can be inferred.

wakeTimedatetimeOptional

When the user woke from their last main sleep before the recording was made (as an ISO 8601 datetime). This should not include timezone information but it is assumed to be in the local timezone of the user in the recording so the time of day can be inferred.

tagslist of objectsOptional
Name/Value pairs to tag a model run for later identification. Note: * Tag names must be unique * At most 20 tags are allowed per model run
deleteDatabooleanOptionalDefaults to false

Boolean flag indicating if user data is to be deleted after the completion of the model run. If True, the recordings, model inputs and model results will be deleted 12 hrs after the model run completes. Attempts to retrieve results after this time will receive a 404 error. If you wish to be more specific about which types of data are deleted, see the data_to_delete field below.

dataToDeletelist of enumsOptional
An array of data types to indicate which data inputs should be deleted after completion of the model run. To be used in combination with the `delete_data` boolean flag. Note: * If `delete_data` is set to `true` and `data_to_delete` value is omitted, all data will be deleted. * If `delete_data` is set to `true` and `data_to_delete` value is set to one or more data types, only the specified data will be deleted.
Allowed values:
activityTypestringOptional
The type of activity to show to users. If omitted, a default activity will be used. See the [online docs](https://thymia.ai/docs/building-your-integration) for the latest list of activities to choose from.

Response

Details of new model run created, including a link to a thymia activity.
idstringformat: "uuid"
The id of the newly created model run

Errors