> ## Documentation Index
> Fetch the complete documentation index at: https://www.voiceflow.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics

API operations for analytics. Browse the routes below for parameters, request examples, and responses.

API version: Selected per operation

## Query call count

Reports how many voice calls were placed, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/call-count/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryCallCountRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns the project's call volume as a time series, one row per interval carrying the call count, an accompanying duration in milliseconds, and the timestamp the interval starts at.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryCallCountResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "durationMS": 0,
      "intervalStartDate": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/call-count/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/call-count/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "interval": "hour",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/call-count/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "interval": "hour",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query call-count --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query call duration

Reports how much time was spent on voice calls, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/call-duration/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryCallDurationRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns real call duration, or talk time, as a millisecond figure for each interval. Each row holds only that duration and the interval's start timestamp, with no call count beside it.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryCallDurationResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "durationMS": 0,
      "intervalStartDate": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/call-duration/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/call-duration/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "interval": "hour",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/call-duration/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "interval": "hour",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query call-duration --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query workspace transcript count

Reports how many conversations were recorded, for one workspace over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/transcript-count/workspace/{workspaceID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workspaceID`

Required · string

The ID of the workspace to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryWorkspaceTranscriptCountRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns transcript totals across the workspace, split by project, by environment alias, and by whether the transcripts came from the environment's draft or published version. The rows carry no time dimension.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryWorkspaceTranscriptCountResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "version": "draft",
      "projectID": "<string>",
      "environmentAlias": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/transcript-count/workspace/<workspaceID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "projectIDs": [
    "<string>"
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/transcript-count/workspace/<workspaceID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "projectIDs": [
      "<string>"
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/transcript-count/workspace/<workspaceID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "projectIDs": [
        "<string>"
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query workspace-transcript-count --workspace-id <workspaceID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "projectIDs": [
    "<string>"
  ]
}
JSON
```


## Query project transcript count

Reports how many conversations were recorded, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/transcript-count/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryProjectTranscriptCountRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns the project's transcript count as a time series, one row per interval holding the count and the timestamp that interval begins at.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryProjectTranscriptCountResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "intervalStartDate": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/transcript-count/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/transcript-count/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "interval": "hour",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/transcript-count/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "interval": "hour",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query project-transcript-count --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query transcript cost

Reports what those conversations cost in model spend, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/transcript-cost/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryProjectTranscriptCostRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns per-interval cost paired with the transcript count behind it, so a row shows both the total cost incurred by transcripts and how many transcripts produced it.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryProjectTranscriptCostResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "intervalStartDate": "<string>",
      "transcriptCount": 0,
      "cost": 0,
      "credits": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/transcript-cost/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "usageClass": "Host",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/transcript-cost/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "interval": "hour",
    "usageClass": "Host",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/transcript-cost/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "interval": "hour",
      "usageClass": "Host",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query project-transcript-cost --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "usageClass": "Host",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query workspace interaction count

Reports how many interactions were exchanged, for one workspace over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/interaction-count/workspace/{workspaceID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workspaceID`

Required · string

The ID of the workspace to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryWorkspaceInteractionCountRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns interaction totals for the workspace grouped by interaction type, one row per type. Each row is a type and a count only, with no time dimension.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryWorkspaceInteractionCountResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "type": "<string>",
      "count": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/interaction-count/workspace/<workspaceID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "projectIDs": [
    "<string>"
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/interaction-count/workspace/<workspaceID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "projectIDs": [
      "<string>"
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/interaction-count/workspace/<workspaceID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "projectIDs": [
        "<string>"
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query workspace-interaction-count --workspace-id <workspaceID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "projectIDs": [
    "<string>"
  ]
}
JSON
```


## Query project interaction count

Reports how many interactions were exchanged, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/interaction-count/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryProjectInteractionCountRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns the project's interaction count per time interval, pairing each count with the average latency in milliseconds recorded over that interval.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryProjectInteractionCountResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "averageLatencyMS": 0,
      "intervalStartDate": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/interaction-count/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/interaction-count/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "interval": "hour",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/interaction-count/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "interval": "hour",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query project-interaction-count --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query organization token usage

Reports how many tokens were consumed, for one organization over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/token-usage/organization/{organizationID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `organizationID`

Required · string

The ID of the organization to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryOrganizationTokenUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns the organization's token consumption broken down by model, one row per model with the tokens attributed to it.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryOrganizationTokenUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "model": "<string>",
      "count": 0,
      "credits": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/token-usage/organization/<organizationID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "workspaceIDs": [
    "<string>"
  ],
  "projectIDs": [
    "<string>"
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/token-usage/organization/<organizationID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "workspaceIDs": [
      "<string>"
    ],
    "projectIDs": [
      "<string>"
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/token-usage/organization/<organizationID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "workspaceIDs": [
        "<string>"
      ],
      "projectIDs": [
        "<string>"
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query organization-token-usage --organization-id <organizationID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "workspaceIDs": [
    "<string>"
  ],
  "projectIDs": [
    "<string>"
  ]
}
JSON
```


## Query workspace token usage

Reports how many tokens were consumed, for one workspace over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/token-usage/workspace/{workspaceID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `workspaceID`

Required · string

The ID of the workspace to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryWorkspaceTokenUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns token consumption scoped to a single workspace, one row per model, the same model and count pairing the organization query returns at a wider scope.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryWorkspaceTokenUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "model": "<string>",
      "count": 0,
      "credits": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/token-usage/workspace/<workspaceID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "projectIDs": [
    "<string>"
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/token-usage/workspace/<workspaceID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "projectIDs": [
      "<string>"
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/token-usage/workspace/<workspaceID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "projectIDs": [
        "<string>"
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query workspace-token-usage --workspace-id <workspaceID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "projectIDs": [
    "<string>"
  ]
}
JSON
```


## Query project token usage

Reports how many tokens were consumed, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/token-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryProjectTokenUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns project token counts split by model and by time interval, where the workspace and organization queries give a model split with no interval. The model field is nullable, so some rows report a count without naming a model.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryProjectTokenUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "model": "<string>",
      "count": 0,
      "intervalStartDate": "<string>",
      "credits": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/token-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/token-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "interval": "hour",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/token-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "interval": "hour",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query project-token-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query hourly organization token usage

Reports how many tokens were consumed, bucketed by hour, for one organization over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/hourly-token-usage/organization/{organizationID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `organizationID`

Required · string

The ID of the organization to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryHourlyOrganizationTokenUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns two numbers rather than a row per hour: a total token count for the organization, and a filtered count reflecting the optional workspace and project filters sent with the query.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryOrganizationHourlyTokenUsageResponse"
}
```

Example:

```json
{
  "usage": {
    "totalCount": 0,
    "filteredCount": 0,
    "totalCredits": 0,
    "filteredCredits": 0,
    "totalCostDollars": 0,
    "filteredCostDollars": 0
  }
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/hourly-token-usage/organization/<organizationID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "workspaceIDs": [
    "<string>"
  ],
  "projectIDs": [
    "<string>"
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/hourly-token-usage/organization/<organizationID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "workspaceIDs": [
      "<string>"
    ],
    "projectIDs": [
      "<string>"
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/hourly-token-usage/organization/<organizationID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "workspaceIDs": [
        "<string>"
      ],
      "projectIDs": [
        "<string>"
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query hourly-organization-token-usage --organization-id <organizationID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "workspaceIDs": [
    "<string>"
  ],
  "projectIDs": [
    "<string>"
  ]
}
JSON
```


## Query hourly project token usage

Reports how many tokens were consumed, bucketed by hour, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/hourly-token-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryProjectHourlyTokenUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns hourly token counts for the project, each row keyed by the hour's start timestamp and split by model and by usage category. Both the model and the category are nullable.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryProjectHourlyTokenUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "model": "<string>",
      "usageCategory": "<string>",
      "count": 0,
      "credits": 0,
      "costDollars": 0,
      "intervalStartDate": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/hourly-token-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "usageClass": "Host",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/hourly-token-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "interval": "hour",
    "usageClass": "Host",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/hourly-token-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "interval": "hour",
      "usageClass": "Host",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query hourly-project-token-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "usageClass": "Host",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query daily token usage

Reports how many tokens were consumed, bucketed by day, for one organization over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/daily-token-usage/organization/{organizationID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `organizationID`

Required · string

The ID of the organization to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryDailyTokenUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns a token count per day for the organization, each row split by usage class, usage category, and model, and flagged with a misclassified boolean.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryDailyTokenUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "intervalStartDate": "<string>",
      "usageClass": "<string>",
      "usageCategory": "<string>",
      "model": "<string>",
      "misclassified": true,
      "count": 0,
      "credits": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/daily-token-usage/organization/<organizationID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "workspaceIDs": [
    "<string>"
  ],
  "projectIDs": [
    "<string>"
  ]
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/daily-token-usage/organization/<organizationID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "workspaceIDs": [
      "<string>"
    ],
    "projectIDs": [
      "<string>"
    ]
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/daily-token-usage/organization/<organizationID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "workspaceIDs": [
        "<string>"
      ],
      "projectIDs": [
        "<string>"
      ]
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query daily-token-usage --organization-id <organizationID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "workspaceIDs": [
    "<string>"
  ],
  "projectIDs": [
    "<string>"
  ]
}
JSON
```


## Query entity token usage

Reports how many tokens each entity consumed, for one organization over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/entity-token-usage/organization/{organizationID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `organizationID`

Required · string

The ID of the organization to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryEntityTokenUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns two parallel breakdowns of the organization's tokens, one array of workspaces and one of projects, each row pairing an ID with the tokens it used. Neither is split by model or by time.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryEntityTokenUsageResponse"
}
```

Example:

```json
{
  "workspaces": [
    {
      "workspaceID": "<string>",
      "count": 0,
      "credits": 0
    }
  ],
  "projects": [
    {
      "projectID": "<string>",
      "count": 0,
      "credits": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/entity-token-usage/organization/<organizationID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/entity-token-usage/organization/<organizationID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/entity-token-usage/organization/<organizationID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query entity-token-usage --organization-id <organizationID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>"
}
JSON
```


## Query category token usage

Reports how many tokens each category consumed, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/category-token-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryCategoryTokenUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns hourly token counts for the project grouped by usage category alone, without the model split the hourly project query carries. The category is nullable.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryCategoryTokenUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "usageCategory": "<string>",
      "count": 0,
      "intervalStartDate": "<string>",
      "credits": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/category-token-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "usageClass": "Host",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/category-token-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "interval": "hour",
    "usageClass": "Host",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/category-token-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "interval": "hour",
      "usageClass": "Host",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query category-token-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "usageClass": "Host",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query playbook usage

Reports how often each playbook ran, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/playbook-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryPlaybookUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns one row per playbook, keyed by playbook ID, with its usage count, how many of those runs succeeded, and the average latency in milliseconds.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryPlaybookUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "successCount": 0,
      "averageLatencyMS": 0,
      "playbookID": "<string>",
      "name": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/playbook-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/playbook-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "excludeID": [
      "<string>"
    ],
    "limit": 10,
    "orderDirection": "ASC",
    "orderBy": "count",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/playbook-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "excludeID": [
        "<string>"
      ],
      "limit": 10,
      "orderDirection": "ASC",
      "orderBy": "count",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query playbook-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query workflow usage

Reports how often each workflow ran, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/workflow-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryWorkflowUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns a usage count for each workflow, keyed by workflow ID. Unlike the playbook and tool usage queries, the rows carry no success count and no latency figure.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryWorkflowUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "workflowID": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/workflow-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/workflow-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "excludeID": [
      "<string>"
    ],
    "limit": 10,
    "orderDirection": "ASC",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/workflow-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "excludeID": [
        "<string>"
      ],
      "limit": 10,
      "orderDirection": "ASC",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query workflow-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query prompt usage

Reports how often each prompt was used, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/prompt-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryPromptUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns per-prompt usage keyed by prompt ID, giving the number of uses, the successful subset of those, and the average latency in milliseconds.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryPromptUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "promptID": "<string>",
      "successCount": 0,
      "averageLatencyMS": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/prompt-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/prompt-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "excludeID": [
      "<string>"
    ],
    "limit": 10,
    "orderDirection": "ASC",
    "orderBy": "count",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/prompt-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "excludeID": [
        "<string>"
      ],
      "limit": 10,
      "orderDirection": "ASC",
      "orderBy": "count",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query prompt-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query intent usage

Reports how often each intent matched, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/intent-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryIntentUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns a usage count for each intent, keyed by intent ID. That count is the whole row: no success count and no latency accompany it.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryIntentUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "intentID": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/intent-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/intent-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "excludeID": [
      "<string>"
    ],
    "limit": 10,
    "orderDirection": "ASC",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/intent-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "excludeID": [
        "<string>"
      ],
      "limit": 10,
      "orderDirection": "ASC",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query intent-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query function usage

Reports how often each function ran, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/function-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryFunctionUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns totals for each function keyed by function ID, separating overall uses from successful ones and adding the average latency in milliseconds.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryFunctionUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "functionID": "<string>",
      "successCount": 0,
      "averageLatencyMS": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/function-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/function-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "excludeID": [
      "<string>"
    ],
    "limit": 10,
    "orderDirection": "ASC",
    "orderBy": "count",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/function-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "excludeID": [
        "<string>"
      ],
      "limit": 10,
      "orderDirection": "ASC",
      "orderBy": "count",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query function-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query API tool usage

Reports how often each API tool was called, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/api-tool-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryAPIToolUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns usage for each saved API tool, keyed by API tool ID, with total and successful counts alongside the average latency in milliseconds.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryAPIToolUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "apiToolID": "<string>",
      "successCount": 0,
      "averageLatencyMS": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/api-tool-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/api-tool-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "excludeID": [
      "<string>"
    ],
    "limit": 10,
    "orderDirection": "ASC",
    "orderBy": "count",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/api-tool-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "excludeID": [
        "<string>"
      ],
      "limit": 10,
      "orderDirection": "ASC",
      "orderBy": "count",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query api-tool-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query MCP tool usage

Reports how often each MCP tool was called, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/mcp-tool-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryMCPToolUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns usage for each MCP tool, keyed by the tool's name rather than an ID, with total and successful counts and the average latency in milliseconds.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryMCPToolUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "mcpToolName": "<string>",
      "successCount": 0,
      "averageLatencyMS": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/mcp-tool-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/mcp-tool-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "excludeID": [
      "<string>"
    ],
    "limit": 10,
    "orderDirection": "ASC",
    "orderBy": "count",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/mcp-tool-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "excludeID": [
        "<string>"
      ],
      "limit": 10,
      "orderDirection": "ASC",
      "orderBy": "count",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query mcp-tool-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query knowledge base document usage

Reports how often each knowledge base document was retrieved, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/knowledge-base-document-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryKnowledgeBaseDocumentUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns a usage count for each knowledge base document, keyed by document ID. The row is a document ID and a count, nothing more.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryKnowledgeBaseDocumentUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "documentID": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/knowledge-base-document-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/knowledge-base-document-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "excludeID": [
      "<string>"
    ],
    "limit": 10,
    "orderDirection": "ASC",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/knowledge-base-document-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "excludeID": [
        "<string>"
      ],
      "limit": 10,
      "orderDirection": "ASC",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query knowledge-base-document-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query integration usage

Reports how often each integration ran, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/integration-usage/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryIntegrationUsageRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns usage for each integration, keyed by the integration tool's name, with total and successful counts and the average latency in milliseconds.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryIntegrationUsageResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "integrationToolName": "<string>",
      "successCount": 0,
      "averageLatencyMS": 0
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/integration-usage/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/integration-usage/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "excludeID": [
      "<string>"
    ],
    "limit": 10,
    "orderDirection": "ASC",
    "orderBy": "count",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/integration-usage/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "excludeID": [
        "<string>"
      ],
      "limit": 10,
      "orderDirection": "ASC",
      "orderBy": "count",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query integration-usage --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "excludeID": [
    "<string>"
  ],
  "limit": 10,
  "orderDirection": "ASC",
  "orderBy": "count",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query unique user count

Reports how many distinct users held a conversation, for one project over a date range. The request body takes `startDate`, `endDate` and an `interval`, the same shape the other analytics measures take.

### Endpoint

```http
POST /v1/stable/analytics/query/unique-user-count/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryUniqueUserCountRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns the number of unique users per time interval, one row for each interval with the timestamp it starts at.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryUniqueUsersResponse"
}
```

Example:

```json
{
  "rows": [
    {
      "count": 0,
      "intervalStartDate": "<string>"
    }
  ]
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/unique-user-count/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/unique-user-count/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "interval": "hour",
    "version": "draft",
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/unique-user-count/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "interval": "hour",
      "version": "draft",
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query unique-user-count --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interval": "hour",
  "version": "draft",
  "environmentAlias": "<string>"
}
JSON
```


## Query objective metrics

Reports how sessions performed against the agent's configured objective, conversion or resolution, for one project over a date range. The request body takes `startDate` and `endDate`, with optional timezone, channel and environment filters.

### Endpoint

```http
POST /v1/stable/analytics/query/objective-metrics/project/{projectID}
```

Server: https://realtime-api.voiceflow.com

### Authentication

```json
[
  {
    "token": []
  }
]
```

`token`:

```json
{
  "scheme": "bearer",
  "bearerFormat": "JWT",
  "type": "http",
  "description": "Voiceflow bearer token"
}
```

### Path parameters

#### `projectID`

Required · string

The ID of the project to operate on.

```json
{
  "type": "string"
}
```

### Request body

Required

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/StableAnalyticsQueryObjectiveMetricsRequest"
      }
    }
  }
}
```

### Responses

#### 200

Returns the objective's rate, its matched and evaluated session counts and a time series of buckets, under `conversion` or `resolution` depending on which objective the agent is configured with.

Schema:

```json
{
  "$ref": "#/components/schemas/StableAnalyticsQueryObjectiveMetricsResponse"
}
```

Example:

```json
{
  "conversion": {
    "rate": 0,
    "matchedSessions": 0,
    "evaluatedSessions": 0,
    "interval": "hour",
    "buckets": [
      {
        "date": "2026-09-10T00:00:00.000Z",
        "matchedSessions": 0,
        "evaluatedSessions": 0
      }
    ]
  },
  "resolution": {
    "rate": 0,
    "matchedSessions": 0,
    "evaluatedSessions": 0,
    "interval": "hour",
    "buckets": [
      {
        "date": "2026-09-10T00:00:00.000Z",
        "matchedSessions": 0,
        "evaluatedSessions": 0
      }
    ]
  }
}
```

### Request examples

#### cURL

```bash
curl --request POST \
  --url 'https://realtime-api.voiceflow.com/v1/stable/analytics/query/objective-metrics/project/<projectID>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interfaces": [
    "phone"
  ],
  "environmentAlias": "<string>"
}'
```

#### JavaScript

```javascript
const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/analytics/query/objective-metrics/project/<projectID>', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "endDate": "<string>",
    "startDate": "<string>",
    "timezone": "<string>",
    "interfaces": [
      "phone"
    ],
    "environmentAlias": "<string>"
  }),
});
const data = await response.json();
```

#### Python

```python
import requests

response = requests.post(
    'https://realtime-api.voiceflow.com/v1/stable/analytics/query/objective-metrics/project/<projectID>',
    headers={'Authorization': 'Bearer <token>'},
    json={
      "endDate": "<string>",
      "startDate": "<string>",
      "timezone": "<string>",
      "interfaces": [
        "phone"
      ],
      "environmentAlias": "<string>"
    },
)
data = response.json()
```

#### Voiceflow CLI

```bash
vf analytics query objective-metrics --project-id <projectID> <<'JSON'
{
  "endDate": "<string>",
  "startDate": "<string>",
  "timezone": "<string>",
  "interfaces": [
    "phone"
  ],
  "environmentAlias": "<string>"
}
JSON
```


## Schema definitions

### ObjectiveMetrics

```json
{
  "type": "object",
  "properties": {
    "rate": {
      "nullable": true,
      "description": "Percentage (0-100) of evaluated sessions that met the objective, rounded to one decimal. Null when no session was evaluated; never report a null as 0%.",
      "type": "number"
    },
    "matchedSessions": {
      "type": "number",
      "description": "Sessions that met the objective. The numerator of the rate."
    },
    "evaluatedSessions": {
      "type": "number",
      "description": "Sessions evaluated against the objective. The denominator of the rate."
    },
    "interval": {
      "type": "string",
      "enum": [
        "hour",
        "day",
        "week",
        "month"
      ],
      "description": "The bucket size of every `buckets` entry, derived from the requested range: hour up to a day, day up to 31 days, week up to 56 days, month beyond that.",
      "x-enumNames": [
        "HOUR",
        "DAY",
        "WEEK",
        "MONTH"
      ]
    },
    "buckets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "matchedSessions": {
            "type": "number"
          },
          "evaluatedSessions": {
            "type": "number"
          }
        },
        "required": [
          "date",
          "matchedSessions",
          "evaluatedSessions"
        ]
      },
      "description": "Counts per `interval` bucket, not percentages. `date` is the start of the bucket. Divide within a bucket to get that bucket's rate."
    }
  },
  "required": [
    "rate",
    "matchedSessions",
    "evaluatedSessions",
    "interval",
    "buckets"
  ]
}
```

### StableAnalyticsQueryAPIToolUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "excludeID": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "limit": {
      "default": 10,
      "type": "number",
      "maximum": 20
    },
    "orderDirection": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "x-enumNames": [
        "ASC",
        "DESC"
      ]
    },
    "orderBy": {
      "type": "string",
      "enum": [
        "count",
        "averageLatencyMS"
      ],
      "x-enumNames": [
        "COUNT",
        "AVERAGE_LATENCY_MS"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryAPIToolUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "apiToolID": {
            "type": "string"
          },
          "successCount": {
            "type": "number"
          },
          "averageLatencyMS": {
            "type": "number"
          }
        },
        "required": [
          "count",
          "apiToolID",
          "successCount",
          "averageLatencyMS"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryCallCountRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "interval": {
      "type": "string",
      "enum": [
        "hour",
        "day",
        "week",
        "month"
      ],
      "x-enumNames": [
        "HOUR",
        "DAY",
        "WEEK",
        "MONTH"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate",
    "interval"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryCallCountResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "durationMS": {
            "type": "number"
          },
          "intervalStartDate": {
            "type": "string",
            "allOf": [
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              }
            ]
          }
        },
        "required": [
          "count",
          "durationMS",
          "intervalStartDate"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryCallDurationRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "interval": {
      "type": "string",
      "enum": [
        "hour",
        "day",
        "week",
        "month"
      ],
      "x-enumNames": [
        "HOUR",
        "DAY",
        "WEEK",
        "MONTH"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate",
    "interval"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryCallDurationResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "durationMS": {
            "type": "number"
          },
          "intervalStartDate": {
            "type": "string",
            "allOf": [
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              }
            ]
          }
        },
        "required": [
          "durationMS",
          "intervalStartDate"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryCategoryTokenUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "interval": {
      "type": "string",
      "enum": [
        "hour",
        "day",
        "week",
        "month"
      ],
      "x-enumNames": [
        "HOUR",
        "DAY",
        "WEEK",
        "MONTH"
      ]
    },
    "usageClass": {
      "type": "string",
      "enum": [
        "Host",
        "Build",
        "Test",
        "Monitor"
      ],
      "x-enumNames": [
        "HOST",
        "BUILD",
        "TEST",
        "MONITOR"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate",
    "interval"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryCategoryTokenUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "usageCategory": {
            "nullable": true,
            "type": "string"
          },
          "count": {
            "type": "number",
            "description": "The tokens used, in raw usage units, not credits."
          },
          "intervalStartDate": {
            "type": "string",
            "allOf": [
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              }
            ]
          },
          "credits": {
            "type": "number",
            "description": "The tokens used, in credits, as the Usage page shows them. Copy this, not `count`, when you show a cost."
          }
        },
        "required": [
          "usageCategory",
          "count",
          "intervalStartDate",
          "credits"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryDailyTokenUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "workspaceIDs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "projectIDs": {
      "description": "The IDs of the projects to filter results by. Defaults to all projects in the workspace.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryDailyTokenUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "intervalStartDate": {
            "type": "string"
          },
          "usageClass": {
            "nullable": true,
            "type": "string"
          },
          "usageCategory": {
            "nullable": true,
            "type": "string"
          },
          "model": {
            "nullable": true,
            "type": "string"
          },
          "misclassified": {
            "type": "boolean"
          },
          "count": {
            "type": "number",
            "description": "The tokens used, in raw usage units, not credits."
          },
          "credits": {
            "type": "number",
            "description": "The tokens used, in credits, as the Usage page shows them. Copy this, not `count`, when you show a cost."
          }
        },
        "required": [
          "intervalStartDate",
          "usageClass",
          "usageCategory",
          "model",
          "misclassified",
          "count",
          "credits"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryEntityTokenUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryEntityTokenUsageResponse

```json
{
  "type": "object",
  "properties": {
    "workspaces": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "workspaceID": {
            "type": "string"
          },
          "count": {
            "type": "number",
            "description": "The tokens used, in raw usage units, not credits."
          },
          "credits": {
            "type": "number",
            "description": "The tokens used, in credits, as the Usage page shows them. Copy this, not `count`, when you show a cost."
          }
        },
        "required": [
          "workspaceID",
          "count",
          "credits"
        ]
      }
    },
    "projects": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "projectID": {
            "type": "string",
            "description": "The ID of the project."
          },
          "count": {
            "type": "number",
            "description": "The tokens used, in raw usage units, not credits."
          },
          "credits": {
            "type": "number",
            "description": "The tokens used, in credits, as the Usage page shows them. Copy this, not `count`, when you show a cost."
          }
        },
        "required": [
          "projectID",
          "count",
          "credits"
        ]
      },
      "description": "The token usage broken down by project."
    }
  },
  "required": [
    "workspaces",
    "projects"
  ]
}
```

### StableAnalyticsQueryFunctionUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "excludeID": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "limit": {
      "default": 10,
      "type": "number",
      "maximum": 20
    },
    "orderDirection": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "x-enumNames": [
        "ASC",
        "DESC"
      ]
    },
    "orderBy": {
      "type": "string",
      "enum": [
        "count",
        "averageLatencyMS"
      ],
      "x-enumNames": [
        "COUNT",
        "AVERAGE_LATENCY_MS"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryFunctionUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "functionID": {
            "type": "string"
          },
          "successCount": {
            "type": "number"
          },
          "averageLatencyMS": {
            "type": "number"
          }
        },
        "required": [
          "count",
          "functionID",
          "successCount",
          "averageLatencyMS"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryHourlyOrganizationTokenUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "workspaceIDs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "projectIDs": {
      "description": "The IDs of the projects to filter results by. Defaults to all projects in the workspace.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryIntegrationUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "excludeID": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "limit": {
      "default": 10,
      "type": "number",
      "maximum": 20
    },
    "orderDirection": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "x-enumNames": [
        "ASC",
        "DESC"
      ]
    },
    "orderBy": {
      "type": "string",
      "enum": [
        "count",
        "averageLatencyMS"
      ],
      "x-enumNames": [
        "COUNT",
        "AVERAGE_LATENCY_MS"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryIntegrationUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "integrationToolName": {
            "type": "string"
          },
          "successCount": {
            "type": "number"
          },
          "averageLatencyMS": {
            "type": "number"
          }
        },
        "required": [
          "count",
          "integrationToolName",
          "successCount",
          "averageLatencyMS"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryIntentUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "excludeID": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "limit": {
      "default": 10,
      "type": "number",
      "maximum": 20
    },
    "orderDirection": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "x-enumNames": [
        "ASC",
        "DESC"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryIntentUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "intentID": {
            "type": "string"
          }
        },
        "required": [
          "count",
          "intentID"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryKnowledgeBaseDocumentUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "excludeID": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "limit": {
      "default": 10,
      "type": "number",
      "maximum": 20
    },
    "orderDirection": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "x-enumNames": [
        "ASC",
        "DESC"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryKnowledgeBaseDocumentUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "documentID": {
            "type": "string"
          }
        },
        "required": [
          "count",
          "documentID"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryMCPToolUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "excludeID": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "limit": {
      "default": 10,
      "type": "number",
      "maximum": 20
    },
    "orderDirection": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "x-enumNames": [
        "ASC",
        "DESC"
      ]
    },
    "orderBy": {
      "type": "string",
      "enum": [
        "count",
        "averageLatencyMS"
      ],
      "x-enumNames": [
        "COUNT",
        "AVERAGE_LATENCY_MS"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryMCPToolUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "mcpToolName": {
            "type": "string"
          },
          "successCount": {
            "type": "number"
          },
          "averageLatencyMS": {
            "type": "number"
          }
        },
        "required": [
          "count",
          "mcpToolName",
          "successCount",
          "averageLatencyMS"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryObjectiveMetricsRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "interfaces": {
      "description": "The channels to filter results by. Defaults to all channels.",
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "phone",
          "webchat",
          "api",
          "sms"
        ],
        "x-enumNames": [
          "PHONE",
          "WEBCHAT",
          "API",
          "SMS"
        ]
      }
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryObjectiveMetricsResponse

```json
{
  "type": "object",
  "properties": {
    "conversion": {
      "description": "Returned only when the assistant's objective is conversion.",
      "allOf": [
        {
          "$ref": "#/components/schemas/ObjectiveMetrics"
        }
      ]
    },
    "resolution": {
      "description": "Returned only when the assistant's objective is resolution.",
      "allOf": [
        {
          "$ref": "#/components/schemas/ObjectiveMetrics"
        }
      ]
    }
  }
}
```

### StableAnalyticsQueryOrganizationHourlyTokenUsageResponse

```json
{
  "type": "object",
  "properties": {
    "usage": {
      "type": "object",
      "properties": {
        "totalCount": {
          "type": "number"
        },
        "filteredCount": {
          "type": "number"
        },
        "totalCredits": {
          "type": "number"
        },
        "filteredCredits": {
          "type": "number"
        },
        "totalCostDollars": {
          "nullable": true,
          "type": "number"
        },
        "filteredCostDollars": {
          "nullable": true,
          "type": "number"
        }
      },
      "required": [
        "totalCount",
        "filteredCount",
        "totalCredits",
        "filteredCredits"
      ]
    }
  },
  "required": [
    "usage"
  ]
}
```

### StableAnalyticsQueryOrganizationTokenUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "workspaceIDs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "projectIDs": {
      "description": "The IDs of the projects to filter results by. Defaults to all projects in the workspace.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryOrganizationTokenUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "count": {
            "type": "number",
            "description": "The tokens used, in raw usage units, not credits."
          },
          "credits": {
            "type": "number",
            "description": "The tokens used, in credits, as the Usage page shows them. Copy this, not `count`, when you show a cost."
          }
        },
        "required": [
          "model",
          "count",
          "credits"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryPlaybookUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "excludeID": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "limit": {
      "default": 10,
      "type": "number",
      "maximum": 20
    },
    "orderDirection": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "x-enumNames": [
        "ASC",
        "DESC"
      ]
    },
    "orderBy": {
      "type": "string",
      "enum": [
        "count",
        "averageLatencyMS"
      ],
      "x-enumNames": [
        "COUNT",
        "AVERAGE_LATENCY_MS"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryPlaybookUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "successCount": {
            "type": "number"
          },
          "averageLatencyMS": {
            "type": "number"
          },
          "playbookID": {
            "type": "string",
            "description": "The ID of the playbook this usage row refers to."
          },
          "name": {
            "nullable": true,
            "description": "The playbook's name, or the Main Agent's name for its row. null when the playbook no longer exists.",
            "type": "string"
          }
        },
        "required": [
          "count",
          "successCount",
          "averageLatencyMS",
          "playbookID",
          "name"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryProjectHourlyTokenUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "interval": {
      "type": "string",
      "enum": [
        "hour",
        "day",
        "week",
        "month"
      ],
      "x-enumNames": [
        "HOUR",
        "DAY",
        "WEEK",
        "MONTH"
      ]
    },
    "usageClass": {
      "type": "string",
      "enum": [
        "Host",
        "Build",
        "Test",
        "Monitor"
      ],
      "x-enumNames": [
        "HOST",
        "BUILD",
        "TEST",
        "MONITOR"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate",
    "interval"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryProjectHourlyTokenUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "model": {
            "nullable": true,
            "type": "string"
          },
          "usageCategory": {
            "nullable": true,
            "type": "string"
          },
          "count": {
            "type": "number"
          },
          "credits": {
            "type": "number"
          },
          "costDollars": {
            "nullable": true,
            "type": "number"
          },
          "intervalStartDate": {
            "type": "string",
            "allOf": [
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              }
            ]
          }
        },
        "required": [
          "model",
          "usageCategory",
          "count",
          "credits",
          "intervalStartDate"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryProjectInteractionCountRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "interval": {
      "type": "string",
      "enum": [
        "hour",
        "day",
        "week",
        "month"
      ],
      "x-enumNames": [
        "HOUR",
        "DAY",
        "WEEK",
        "MONTH"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate",
    "interval"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryProjectInteractionCountResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "averageLatencyMS": {
            "type": "number"
          },
          "intervalStartDate": {
            "type": "string",
            "allOf": [
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              }
            ]
          }
        },
        "required": [
          "count",
          "averageLatencyMS",
          "intervalStartDate"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryProjectTokenUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "interval": {
      "type": "string",
      "enum": [
        "hour",
        "day",
        "week",
        "month"
      ],
      "x-enumNames": [
        "HOUR",
        "DAY",
        "WEEK",
        "MONTH"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate",
    "interval"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryProjectTokenUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "model": {
            "nullable": true,
            "type": "string"
          },
          "count": {
            "type": "number",
            "description": "The tokens used, in raw usage units, not credits."
          },
          "intervalStartDate": {
            "type": "string",
            "allOf": [
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              }
            ]
          },
          "credits": {
            "type": "number",
            "description": "The tokens used, in credits, as the Usage page shows them. Copy this, not `count`, when you show a cost."
          }
        },
        "required": [
          "model",
          "count",
          "intervalStartDate",
          "credits"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryProjectTranscriptCostRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "interval": {
      "type": "string",
      "enum": [
        "hour",
        "day",
        "week",
        "month"
      ],
      "x-enumNames": [
        "HOUR",
        "DAY",
        "WEEK",
        "MONTH"
      ]
    },
    "usageClass": {
      "type": "string",
      "enum": [
        "Host",
        "Build",
        "Test",
        "Monitor"
      ],
      "x-enumNames": [
        "HOST",
        "BUILD",
        "TEST",
        "MONITOR"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate",
    "interval"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryProjectTranscriptCostResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "intervalStartDate": {
            "type": "string",
            "allOf": [
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              }
            ]
          },
          "transcriptCount": {
            "type": "number"
          },
          "cost": {
            "type": "number",
            "description": "The total cost incurred by transcripts for this row, in raw usage units, not credits."
          },
          "credits": {
            "type": "number",
            "description": "The cost in credits, as the Usage page shows it. Copy this, not `cost`, when you show a cost."
          }
        },
        "required": [
          "intervalStartDate",
          "transcriptCount",
          "cost",
          "credits"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryProjectTranscriptCountRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "interval": {
      "type": "string",
      "enum": [
        "hour",
        "day",
        "week",
        "month"
      ],
      "x-enumNames": [
        "HOUR",
        "DAY",
        "WEEK",
        "MONTH"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate",
    "interval"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryProjectTranscriptCountResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "intervalStartDate": {
            "type": "string",
            "allOf": [
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              }
            ]
          }
        },
        "required": [
          "count",
          "intervalStartDate"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryPromptUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "excludeID": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "limit": {
      "default": 10,
      "type": "number",
      "maximum": 20
    },
    "orderDirection": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "x-enumNames": [
        "ASC",
        "DESC"
      ]
    },
    "orderBy": {
      "type": "string",
      "enum": [
        "count",
        "averageLatencyMS"
      ],
      "x-enumNames": [
        "COUNT",
        "AVERAGE_LATENCY_MS"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryPromptUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "promptID": {
            "type": "string"
          },
          "successCount": {
            "type": "number"
          },
          "averageLatencyMS": {
            "type": "number"
          }
        },
        "required": [
          "count",
          "promptID",
          "successCount",
          "averageLatencyMS"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryUniqueUserCountRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "interval": {
      "type": "string",
      "enum": [
        "hour",
        "day",
        "week",
        "month"
      ],
      "x-enumNames": [
        "HOUR",
        "DAY",
        "WEEK",
        "MONTH"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate",
    "interval"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryUniqueUsersResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "intervalStartDate": {
            "type": "string",
            "allOf": [
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "string",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
              }
            ]
          }
        },
        "required": [
          "count",
          "intervalStartDate"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryWorkflowUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "excludeID": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "limit": {
      "default": 10,
      "type": "number",
      "maximum": 20
    },
    "orderDirection": {
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ],
      "x-enumNames": [
        "ASC",
        "DESC"
      ]
    },
    "version": {
      "description": "Filters results to the draft or published version of the environment. Defaults to both.",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "x-enumNames": [
        "DRAFT",
        "PUBLISHED"
      ]
    },
    "environmentAlias": {
      "description": "The ID or alias of the environment to filter results by. Defaults to all environments.",
      "type": "string"
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryWorkflowUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "workflowID": {
            "type": "string",
            "description": "The ID of the workflow this usage row refers to."
          }
        },
        "required": [
          "count",
          "workflowID"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryWorkspaceInteractionCountRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "projectIDs": {
      "description": "The IDs of the projects to filter results by. Defaults to all projects in the workspace.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryWorkspaceInteractionCountResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "count": {
            "type": "number"
          }
        },
        "required": [
          "type",
          "count"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryWorkspaceTokenUsageRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "projectIDs": {
      "description": "The IDs of the projects to filter results by. Defaults to all projects in the workspace.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryWorkspaceTokenUsageResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "count": {
            "type": "number",
            "description": "The tokens used, in raw usage units, not credits."
          },
          "credits": {
            "type": "number",
            "description": "The tokens used, in credits, as the Usage page shows them. Copy this, not `count`, when you show a cost."
          }
        },
        "required": [
          "model",
          "count",
          "credits"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```

### StableAnalyticsQueryWorkspaceTranscriptCountRequest

```json
{
  "type": "object",
  "properties": {
    "endDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "startDate": {
      "type": "string",
      "allOf": [
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "string",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        }
      ]
    },
    "timezone": {
      "type": "string"
    },
    "projectIDs": {
      "description": "The IDs of the projects to filter results by. Defaults to all projects in the workspace.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "endDate",
    "startDate"
  ],
  "additionalProperties": false
}
```

### StableAnalyticsQueryWorkspaceTranscriptCountResponse

```json
{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "version": {
            "description": "Whether the transcripts in this row came from the draft or published version of the environment.",
            "type": "string",
            "enum": [
              "draft",
              "published"
            ],
            "x-enumNames": [
              "DRAFT",
              "PUBLISHED"
            ]
          },
          "projectID": {
            "description": "The ID of the project this row belongs to.",
            "type": "string"
          },
          "environmentAlias": {
            "description": "The alias of the environment this row belongs to.",
            "type": "string"
          }
        },
        "required": [
          "count"
        ]
      }
    }
  },
  "required": [
    "rows"
  ]
}
```
