Skip to main content
POST
/
v2
/
insights
/
bookings
/
average-duration
Get average booking duration
curl --request POST \
  --url https://api.cal.com/v2/insights/bookings/average-duration \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "scope": "user",
  "timeZone": "America/New_York",
  "selectedTeamId": 12,
  "columnFilters": [
    {
      "id": "createdAt",
      "value": {
        "type": "dr",
        "data": {
          "startDate": "2024-01-01",
          "endDate": "2024-01-31",
          "preset": "custom"
        }
      }
    }
  ]
}
'
{
  "status": "success",
  "data": [
    {
      "Date": "Jan 1",
      "formattedDateFull": "Jan 1, 2024",
      "isToday": false,
      "Average": 30
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://cal.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Body

application/json
scope
enum<string>
required
Available options:
user,
team,
org
Example:

"user"

timeZone
string
required

IANA timezone used to group time-series insights

Example:

"America/New_York"

selectedTeamId
number

Team ID for team-scoped insights

Example:

12

columnFilters
object[]

Data-table column filters (discriminated union by type: ss, ms, t, n, dr). Date range filters use id=startTime or id=createdAt.

Example:
[
  {
    "id": "createdAt",
    "value": {
      "type": "dr",
      "data": {
        "startDate": "2024-01-01",
        "endDate": "2024-01-31",
        "preset": "custom"
      }
    }
  }
]

Response

200 - application/json
status
enum<string>
required

Response status

Available options:
success,
error
Example:

"success"

data
object[]
required

Array of daily average duration data points