Skip to main content
GET
/
api
/
v2
/
analytics
/
ai-functions
Get AI function analytics
curl --request GET \
  --url https://app.livechatai.com/api/v2/analytics/ai-functions \
  --header 'Authorization: Bearer <token>'
{
  "status": "success",
  "data": {
    "currentPeriod": {
      "total": 245,
      "totalFailed": 12,
      "functions": [
        {
          "name": "send_email",
          "description": "Send email to user",
          "total": 85,
          "totalFailed": 3,
          "type": "CUSTOM",
          "mcpName": null,
          "mcpProvider": "slack"
        }
      ]
    },
    "previousPeriod": {
      "total": 212,
      "totalFailed": 13
    },
    "changes": {
      "total": 15.5,
      "totalFailed": -8.2
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

agentId
string
required

The ID of the agent/chatbot

Example:

"clx1234567890abcdef"

startDate
string<date>
required

Start date for analytics (ISO 8601 format)

Example:

"2024-01-01"

endDate
string<date>
required

End date for analytics (ISO 8601 format)

Example:

"2024-01-31"

timezone
string

Timezone for date calculations (defaults to system timezone)

Example:

"America/New_York"

Response

Successfully retrieved AI function analytics data

status
string
Example:

"success"

data
object