> For the complete documentation index, see [llms.txt](https://docs.multitudes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.multitudes.com/knowledge-base/multitudes-api.md).

# Multitudes API

The Multitudes API is a public REST API that lets you interact with the Multitudes app programmatically. You can retrieve metadata about your organization, query chart data, and get the drilldown data for all metrics in the app.&#x20;

All data is returned in a consistent JSON format that makes it easy to combine with other data sources or build custom workflows around your engineering data.

## Before you start

Authenticate using an organization API key passed as `Authorization: Bearer <token>`. Keys must have the `data:read` scope to access metric endpoints. See how to generate an API key [here](https://app.gitbook.com/o/THcZnhoh3QjxAcKJq3oo/s/1eOL1LoKX0USQQUCSepS/~/edit/~/changes/295/getting-started/multitudes-customer-api#how-to-generate-an-api-key).

All endpoints are served from `https://api.multitudes.co`. An OpenAPI spec is available without authentication at [`https://api.multitudes.co/openapi.json`](https://api.multitudes.co/openapi.json).

## Endpoints

## GET /v1/teams

> List all teams in the organization.

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"servers":[{"url":"/customer"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Authorization: Bearer <token>. A raw token in the Authorization header is also accepted for backward compatibility."}},"schemas":{"TeamsResponseDto":{"type":"object","properties":{"items":{"description":"List of teams.","type":"array","items":{"$ref":"#/components/schemas/TeamDto"}}},"required":["items"]},"TeamDto":{"type":"object","properties":{"id":{"type":"string","description":"Team UUID."},"name":{"type":"string","description":"Team display name."},"status":{"type":"string","description":"Team status.","enum":["active","archived"]}},"required":["id","name","status"]}}},"paths":{"/v1/teams":{"get":{"parameters":[{"name":"includeArchived","required":false,"in":"query","description":"When true, archived teams are included in the response.","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamsResponseDto"}}}}},"summary":"List all teams in the organization.","tags":["customer"]}}}}
```

## List all supported metric types.

> Returns each metric with a description and the optional query parameters it accepts beyond the standard ones (from, to, timescale, teamIds, teamNames).

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"servers":[{"url":"/customer"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Authorization: Bearer <token>. A raw token in the Authorization header is also accepted for backward compatibility."}},"schemas":{"MetricsListResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MetricInfoDto"}}},"required":["items"]},"MetricInfoDto":{"type":"object","properties":{"type":{"type":"string","description":"Metric type identifier.","enum":["leadTime","codingTime","reviewWaitTime","editingTime","deployTime","mergeFrequency","changeFailureRate","linesOfCodeChanged","filesChanged","deploymentFailureRate","commitsOutOfHours","deploymentFrequency","feedbackGiven","feedbackReceived","feedbackParticipationGap","githubFeatureVsMaintenance","aiActiveUsers","aiIntensityOfUsage","aiCohortDistribution","focusTimeGoogle","focusTimeOutlook","meetingHoursGoogle","meetingHoursOutlook","meetingHoursOohGoogle","meetingHoursOohOutlook","feedbackQuality","feedbackThemes","pagerdutyMeanTimeToRestore","pagerdutyMeanTimeToAcknowledge","pagerdutyPageDisruptions","pagerdutyPageDisruptionsOoh","pagerdutyNumberOfPages","jiraTypeOfWork","jiraFeatureVsMaintenance","linearTypeOfWork","linearFeatureVsMaintenance"]},"description":{"type":"string","description":"Human-readable description of what this metric measures."},"acceptedQueryParams":{"description":"Optional query parameters supported by this metric, beyond the standard ones (from, to, timescale, teamIds, teamNames).","type":"array","items":{"type":"string"}},"drilldown":{"type":"boolean","description":"Whether GET /customer/v1/charts/:metricType/drilldown is supported for this metric."}},"required":["type","description","acceptedQueryParams","drilldown"]}}},"paths":{"/v1/metrics":{"get":{"description":"Returns each metric with a description and the optional query parameters it accepts beyond the standard ones (from, to, timescale, teamIds, teamNames).","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsListResponseDto"}}}}},"summary":"List all supported metric types.","tags":["customer"]}}}}
```

## Retrieve chart data for a metric.

> Returns time-series or aggregate chart data for the specified metric. Use GET /customer/v1/metrics to discover supported metrics and their accepted query parameters.

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"servers":[{"url":"/customer"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Authorization: Bearer <token>. A raw token in the Authorization header is also accepted for backward compatibility."}},"schemas":{"ChartResponseDto":{"type":"object","properties":{"metricType":{"type":"string","description":"Metric type identifier."},"from":{"type":"string","description":"Query start date as ISO 8601 timestamp. Absent for aggregate view."},"to":{"type":"string","description":"Query end date as ISO 8601 timestamp. Absent for aggregate view."},"timescale":{"type":"string","description":"Timescale used for data point bucketing. Absent for aggregate view.","enum":["daily","weekly","monthly"]},"options":{"description":"Echoes options that were explicitly provided in the request.","allOf":[{"$ref":"#/components/schemas/ChartOptionsDto"}]},"series":{"description":"Chart series.","type":"array","items":{"$ref":"#/components/schemas/SeriesDto"}}},"required":["metricType","options","series"]},"ChartOptionsDto":{"type":"object","properties":{"repositories":{"description":"Repository names the response was filtered to.","type":"array","items":{"type":"string"}},"excludeOrganization":{"type":"boolean","description":"Whether the org-level rollup series was excluded from the response."},"excludeWeekendHours":{"type":"boolean","description":"Whether weekend hours were excluded."},"includeSelfiePrs":{"type":"boolean","description":"Whether self-review PRs were included."},"defaultBranchOnly":{"type":"boolean","description":"Whether only default-branch commits/PRs were included."},"view":{"type":"string","description":"View type for githubFeatureVsMaintenance.","enum":["timeSeries","aggregate"]},"direction":{"type":"string","description":"Feedback direction. Applies to feedbackQuality and feedbackThemes metrics.","enum":["given","received"]},"groupBy":{"type":"string","description":"How to group chart series. Defaults to team. AI metrics support: jobLevel, timezone, aiTool, nonContributors. PagerDuty metrics support: service, escalationPolicy.","enum":["team","service","escalationPolicy","jobLevel","timezone","aiTool","nonContributors"]},"cohortMetric":{"type":"string","description":"Cohort metric used to classify users (aiCohortDistribution only).","enum":["dailyActiveUsage","spend","inputTokens","linesChanged"]},"cohortThreshold":{"type":"number","description":"Threshold value used to split High/Low AI cohorts (aiCohortDistribution only). Unit depends on cohortMetric: percentage of active days for 'dailyActiveUsage', USD cents for 'spend', token count for 'inputTokens', line count for 'linesChanged'."},"cohortLookbackWeeks":{"type":"number","description":"Number of lookback weeks used for cohort classification (aiCohortDistribution only)."},"individual":{"type":"boolean","description":"When true, return one series per team member instead of per team. Supported for meeting-hours calendar, PR cycle, and GitHub code review metrics only.","default":false},"countBy":{"type":"string","description":"Unit to count by. For issue tracker metrics (jiraTypeOfWork, jiraFeatureVsMaintenance, linearTypeOfWork, linearFeatureVsMaintenance): issues (default) or storyPoints. For GitHub feedback metrics (feedbackGiven, feedbackReceived, feedbackParticipationGap): comments (default) or reviews. For page disruption metrics (pagerdutyPageDisruptions, pagerdutyPageDisruptionsOoh): pages (default) or disruptedHours.","enum":["issues","storyPoints","comments","reviews","pages","disruptedHours"]},"priorities":{"description":"PagerDuty priority IDs the response was filtered to (PagerDuty metrics only).","type":"array","items":{"type":"string"}},"urgencies":{"type":"array","description":"Urgency levels the response was filtered to (PagerDuty metrics only).","items":{"type":"string","enum":["high","low"]}}}},"SeriesDto":{"type":"object","properties":{"id":{"type":"string","description":"Series identifier. For team series: team UUID. For cohort series: cohort name."},"name":{"type":"string","description":"Display name for the series."},"type":{"type":"string","description":"Series type.","enum":["team","organization","member","cohort"]},"dataPoints":{"description":"Ordered list of data points for this series.","type":"array","items":{"$ref":"#/components/schemas/DataPointDto"}}},"required":["id","name","type","dataPoints"]},"DataPointDto":{"type":"object","properties":{"startDate":{"type":"string","description":"Bucket start date (ISO 8601)."},"endDate":{"type":"string","description":"Bucket end date (ISO 8601)."},"value":{"type":"number","description":"Metric value. Omitted for comment metrics (commentsGiven, commentsReceived, commentsParticipationRatio) and when percentile data (p50/p75/p90/p95) is present."},"p50":{"type":"number","description":"50th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p75":{"type":"number","description":"75th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p90":{"type":"number","description":"90th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p95":{"type":"number","description":"95th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"count":{"type":"number","description":"Number of data points considered in this bucket (e.g. PRs, commits, issues). Null indicates no data for this bucket.","nullable":true},"memberCount":{"type":"number","description":"Number of people considered in this bucket (team members in scope for the data point). Null indicates no data for this bucket.","nullable":true},"spend":{"type":"number","description":"Total AI spend in USD cents for this bucket. Present for aiIntensityOfUsage.","nullable":true},"inputTokens":{"type":"number","description":"Total input tokens consumed for this bucket. Present for aiIntensityOfUsage.","nullable":true},"linesChanged":{"type":"number","description":"Total lines of code accepted for this bucket. Present for aiIntensityOfUsage.","nullable":true},"total":{"type":"number","description":"Total (sum) value for this bucket. Null indicates no data for this bucket.","nullable":true},"label":{"type":"string","description":"Category label for aggregate view data points (e.g. 'Feature', 'Bug'). Only present for githubFeatureVsMaintenance and leadTime when view=aggregate."}},"required":["startDate","endDate"]}}},"paths":{"/v1/charts/{metricType}":{"get":{"description":"Returns time-series or aggregate chart data for the specified metric. Use GET /customer/v1/metrics to discover supported metrics and their accepted query parameters.","parameters":[{"name":"from","required":true,"in":"query","description":"Start of the date range as an ISO 8601 datetime. Required.","schema":{"type":"string"}},{"name":"to","required":true,"in":"query","description":"End of the date range as an ISO 8601 datetime. Required.","schema":{"type":"string"}},{"name":"timescale","required":false,"in":"query","description":"Timescale for bucketing data points.","schema":{"default":"weekly","enum":["daily","weekly","monthly"],"type":"string"}},{"name":"teamIds","required":false,"in":"query","description":"Comma-separated team IDs to filter (mutually exclusive with teamNames, max 50).","schema":{"type":"string"}},{"name":"teamNames","required":false,"in":"query","description":"Comma-separated team names to filter (mutually exclusive with teamIds, max 50).","schema":{"type":"string"}},{"name":"repositories","required":false,"in":"query","description":"Comma-separated repository names to filter (GitHub metrics only).","schema":{"type":"string"}},{"name":"excludeWeekendHours","required":false,"in":"query","description":"Exclude weekend hours from calculations. Applies to PR cycle time metrics.","schema":{"default":false,"type":"boolean"}},{"name":"includeSelfiePrs","required":false,"in":"query","description":"Include PRs where the author also reviewed. Default false.","schema":{"default":false,"type":"boolean"}},{"name":"defaultBranchOnly","required":false,"in":"query","description":"Limit to commits/PRs on default branch only. Applies to githubFeatureVsMaintenance.","schema":{"default":false,"type":"boolean"}},{"name":"excludeOrganization","required":false,"in":"query","description":"Exclude the org-level rollup series from the response. Default false.","schema":{"default":false,"type":"boolean"}},{"name":"view","required":false,"in":"query","description":"View type for githubFeatureVsMaintenance. Default timeSeries.","schema":{"enum":["timeSeries","aggregate"],"type":"string"}},{"name":"groupBy","required":false,"in":"query","description":"How to group chart series. Defaults to team. AI metrics support: jobLevel, timezone, aiTool, nonContributors. PagerDuty metrics support: service, escalationPolicy.","schema":{"default":"team","enum":["team","service","escalationPolicy","jobLevel","timezone","aiTool","nonContributors"],"type":"string"}},{"name":"individual","required":false,"in":"query","description":"When true, return one series per team member instead of per team. Supported for meeting-hours calendar, PR cycle, and GitHub code review metrics only.","schema":{"default":false,"type":"boolean"}},{"name":"countBy","required":false,"in":"query","description":"Unit to count by. For issue tracker metrics (jiraTypeOfWork, jiraFeatureVsMaintenance, linearTypeOfWork, linearFeatureVsMaintenance): issues (default) or storyPoints. For GitHub feedback metrics (feedbackGiven, feedbackReceived, feedbackParticipationGap): comments (default) or reviews. For page disruption metrics (pagerdutyPageDisruptions, pagerdutyPageDisruptionsOoh): pages (default) or disruptedHours.","schema":{"enum":["issues","storyPoints","comments","reviews","pages","disruptedHours"],"type":"string"}},{"name":"direction","required":false,"in":"query","description":"Direction for feedback quality/themes metrics: 'given' (comments the team wrote) or 'received' (comments written on the team's PRs). Default given.","schema":{"default":"given","enum":["given","received"],"type":"string"}},{"name":"priorities","required":false,"in":"query","description":"Comma-separated PagerDuty priority IDs to filter by (PagerDuty metrics only). Use the priority IDs from your PagerDuty configuration.","schema":{"type":"string"}},{"name":"urgencies","required":false,"in":"query","description":"Comma-separated urgency levels to filter by (PagerDuty metrics only). Valid values: high, low.","schema":{"type":"string"}},{"name":"metricType","required":true,"in":"path","description":"The metric to retrieve.","schema":{"enum":["leadTime","codingTime","reviewWaitTime","editingTime","deployTime","mergeFrequency","changeFailureRate","linesOfCodeChanged","filesChanged","deploymentFailureRate","commitsOutOfHours","deploymentFrequency","feedbackGiven","feedbackReceived","feedbackParticipationGap","githubFeatureVsMaintenance","aiActiveUsers","aiIntensityOfUsage","aiCohortDistribution","focusTimeGoogle","focusTimeOutlook","meetingHoursGoogle","meetingHoursOutlook","meetingHoursOohGoogle","meetingHoursOohOutlook","feedbackQuality","feedbackThemes","pagerdutyMeanTimeToRestore","pagerdutyMeanTimeToAcknowledge","pagerdutyPageDisruptions","pagerdutyPageDisruptionsOoh","pagerdutyNumberOfPages","jiraTypeOfWork","jiraFeatureVsMaintenance","linearTypeOfWork","linearFeatureVsMaintenance"],"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponseDto"}}}},"400":{"description":"Invalid query parameters."},"404":{"description":"Metric type not found or not available for your organization."}},"summary":"Retrieve chart data for a metric.","tags":["customer"]}}}}
```

## List AI super-users.

> Returns the top AI coding tool users over the last 28 days.

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"servers":[{"url":"/customer"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Authorization: Bearer <token>. A raw token in the Authorization header is also accepted for backward compatibility."}},"schemas":{}},"paths":{"/v1/super-users":{"get":{"description":"Returns the top AI coding tool users over the last 28 days.","parameters":[{"name":"teamIds","required":false,"in":"query","description":"Comma-separated team IDs to filter (mutually exclusive with teamNames, max 50).","schema":{"type":"string"}},{"name":"teamNames","required":false,"in":"query","description":"Comma-separated team names to filter (mutually exclusive with teamIds, max 50).","schema":{"type":"string"}}],"responses":{"200":{"description":"Super-user list.","content":{"application/json":{"schema":{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PublicSuperUserDto"}}}}}}}},"summary":"List AI super-users.","tags":["customer"]}}}}
```

## Models

## The PostDeploymentDto object

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"components":{"schemas":{"PostDeploymentDto":{"type":"object","properties":{"commitSha":{"description":"Commit SHA(s) for the deployment. Can be a single commit SHA string or an array of commit SHA strings.","oneOf":[{"type":"string","pattern":"^[A-Fa-f0-9]{7,40}$"},{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"string","pattern":"^[A-Fa-f0-9]{7,40}$"}}]},"environmentName":{"type":"string","description":"The environment name the deployment occurred in.","minLength":1},"deployedAt":{"type":"string","description":"When the deployment happened (ISO8601 date-time).","format":"date-time"},"title":{"type":"string","description":"Optional title/label for the deployment.","minLength":1},"tags":{"description":"Optional tags for the deployment.","maxItems":1000,"items":{"type":"string"},"type":"array"},"isTest":{"type":"boolean","description":"If true, the deployment is treated as a test deployment and may be handled differently."}},"required":["commitSha","environmentName"]}}}}
```

## The TeamDto object

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"components":{"schemas":{"TeamDto":{"type":"object","properties":{"id":{"type":"string","description":"Team UUID."},"name":{"type":"string","description":"Team display name."},"status":{"type":"string","description":"Team status.","enum":["active","archived"]}},"required":["id","name","status"]}}}}
```

## The TeamsResponseDto object

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"components":{"schemas":{"TeamsResponseDto":{"type":"object","properties":{"items":{"description":"List of teams.","type":"array","items":{"$ref":"#/components/schemas/TeamDto"}}},"required":["items"]},"TeamDto":{"type":"object","properties":{"id":{"type":"string","description":"Team UUID."},"name":{"type":"string","description":"Team display name."},"status":{"type":"string","description":"Team status.","enum":["active","archived"]}},"required":["id","name","status"]}}}}
```

## The MetricInfoDto object

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"components":{"schemas":{"MetricInfoDto":{"type":"object","properties":{"type":{"type":"string","description":"Metric type identifier.","enum":["leadTime","codingTime","reviewWaitTime","editingTime","deployTime","mergeFrequency","changeFailureRate","linesOfCodeChanged","filesChanged","deploymentFailureRate","commitsOutOfHours","deploymentFrequency","feedbackGiven","feedbackReceived","feedbackParticipationGap","githubFeatureVsMaintenance","aiActiveUsers","aiIntensityOfUsage","aiCohortDistribution","focusTimeGoogle","focusTimeOutlook","meetingHoursGoogle","meetingHoursOutlook","meetingHoursOohGoogle","meetingHoursOohOutlook","feedbackQuality","feedbackThemes","pagerdutyMeanTimeToRestore","pagerdutyMeanTimeToAcknowledge","pagerdutyPageDisruptions","pagerdutyPageDisruptionsOoh","pagerdutyNumberOfPages","jiraTypeOfWork","jiraFeatureVsMaintenance","linearTypeOfWork","linearFeatureVsMaintenance"]},"description":{"type":"string","description":"Human-readable description of what this metric measures."},"acceptedQueryParams":{"description":"Optional query parameters supported by this metric, beyond the standard ones (from, to, timescale, teamIds, teamNames).","type":"array","items":{"type":"string"}},"drilldown":{"type":"boolean","description":"Whether GET /customer/v1/charts/:metricType/drilldown is supported for this metric."}},"required":["type","description","acceptedQueryParams","drilldown"]}}}}
```

## The MetricsListResponseDto object

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"components":{"schemas":{"MetricsListResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MetricInfoDto"}}},"required":["items"]},"MetricInfoDto":{"type":"object","properties":{"type":{"type":"string","description":"Metric type identifier.","enum":["leadTime","codingTime","reviewWaitTime","editingTime","deployTime","mergeFrequency","changeFailureRate","linesOfCodeChanged","filesChanged","deploymentFailureRate","commitsOutOfHours","deploymentFrequency","feedbackGiven","feedbackReceived","feedbackParticipationGap","githubFeatureVsMaintenance","aiActiveUsers","aiIntensityOfUsage","aiCohortDistribution","focusTimeGoogle","focusTimeOutlook","meetingHoursGoogle","meetingHoursOutlook","meetingHoursOohGoogle","meetingHoursOohOutlook","feedbackQuality","feedbackThemes","pagerdutyMeanTimeToRestore","pagerdutyMeanTimeToAcknowledge","pagerdutyPageDisruptions","pagerdutyPageDisruptionsOoh","pagerdutyNumberOfPages","jiraTypeOfWork","jiraFeatureVsMaintenance","linearTypeOfWork","linearFeatureVsMaintenance"]},"description":{"type":"string","description":"Human-readable description of what this metric measures."},"acceptedQueryParams":{"description":"Optional query parameters supported by this metric, beyond the standard ones (from, to, timescale, teamIds, teamNames).","type":"array","items":{"type":"string"}},"drilldown":{"type":"boolean","description":"Whether GET /customer/v1/charts/:metricType/drilldown is supported for this metric."}},"required":["type","description","acceptedQueryParams","drilldown"]}}}}
```

## The ChartOptionsDto object

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"components":{"schemas":{"ChartOptionsDto":{"type":"object","properties":{"repositories":{"description":"Repository names the response was filtered to.","type":"array","items":{"type":"string"}},"excludeOrganization":{"type":"boolean","description":"Whether the org-level rollup series was excluded from the response."},"excludeWeekendHours":{"type":"boolean","description":"Whether weekend hours were excluded."},"includeSelfiePrs":{"type":"boolean","description":"Whether self-review PRs were included."},"defaultBranchOnly":{"type":"boolean","description":"Whether only default-branch commits/PRs were included."},"view":{"type":"string","description":"View type for githubFeatureVsMaintenance.","enum":["timeSeries","aggregate"]},"direction":{"type":"string","description":"Feedback direction. Applies to feedbackQuality and feedbackThemes metrics.","enum":["given","received"]},"groupBy":{"type":"string","description":"How to group chart series. Defaults to team. AI metrics support: jobLevel, timezone, aiTool, nonContributors. PagerDuty metrics support: service, escalationPolicy.","enum":["team","service","escalationPolicy","jobLevel","timezone","aiTool","nonContributors"]},"cohortMetric":{"type":"string","description":"Cohort metric used to classify users (aiCohortDistribution only).","enum":["dailyActiveUsage","spend","inputTokens","linesChanged"]},"cohortThreshold":{"type":"number","description":"Threshold value used to split High/Low AI cohorts (aiCohortDistribution only). Unit depends on cohortMetric: percentage of active days for 'dailyActiveUsage', USD cents for 'spend', token count for 'inputTokens', line count for 'linesChanged'."},"cohortLookbackWeeks":{"type":"number","description":"Number of lookback weeks used for cohort classification (aiCohortDistribution only)."},"individual":{"type":"boolean","description":"When true, return one series per team member instead of per team. Supported for meeting-hours calendar, PR cycle, and GitHub code review metrics only.","default":false},"countBy":{"type":"string","description":"Unit to count by. For issue tracker metrics (jiraTypeOfWork, jiraFeatureVsMaintenance, linearTypeOfWork, linearFeatureVsMaintenance): issues (default) or storyPoints. For GitHub feedback metrics (feedbackGiven, feedbackReceived, feedbackParticipationGap): comments (default) or reviews. For page disruption metrics (pagerdutyPageDisruptions, pagerdutyPageDisruptionsOoh): pages (default) or disruptedHours.","enum":["issues","storyPoints","comments","reviews","pages","disruptedHours"]},"priorities":{"description":"PagerDuty priority IDs the response was filtered to (PagerDuty metrics only).","type":"array","items":{"type":"string"}},"urgencies":{"type":"array","description":"Urgency levels the response was filtered to (PagerDuty metrics only).","items":{"type":"string","enum":["high","low"]}}}}}}}
```

