> ## Documentation Index
> Fetch the complete documentation index at: https://vidlab7-d7584a5d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get conversations by date range

> Retrieves conversations for all avatars owned by the authenticated user within a given time range. The range must not exceed 24 hours.

### Headers

<ParamField header="x-api-key" type="string" required placeholder="YOUR_API_KEY">
  Your Moonscale API key used for authentication.
</ParamField>

<ParamField header="Content-Type" type="string" placeholder="application/json">
  The content type of the request body. Always `application/json`.
</ParamField>

### Parameters

<ParamField query="dateStart" type="integer" required>
  Start of the time range as a Unix timestamp (seconds since epoch).
</ParamField>

<ParamField query="dateEnd" type="integer" required>
  End of the time range as a Unix timestamp (seconds since epoch). Must be after dateStart and within 24 hours.
</ParamField>

<ParamField query="liveAvatarId" type="string">
  Optional live avatar ID (UUID) to filter conversations to a specific avatar.
</ParamField>

<RequestExample>
  ```bash Example Request theme={null}
  curl --location --request GET 'https://api-prd.moonscale.com/api/v1/conversations?dateStart=1700000000&dateEnd=1700086400' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <YOUR_API_KEY>'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "conversations": [
          {
              "conversationId": "uuid",
              "startTimestamp": "2024-01-01T00:00:00.000Z",
              "durationSeconds": 120,
              "utm_id": "contact-id",
              "utm_source": "source",
              "transcript": [
                  {
                      "role": "assistant",
                      "type": "type",
                      "text": "text",
                      "timestamp": "2024-01-01T00:00:00.000Z"
                  }
              ],
              "summary": "AI-generated summary of the conversation",
              "liveAvatarId": "uuid"
          }
      ]
  }
  ```
</ResponseExample>

### Responses

***

#### 200:

<ResponseField name="conversations" type="Conversation[]">
  An array of conversation objects within the specified date range.

  <Expandable title="Conversation">
    <ResponseField name="conversationId" type="string">
      Unique identifier (UUID) of the conversation.
    </ResponseField>

    <ResponseField name="startTimestamp" type="string | null">
      ISO 8601 timestamp of when the conversation started.
    </ResponseField>

    <ResponseField name="durationSeconds" type="integer | null">
      Duration of the conversation in seconds.
    </ResponseField>

    <ResponseField name="utm_id" type="string | null">
      The Contact ID passed via URL (utm\_id parameter).
    </ResponseField>

    <ResponseField name="utm_source" type="string | null">
      The UTM source parameter from the conversation URL.
    </ResponseField>

    <ResponseField name="transcript" type="Transcript[] | null">
      An array of transcript entries for the conversation.

      <Expandable title="Transcript">
        <ResponseField name="role" type="string">
          Indicates the role of the participant (e.g., "user", "assistant").
        </ResponseField>

        <ResponseField name="text" type="string">
          The textual content of the message.
        </ResponseField>

        <ResponseField name="timestamp" type="string">
          A datetime timestamp marking when the message was sent.
        </ResponseField>

        <ResponseField name="type" type="string">
          Specifies the type of the transcription entry.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="summary" type="string | null">
      AI-generated summary of the conversation.
    </ResponseField>

    <ResponseField name="liveAvatarId" type="string">
      The ID (UUID) of the live avatar that hosted this conversation.
    </ResponseField>
  </Expandable>
</ResponseField>

***

#### 400:

Invalid query parameters (missing dateStart/dateEnd, range exceeds 24h, or dateEnd not after dateStart).

***

#### 401:

Unauthorized - invalid or missing API key.
