> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.thymia.ai/api-reference/thymia-api/voice-agent-beta/llms.txt.
> For full documentation content, see https://docs.thymia.ai/api-reference/thymia-api/voice-agent-beta/llms-full.txt.

# Get call status & results

GET /v1/calls/{call_id}

Retrieve the details of a call, including model run results if they are available.

Reference: https://docs.thymia.ai/api-reference/thymia-api/voice-agent-beta/get-call-v-1-calls-call-id-get

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Thymia API
  version: 1.0.0
paths:
  /v1/calls/{call_id}:
    get:
      operationId: get-call-v-1-calls-call-id-get
      summary: Get call status & results
      description: >-
        Retrieve the details of a call, including model run results if they are
        available.
      tags:
        - subpackage_voiceAgentBeta
      parameters:
        - name: call_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: x-api-key
          in: header
          description: Your API Activation Key
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Details of a call's current state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceAgentCallResponse'
        '404':
          description: Call not found
          content:
            application/json:
              schema:
                description: Any type
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UserDetailsShort:
      type: object
      properties:
        userLabel:
          type: string
          description: A unique label identifying a user in your systems
      required:
        - userLabel
      title: UserDetailsShort
    VoiceAgentCallResponseAgent:
      type: object
      properties: {}
      description: Configuration for the AI voice agent used in the call
      title: VoiceAgentCallResponseAgent
    VoiceAgentCallResponseExtractedFields:
      type: object
      properties: {}
      description: Fields that was extracted by the agent in the call
      title: VoiceAgentCallResponseExtractedFields
    ModelRunStatus:
      type: string
      enum:
        - CREATED
        - RUNNING
        - COMPLETE_OK
        - COMPLETE_ERROR
      description: An enumeration.
      title: ModelRunStatus
    MentalWellnessValue:
      type: object
      properties:
        value:
          type: number
          format: double
      required:
        - value
      title: MentalWellnessValue
    MentalWellnessContinuousValue:
      type: object
      properties:
        value:
          type: number
          format: double
      required:
        - value
      title: MentalWellnessContinuousValue
    MentalWellnessPartResult:
      type: object
      properties:
        startSecs:
          type: number
          format: double
          description: >-
            Time in seconds (since the start of the whole recording) that this
            section starts at
        finishSecs:
          type: number
          format: double
          description: >-
            Time in seconds (since the start of the whole recording) that this
            section finishes at
        transcript:
          type: string
          description: The transcription of speech within this section of the recording
        distress:
          $ref: '#/components/schemas/MentalWellnessValue'
          description: >-
            A measure of the user’s levels of distress, or in other words worry,
            nervousness or a feeling of being on edge.
        stress:
          $ref: '#/components/schemas/MentalWellnessValue'
          description: >-
            A measure of the user’s stress levels, or in other words how anxious
            or wound up they may feel on this day, whether they are able to
            relax.
        exhaustion:
          $ref: '#/components/schemas/MentalWellnessValue'
          description: >-
            A measure of the user’s physical and mental tiredness as a result of
            manual or cognitive labour on this or previous days. This is not
            directly linked to a lack of sleep or the time of day.
        sleepPropensity:
          $ref: '#/components/schemas/MentalWellnessValue'
          description: >-
            A measure of the user’s sleepiness, i.e. a measure of how likely
            they are to fall asleep if given the opportunity. This is more
            directly related to poor sleep or a lack of sleep over a single
            night or several nights.
        lowSelfEsteem:
          $ref: '#/components/schemas/MentalWellnessValue'
          description: >-
            A measure of how well or confident the user feels in themselves and
            how they feel they measure up to the expectations of themselves and
            of others.
        mentalStrain:
          $ref: '#/components/schemas/MentalWellnessValue'
          description: An overall measure of the user’s mental wellness.
        uniformDistress:
          $ref: '#/components/schemas/MentalWellnessContinuousValue'
          description: >-
            A continuous measure of the user’s levels of distress, or in other
            words worry, nervousness or a feeling of being on edge.
        uniformStress:
          $ref: '#/components/schemas/MentalWellnessContinuousValue'
          description: >-
            A continuous measure of the user’s stress levels, or in other words
            how anxious or wound up they may feel on this day, whether they are
            able to relax.
        uniformExhaustion:
          $ref: '#/components/schemas/MentalWellnessContinuousValue'
          description: >-
            A continuous measure of the user’s physical and mental tiredness as
            a result of manual or cognitive labour on this or previous days.
            This is not directly linked to a lack of sleep or the time of day.
        uniformSleepPropensity:
          $ref: '#/components/schemas/MentalWellnessContinuousValue'
          description: >-
            A continuous measure of the user’s sleepiness, i.e. a measure of how
            likely they are to fall asleep if given the opportunity. This is
            more directly related to poor sleep or a lack of sleep over a single
            night or several nights.
        uniformLowSelfEsteem:
          $ref: '#/components/schemas/MentalWellnessContinuousValue'
          description: >-
            A continuous measure of how well or confident the user feels in
            themselves and how they feel they measure up to the expectations of
            themselves and of others.
      required:
        - startSecs
        - finishSecs
        - transcript
        - distress
        - stress
        - exhaustion
        - sleepPropensity
        - lowSelfEsteem
        - mentalStrain
      title: MentalWellnessPartResult
    MentalWellnessResults:
      type: object
      properties:
        sections:
          type: array
          items:
            $ref: '#/components/schemas/MentalWellnessPartResult'
          description: >-
            An array of mental wellness indicators, each specific to one timed
            section of the recording
      required:
        - sections
      title: MentalWellnessResults
    MentalWellnessErrorCode:
      type: string
      enum:
        - ERR_RECORDING_INVALID_FORMAT
        - ERR_RECORDING_TOO_SHORT
        - ERR_RECORDING_TOO_LONG
        - ERR_TRANSCRIPTION_FAILED
        - ERR_INTERNAL
      description: An enumeration.
      title: MentalWellnessErrorCode
    Tag:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
      required:
        - name
        - value
      title: Tag
    DataDeletionType:
      type: string
      enum:
        - RECORDINGS
      description: An enumeration.
      title: DataDeletionType
    MentalWellnessModelRunResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The id of the existing model run
        createdAt:
          type: string
          format: date-time
          description: When the model run was submitted to the API
        status:
          $ref: '#/components/schemas/ModelRunStatus'
          description: |-
            Current status of the model run. Possible values:
             * `CREATED`: Model run created; Waiting for files to be uploaded or thymia activities to be completed
             * `RUNNING`: All input to model has been supplied and the model is being executed
             * `COMPLETE_OK`: Model execution completed ok and results are available
             * `COMPLETE_ERROR`: Model execution completed with error and no results available
                
        runAt:
          type: string
          format: date-time
          description: >-
            The time the model run started executing and the status changed to
            `RUNNING`. This is after all input to the model has been supplied
        completedAt:
          type: string
          format: date-time
          description: >-
            When the model run finished processing and either results or an
            error reason are available; only populated once the model run
            completes
        errorReason:
          type: string
          description: Only populated if the model run ended with `COMPLETE_ERROR` status
        warnings:
          type: array
          items:
            type: string
          description: >-
            Contain warnings about potential issues that occurred during the
            model run.
        userLabel:
          type: string
          description: Label of the user that this model run was submitted for
        results:
          $ref: '#/components/schemas/MentalWellnessResults'
          description: Only populated if the model run ended with `COMPLETE_OK` status
        errorCode:
          $ref: '#/components/schemas/MentalWellnessErrorCode'
          description: >-
            Only populated if the model run ended with `COMPLETE_ERROR` status.
            Meaning of each error code:

            * `ERR_RECORDING_INVALID_FORMAT` - The recording supplied was not in
            supported file format.

            * `ERR_RECORDING_TOO_SHORT` - The recording supplied contained less
            than the minimum required amount of 10 seconds of speech.

            * `ERR_RECORDING_TOO_LONG` - The recording supplied exceeded the
            maximum allowed length of 3 minutes.

            * `ERR_TRANSCRIPTION_FAILED` - Couldn't determine speech in the
            recording supplied.

            * `ERR_INTERNAL` - An internal error occurred.
        activityType:
          type: string
          description: |-
            The activity type requested when creating the model run.
                Only populated if using the Thymia Activity Plugin and specifying an activity type (instead of using the default type).
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
          description: Name/Value pairs the model run was tagged with when created.
        deleteData:
          type: boolean
          description: >-
            Boolean flag indicating if user data is to be deleted after the
            completion of the model run.
        dataToDelete:
          type: array
          items:
            $ref: '#/components/schemas/DataDeletionType'
          description: >-
            An array of data types to indicate which data inputs should be
            deleted after the completion of the model run.
        model:
          type: string
          description: The version of model used in the model run.
      required:
        - id
        - createdAt
        - status
        - userLabel
        - deleteData
      title: MentalWellnessModelRunResponse
    ApolloModelRunResponseResults:
      type: object
      properties: {}
      description: >-
        Model results containing mental health indicators. Only populated if the
        model run ended with `COMPLETE_OK` status.


        Results include:

        - **disorders**: Depression and anxiety assessments with probability
        (0-1) and severity (0-1) scores

        - **symptoms**: Detailed symptom breakdowns for each disorder,
        including:
          - Depression symptoms: anhedonia, low mood, sleep issues, low energy, appetite issues, worthlessness, concentration issues, psychomotor issues
          - Anxiety symptoms: nervousness, uncontrollable worry, excessive worry, trouble relaxing, restlessness, irritability, dread
          - Each symptom includes severity (0-1) and distribution across none/mild/moderate/severe categories
      title: ApolloModelRunResponseResults
    ApolloReport:
      type: object
      properties:
        viewUrl:
          type: string
          description: URL to view the Apollo report
        pdfUrl:
          type: string
          description: URL to download the Apollo report as PDF
        accessExpiresAt:
          type: string
          description: ISO 8601 formatted timestamp when the report URLs will expire
      required:
        - viewUrl
        - pdfUrl
        - accessExpiresAt
      title: ApolloReport
    ApolloErrorCode:
      type: string
      enum:
        - ERR_RECORDING_INVALID_FORMAT
        - ERR_RECORDING_TOO_SHORT
        - ERR_RECORDING_TOO_LONG
        - ERR_TRANSCRIPTION_FAILED
        - ERR_INTERNAL
      description: An enumeration.
      title: ApolloErrorCode
    ApolloModelRunResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The id of the existing model run
        createdAt:
          type: string
          format: date-time
          description: When the model run was submitted to the API
        status:
          $ref: '#/components/schemas/ModelRunStatus'
          description: |-
            Current status of the model run. Possible values:
             * `CREATED`: Model run created; Waiting for files to be uploaded or thymia activities to be completed
             * `RUNNING`: All input to model has been supplied and the model is being executed
             * `COMPLETE_OK`: Model execution completed ok and results are available
             * `COMPLETE_ERROR`: Model execution completed with error and no results available
                
        runAt:
          type: string
          format: date-time
          description: >-
            The time the model run started executing and the status changed to
            `RUNNING`. This is after all input to the model has been supplied
        completedAt:
          type: string
          format: date-time
          description: >-
            When the model run finished processing and either results or an
            error reason are available; only populated once the model run
            completes
        errorReason:
          type: string
          description: Only populated if the model run ended with `COMPLETE_ERROR` status
        warnings:
          type: array
          items:
            type: string
          description: >-
            Contain warnings about potential issues that occurred during the
            model run.
        userLabel:
          type: string
          description: Label of the user that this model run was submitted for
        results:
          $ref: '#/components/schemas/ApolloModelRunResponseResults'
          description: >-
            Model results containing mental health indicators. Only populated if
            the model run ended with `COMPLETE_OK` status.


            Results include:

            - **disorders**: Depression and anxiety assessments with probability
            (0-1) and severity (0-1) scores

            - **symptoms**: Detailed symptom breakdowns for each disorder,
            including:
              - Depression symptoms: anhedonia, low mood, sleep issues, low energy, appetite issues, worthlessness, concentration issues, psychomotor issues
              - Anxiety symptoms: nervousness, uncontrollable worry, excessive worry, trouble relaxing, restlessness, irritability, dread
              - Each symptom includes severity (0-1) and distribution across none/mild/moderate/severe categories
        report:
          $ref: '#/components/schemas/ApolloReport'
          description: >-
            URLs to access the Apollo report. Only populated if the model run
            ended with `COMPLETE_OK` status
        errorCode:
          $ref: '#/components/schemas/ApolloErrorCode'
          description: >-
            Only populated if the model run ended with `COMPLETE_ERROR` status.
            Meaning of each error code:

            * `ERR_RECORDING_INVALID_FORMAT` - One or more recordings supplied
            are in an unsupported format.

            * `ERR_RECORDING_TOO_SHORT` - One or more recordings supplied
            contained less than the minimum required amount of speech.

            * `ERR_RECORDING_TOO_LONG` - One or more recordings supplied
            exceeded the maximum allowed length.

            * `ERR_TRANSCRIPTION_FAILED` - Couldn't determine speech in one or
            more recordings supplied.

            * `ERR_INTERNAL` - An internal error occurred.
        deleteData:
          type: boolean
          description: >-
            Boolean flag indicating if user data is to be deleted after the
            completion of the model run.
        model:
          type: string
          description: The version of model used in the model run.
      required:
        - id
        - createdAt
        - status
        - userLabel
        - deleteData
      title: ApolloModelRunResponse
    EmotionsModelRunResponseResults:
      type: object
      properties: {}
      description: Only populated if the model run ended with `COMPLETE_OK` status
      title: EmotionsModelRunResponseResults
    EmotionsErrorCode:
      type: string
      enum:
        - ERR_RECORDING_TOO_SHORT
        - ERR_RECORDING_TOO_LONG
        - ERR_INTERNAL
      description: An enumeration.
      title: EmotionsErrorCode
    EmotionsModelRunResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The id of the existing model run
        createdAt:
          type: string
          format: date-time
          description: When the model run was submitted to the API
        status:
          $ref: '#/components/schemas/ModelRunStatus'
          description: |-
            Current status of the model run. Possible values:
             * `CREATED`: Model run created; Waiting for files to be uploaded or thymia activities to be completed
             * `RUNNING`: All input to model has been supplied and the model is being executed
             * `COMPLETE_OK`: Model execution completed ok and results are available
             * `COMPLETE_ERROR`: Model execution completed with error and no results available
                
        runAt:
          type: string
          format: date-time
          description: >-
            The time the model run started executing and the status changed to
            `RUNNING`. This is after all input to the model has been supplied
        completedAt:
          type: string
          format: date-time
          description: >-
            When the model run finished processing and either results or an
            error reason are available; only populated once the model run
            completes
        errorReason:
          type: string
          description: Only populated if the model run ended with `COMPLETE_ERROR` status
        warnings:
          type: array
          items:
            type: string
          description: >-
            Contain warnings about potential issues that occurred during the
            model run.
        results:
          $ref: '#/components/schemas/EmotionsModelRunResponseResults'
          description: Only populated if the model run ended with `COMPLETE_OK` status
        errorCode:
          $ref: '#/components/schemas/EmotionsErrorCode'
          description: >-
            Only populated if the model run ended with `COMPLETE_ERROR` status.
            Meaning of each error code:

            * `ERR_RECORDING_TOO_SHORT` - The recording supplied contained less
            than the minimum required amount of 10 seconds of speech.

            * `ERR_RECORDING_TOO_LONG` - The recording supplied exceeded the
            maximum allowed size of 410MB.

            * `ERR_INTERNAL` - An internal error occurred.
      required:
        - id
        - createdAt
        - status
      title: EmotionsModelRunResponse
    ModelRuns:
      type: object
      properties:
        mentalWellness:
          $ref: '#/components/schemas/MentalWellnessModelRunResponse'
        apollo:
          $ref: '#/components/schemas/ApolloModelRunResponse'
        emotions:
          $ref: '#/components/schemas/EmotionsModelRunResponse'
      title: ModelRuns
    VoiceAgentCallResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The id of the requested call
        user:
          $ref: '#/components/schemas/UserDetailsShort'
        status:
          type: string
          description: Current status of the call
        agent:
          $ref: '#/components/schemas/VoiceAgentCallResponseAgent'
          description: Configuration for the AI voice agent used in the call
        extractedFields:
          $ref: '#/components/schemas/VoiceAgentCallResponseExtractedFields'
          description: Fields that was extracted by the agent in the call
        modelRun:
          $ref: '#/components/schemas/ModelRuns'
          description: Model run results if available
      required:
        - id
        - user
        - status
        - agent
      title: VoiceAgentCallResponse
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: Your API Activation Key

```

## SDK Code Examples

```python
import requests

url = "https://api.example.com/v1/calls/call_id"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.example.com/v1/calls/call_id';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v1/calls/call_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/calls/call_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.example.com/v1/calls/call_id")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/v1/calls/call_id', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/v1/calls/call_id");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/calls/call_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```