## The DataPointDto object

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"components":{"schemas":{"DataPointDto":{"type":"object","properties":{"startDate":{"type":"string","description":"Bucket start date (ISO 8601)."},"endDate":{"type":"string","description":"Bucket end date (ISO 8601)."},"value":{"type":"number","description":"Metric value. Omitted for comment metrics (commentsGiven, commentsReceived, commentsParticipationRatio) and when percentile data (p50/p75/p90/p95) is present."},"p50":{"type":"number","description":"50th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p75":{"type":"number","description":"75th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p90":{"type":"number","description":"90th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p95":{"type":"number","description":"95th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"count":{"type":"number","description":"Number of data points considered in this bucket (e.g. PRs, commits, issues). Null indicates no data for this bucket.","nullable":true},"memberCount":{"type":"number","description":"Number of people considered in this bucket (team members in scope for the data point). Null indicates no data for this bucket.","nullable":true},"spend":{"type":"number","description":"Total AI spend in USD cents for this bucket. Present for aiIntensityOfUsage.","nullable":true},"inputTokens":{"type":"number","description":"Total input tokens consumed for this bucket. Present for aiIntensityOfUsage.","nullable":true},"linesChanged":{"type":"number","description":"Total lines of code accepted for this bucket. Present for aiIntensityOfUsage.","nullable":true},"total":{"type":"number","description":"Total (sum) value for this bucket. Null indicates no data for this bucket.","nullable":true},"label":{"type":"string","description":"Category label for aggregate view data points (e.g. 'Feature', 'Bug'). Only present for githubFeatureVsMaintenance and leadTime when view=aggregate."}},"required":["startDate","endDate"]}}}}
```

## The SeriesDto object

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"components":{"schemas":{"SeriesDto":{"type":"object","properties":{"id":{"type":"string","description":"Series identifier. For team series: team UUID. For cohort series: cohort name."},"name":{"type":"string","description":"Display name for the series."},"type":{"type":"string","description":"Series type.","enum":["team","organization","member","cohort"]},"dataPoints":{"description":"Ordered list of data points for this series.","type":"array","items":{"$ref":"#/components/schemas/DataPointDto"}}},"required":["id","name","type","dataPoints"]},"DataPointDto":{"type":"object","properties":{"startDate":{"type":"string","description":"Bucket start date (ISO 8601)."},"endDate":{"type":"string","description":"Bucket end date (ISO 8601)."},"value":{"type":"number","description":"Metric value. Omitted for comment metrics (commentsGiven, commentsReceived, commentsParticipationRatio) and when percentile data (p50/p75/p90/p95) is present."},"p50":{"type":"number","description":"50th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p75":{"type":"number","description":"75th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p90":{"type":"number","description":"90th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p95":{"type":"number","description":"95th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"count":{"type":"number","description":"Number of data points considered in this bucket (e.g. PRs, commits, issues). Null indicates no data for this bucket.","nullable":true},"memberCount":{"type":"number","description":"Number of people considered in this bucket (team members in scope for the data point). Null indicates no data for this bucket.","nullable":true},"spend":{"type":"number","description":"Total AI spend in USD cents for this bucket. Present for aiIntensityOfUsage.","nullable":true},"inputTokens":{"type":"number","description":"Total input tokens consumed for this bucket. Present for aiIntensityOfUsage.","nullable":true},"linesChanged":{"type":"number","description":"Total lines of code accepted for this bucket. Present for aiIntensityOfUsage.","nullable":true},"total":{"type":"number","description":"Total (sum) value for this bucket. Null indicates no data for this bucket.","nullable":true},"label":{"type":"string","description":"Category label for aggregate view data points (e.g. 'Feature', 'Bug'). Only present for githubFeatureVsMaintenance and leadTime when view=aggregate."}},"required":["startDate","endDate"]}}}}
```

## The ChartResponseDto object

```json
{"openapi":"3.0.0","info":{"title":"Multitudes Customer API","version":"1.0.0"},"components":{"schemas":{"ChartResponseDto":{"type":"object","properties":{"metricType":{"type":"string","description":"Metric type identifier."},"from":{"type":"string","description":"Query start date as ISO 8601 timestamp. Absent for aggregate view."},"to":{"type":"string","description":"Query end date as ISO 8601 timestamp. Absent for aggregate view."},"timescale":{"type":"string","description":"Timescale used for data point bucketing. Absent for aggregate view.","enum":["daily","weekly","monthly"]},"options":{"description":"Echoes options that were explicitly provided in the request.","allOf":[{"$ref":"#/components/schemas/ChartOptionsDto"}]},"series":{"description":"Chart series.","type":"array","items":{"$ref":"#/components/schemas/SeriesDto"}}},"required":["metricType","options","series"]},"ChartOptionsDto":{"type":"object","properties":{"repositories":{"description":"Repository names the response was filtered to.","type":"array","items":{"type":"string"}},"excludeOrganization":{"type":"boolean","description":"Whether the org-level rollup series was excluded from the response."},"excludeWeekendHours":{"type":"boolean","description":"Whether weekend hours were excluded."},"includeSelfiePrs":{"type":"boolean","description":"Whether self-review PRs were included."},"defaultBranchOnly":{"type":"boolean","description":"Whether only default-branch commits/PRs were included."},"view":{"type":"string","description":"View type for githubFeatureVsMaintenance.","enum":["timeSeries","aggregate"]},"direction":{"type":"string","description":"Feedback direction. Applies to feedbackQuality and feedbackThemes metrics.","enum":["given","received"]},"groupBy":{"type":"string","description":"How to group chart series. Defaults to team. AI metrics support: jobLevel, timezone, aiTool, nonContributors. PagerDuty metrics support: service, escalationPolicy.","enum":["team","service","escalationPolicy","jobLevel","timezone","aiTool","nonContributors"]},"cohortMetric":{"type":"string","description":"Cohort metric used to classify users (aiCohortDistribution only).","enum":["dailyActiveUsage","spend","inputTokens","linesChanged"]},"cohortThreshold":{"type":"number","description":"Threshold value used to split High/Low AI cohorts (aiCohortDistribution only). Unit depends on cohortMetric: percentage of active days for 'dailyActiveUsage', USD cents for 'spend', token count for 'inputTokens', line count for 'linesChanged'."},"cohortLookbackWeeks":{"type":"number","description":"Number of lookback weeks used for cohort classification (aiCohortDistribution only)."},"individual":{"type":"boolean","description":"When true, return one series per team member instead of per team. Supported for meeting-hours calendar, PR cycle, and GitHub code review metrics only.","default":false},"countBy":{"type":"string","description":"Unit to count by. For issue tracker metrics (jiraTypeOfWork, jiraFeatureVsMaintenance, linearTypeOfWork, linearFeatureVsMaintenance): issues (default) or storyPoints. For GitHub feedback metrics (feedbackGiven, feedbackReceived, feedbackParticipationGap): comments (default) or reviews. For page disruption metrics (pagerdutyPageDisruptions, pagerdutyPageDisruptionsOoh): pages (default) or disruptedHours.","enum":["issues","storyPoints","comments","reviews","pages","disruptedHours"]},"priorities":{"description":"PagerDuty priority IDs the response was filtered to (PagerDuty metrics only).","type":"array","items":{"type":"string"}},"urgencies":{"type":"array","description":"Urgency levels the response was filtered to (PagerDuty metrics only).","items":{"type":"string","enum":["high","low"]}}}},"SeriesDto":{"type":"object","properties":{"id":{"type":"string","description":"Series identifier. For team series: team UUID. For cohort series: cohort name."},"name":{"type":"string","description":"Display name for the series."},"type":{"type":"string","description":"Series type.","enum":["team","organization","member","cohort"]},"dataPoints":{"description":"Ordered list of data points for this series.","type":"array","items":{"$ref":"#/components/schemas/DataPointDto"}}},"required":["id","name","type","dataPoints"]},"DataPointDto":{"type":"object","properties":{"startDate":{"type":"string","description":"Bucket start date (ISO 8601)."},"endDate":{"type":"string","description":"Bucket end date (ISO 8601)."},"value":{"type":"number","description":"Metric value. Omitted for comment metrics (commentsGiven, commentsReceived, commentsParticipationRatio) and when percentile data (p50/p75/p90/p95) is present."},"p50":{"type":"number","description":"50th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p75":{"type":"number","description":"75th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p90":{"type":"number","description":"90th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"p95":{"type":"number","description":"95th percentile value. Present when percentile data is available. Null indicates no data for this bucket.","nullable":true},"count":{"type":"number","description":"Number of data points considered in this bucket (e.g. PRs, commits, issues). Null indicates no data for this bucket.","nullable":true},"memberCount":{"type":"number","description":"Number of people considered in this bucket (team members in scope for the data point). Null indicates no data for this bucket.","nullable":true},"spend":{"type":"number","description":"Total AI spend in USD cents for this bucket. Present for aiIntensityOfUsage.","nullable":true},"inputTokens":{"type":"number","description":"Total input tokens consumed for this bucket. Present for aiIntensityOfUsage.","nullable":true},"linesChanged":{"type":"number","description":"Total lines of code accepted for this bucket. Present for aiIntensityOfUsage.","nullable":true},"total":{"type":"number","description":"Total (sum) value for this bucket. Null indicates no data for this bucket.","nullable":true},"label":{"type":"string","description":"Category label for aggregate view data points (e.g. 'Feature', 'Bug'). Only present for githubFeatureVsMaintenance and leadTime when view=aggregate."}},"required":["startDate","endDate"]}}}}
```

## How to generate an API key

1. From the [Settings > API Keys](https://app.multitudes.co/team-settings/api-keys) page, click "+ Generate New Key" on the top right corner of the page. This will pop-up a modal.

<figure><img src="/files/Fy5X531e1vXIOVZwm4gP" alt=""><figcaption></figcaption></figure>

1. In the modal, select "Organization" as your key type.
2. Select "Read" for Data. Once this is done, click "Create key".

<figure><img src="/files/2dFQYlPX9kEBt1jsDX0W" alt=""><figcaption></figcaption></figure>

3. After the key has been generated, copy it for use as the Bearer token when making API requests. The full key will only be shown once.
