---
title: "Create a new analytics report"
method: POST
path: "/analytics/reports"
tags: ["Analytics"]
---

# Create a new analytics report

`POST /analytics/reports`

Create a new analytics report for a set of metrics over a specific time span. Different filters (e.g. Inbox v Tag v Teammates) will be joined with AND logic, but the IDs within a filter will be joined with OR logic (e.g. Inbox A or Inbox B, Tag A or Tag B).
The report will be executed asynchronously. The response will include a link that can be used to retrieve the
report status & result. Refer to the [Analytics](https://dev.frontapp.com/reference/analytics) topic for details about specific metrics.


Required scope: `analytics:read`

## Request body

- AnalyticsReportRequest
  - `start` number, required — Start time of the data to include in the export (seconds since 1970-01-01T00:00:00+00). Will be rounded down to the start of the day.
  - `end` number, required — End time of the data to include in the export (seconds since 1970-01-01T00:00:00+00). Will be rounded up to the end of the day.
  - `timezone` string — [IANA name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the timezone to format the dates with. If omitted, the export will use Etc/UTC.
  - `filters` union — Resources to compute the analytics for. Defaults to all.
    - TagIds
      - `tag_ids` ResourceID[], required
    - TeammateIds
      - `teammate_ids` ResourceID[], required
    - ChannelIds
      - `channel_ids` ResourceID[], required
    - InboxIds
      - `inbox_ids` ResourceID[], required
    - TeamIds
      - `team_ids` ResourceID[], required
    - AccountIds
      - `account_ids` ResourceID[], required
  - `metrics` AnalyticsMetricId[], required — List of the metrics required.

## Response `201`

An analytics report.

- AnalyticsReportResponse
  - `_links` object, required
    - `self` string — Link to analytics job.
  - `uid` string, required — The UID of the analytics report
  - `status` 'running' | 'done' | 'failed', required — Status of the report.
  - `progress` integer, required — Number ranging from 0 to 100 corresponding to the percentage of the analytics processed.
  - `metrics` AnalyticsScalar[], required — The metrics computed for the report.
    - `id` 'avg_csat_survey_response' | 'avg_first_response_time' | 'avg_handle_time' | 'avg_replies_to_resolution' | 'avg_resolution_time' | 'avg_response_time' | 'avg_sla_breach_time' | 'avg_total_reply_time' | 'new_segments_count' | 'num_active_segments_full' | 'num_archived_segments' | 'num_archived_segments_with_reply' | 'num_csat_survey_response' | 'num_messages_received' | 'num_messages_sent' | 'num_sla_breach' | 'pct_csat_survey_satisfaction' | 'pct_resolved_on_first_reply' | 'pct_tagged_conversations' | 'num_closed_segments' | 'num_open_segments_start' | 'num_open_segments_end' | 'num_resolved_segments' | 'num_unresolved_active_segments' | 'num_workload_segments', required
    - `type` 'number' | 'percentage' | 'string' | 'duration' | 'resource', required
    - `value` union, required — The value of a scalar metric.
      - integer
      - string
      - object
        - `label` string
        - `resource` object
          - `id` string, required
          - `_links` object, required
            - `self` string — Link to a resource.

---

[API](https://skmtc.net/frontapp/apis/core-api.md) · [All operations](https://skmtc.net/frontapp/apis/core-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/frontapp/core-api/revisions/76d1eaa2d0eb/schema)
