# Conversation statistics

> This is a subset of the full specification, limited to the `conversation_statistics` schema.
>
> You can find the full specification here: /_bundle/docs/references/@2.15/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `conversation_statistics` schema.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
paths: {}
components:
  schemas:
    conversation_response_time:
      title: Conversation response time
      type: object
      description: Details of first response time of assigned team in seconds.
      properties:
        team_id:
          type: integer
          description: Id of the assigned team.
          example: 100
        team_name:
          type: string
          description: Name of the assigned Team, null if team does not exist, Unassigned if no team is assigned.
          example: Team One
        response_time:
          type: integer
          description: First response time of assigned team in seconds.
          example: 2310
    conversation_statistics:
      title: Conversation statistics
      type: object
      nullable: true
      description: A Statistics object containing all information required for reporting, with timestamps and calculated metrics.
      properties:
        type:
          type: string
          description: ''
          example: conversation_statistics
        time_to_assignment:
          type: integer
          description: Duration until last assignment before first admin reply. In seconds.
          example: 2310
        time_to_admin_reply:
          type: integer
          description: Duration until first admin reply. Subtracts out of business hours. In seconds.
          example: 2310
        time_to_first_close:
          type: integer
          description: Duration until conversation was closed first time. Subtracts out of business hours. In seconds.
          example: 2310
        time_to_last_close:
          type: integer
          description: Duration until conversation was closed last time. Subtracts out of business hours. In seconds.
          example: 2310
        median_time_to_reply:
          type: integer
          description: Median based on all admin replies after a contact reply. Subtracts out of business hours. In seconds.
          example: 2310
        first_contact_reply_at:
          type: integer
          format: date-time
          description: Time of first text conversation part from a contact.
          example: 1663597233
        first_assignment_at:
          type: integer
          format: date-time
          description: Time of first assignment after first_contact_reply_at.
          example: 1663597233
        first_admin_reply_at:
          type: integer
          format: date-time
          description: Time of first admin reply after first_contact_reply_at.
          example: 1663597233
        first_close_at:
          type: integer
          format: date-time
          description: Time of first close after first_contact_reply_at.
          example: 1663597233
        last_assignment_at:
          type: integer
          format: date-time
          description: Time of last assignment after first_contact_reply_at.
          example: 1663597233
        last_assignment_admin_reply_at:
          type: integer
          format: date-time
          description: Time of first admin reply since most recent assignment.
          example: 1663597233
        last_contact_reply_at:
          type: integer
          format: date-time
          description: Time of the last conversation part from a contact.
          example: 1663597233
        last_admin_reply_at:
          type: integer
          format: date-time
          description: Time of the last conversation part from an admin.
          example: 1663597233
        last_close_at:
          type: integer
          format: date-time
          description: Time of the last conversation close.
          example: 1663597233
        last_closed_by_id:
          type: string
          description: The last admin who closed the conversation. Returns a reference to an Admin object.
          example: c3po
        count_reopens:
          type: integer
          description: Number of reopens after first_contact_reply_at.
          example: 1
        count_assignments:
          type: integer
          description: Number of assignments after first_contact_reply_at.
          example: 1
        count_conversation_parts:
          type: integer
          description: Total number of conversation parts.
          example: 1
        assigned_team_first_response_time:
          type: array
          description: An array of conversation response time objects
          items:
            $ref: '#/components/schemas/conversation_response_time'
        assigned_team_first_response_time_in_office_hours:
          type: array
          description: An array of conversation response time objects within office hours
          items:
            $ref: '#/components/schemas/conversation_response_time'
        handling_time:
          type: integer
          description: Time from conversation assignment to conversation close in seconds.
          example: 2310
        adjusted_handling_time:
          type: integer
          nullable: true
          description: Adjusted handling time for conversation in seconds. This is the active handling time excluding idle periods when teammates are not actively working on the conversation.
          example: 1800
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
