> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usereplier.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get workspace performance

> Returns the dashboard's numbers for the workspace, or for one account with channel and account_id: DMs sent, interactions, people reached, link click rate and completion rate, each with the previous period of the same length, plus top automations, interactions by hour and where link clicks came from. Use days (7, 30, 60 or 90) or start_date and end_date.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/workspaces/{workspace_id}/performance
openapi: 3.1.0
info:
  title: Replier API
  version: '1'
servers:
  - url: https://api.usereplier.com
security:
  - apiKey: []
paths:
  /v1/workspaces/{workspace_id}/performance:
    get:
      tags:
        - Workspaces
      summary: Get workspace performance
      description: >-
        Returns the dashboard's numbers for the workspace, or for one account
        with channel and account_id: DMs sent, interactions, people reached,
        link click rate and completion rate, each with the previous period of
        the same length, plus top automations, interactions by hour and where
        link clicks came from. Use days (7, 30, 60 or 90) or start_date and
        end_date.
      operationId: get_workspace_performance
      parameters:
        - name: workspace_id
          in: path
          required: true
          description: Workspace ID returned by `GET /v1/workspaces`
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        - name: days
          in: query
          required: false
          description: >-
            Reporting window in days, ending now. Ignored when start_date and
            end_date are given.
          schema:
            default: 30
            anyOf:
              - type: number
                const: 7
              - type: number
                const: 30
              - type: number
                const: 60
              - type: number
                const: 90
        - name: start_date
          in: query
          required: false
          description: First calendar day in timezone, YYYY-MM-DD. Give with end_date.
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: end_date
          in: query
          required: false
          description: >-
            Last calendar day in timezone, YYYY-MM-DD, at most 365 days from
            start_date. Today counts up to now.
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: channel
          in: query
          required: false
          schema:
            type: string
            enum:
              - instagram
              - facebook
        - name: account_id
          in: query
          required: false
          schema:
            type: string
            minLength: 1
        - name: timezone
          in: query
          required: false
          description: IANA time zone for start_date, end_date and the hourly breakdowns.
          schema:
            default: UTC
            type: string
            minLength: 1
            maxLength: 64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  workspace:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      name:
                        type: string
                      kind:
                        type: string
                        enum:
                          - personal
                          - agency
                      role:
                        type: string
                        enum:
                          - owner
                          - admin
                          - member
                    required:
                      - id
                      - name
                      - kind
                      - role
                  account:
                    description: >-
                      The connected account the numbers are limited to; null for
                      the whole workspace.
                    anyOf:
                      - type: object
                        properties:
                          channel:
                            type: string
                            enum:
                              - instagram
                              - facebook
                          account_id:
                            type: string
                          name:
                            type: string
                        required:
                          - channel
                          - account_id
                          - name
                      - type: 'null'
                  period:
                    type: object
                    properties:
                      days:
                        type: integer
                        minimum: 1
                        maximum: 365
                      start:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                      end:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                    required:
                      - days
                      - start
                      - end
                  timezone:
                    type: string
                  messages_sent:
                    description: >-
                      The dashboard's DMs sent: messages sent in the period,
                      each flow message counted.
                    type: object
                    properties:
                      value:
                        type: number
                        minimum: 0
                      previous:
                        description: >-
                          The same metric for the equally long period just
                          before.
                        type: number
                        minimum: 0
                    required:
                      - value
                      - previous
                  interaction_metrics:
                    description: >-
                      The numbers the Replier dashboard shows for this scope,
                      counted from interactions that started in the period.
                    type: object
                    properties:
                      previous_start:
                        description: Start of the previous period; it ends at period.start.
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                      interactions:
                        description: >-
                          Runs whose first message, a gate prompt or the DM, was
                          delivered. A multi-message flow run counts once.
                        type: object
                        properties:
                          value:
                            type: number
                            minimum: 0
                          previous:
                            description: >-
                              The same metric for the equally long period just
                              before.
                            type: number
                            minimum: 0
                        required:
                          - value
                          - previous
                      people_reached:
                        description: >-
                          Distinct recipients of those interactions; people
                          whose run failed or was skipped before a message
                          reached them are not counted. Recipient IDs are scoped
                          per channel account, so one person on Instagram and
                          Facebook counts twice.
                        type: object
                        properties:
                          value:
                            type: number
                            minimum: 0
                          previous:
                            description: >-
                              The same metric for the equally long period just
                              before.
                            type: number
                            minimum: 0
                        required:
                          - value
                          - previous
                      link_click_rate:
                        description: >-
                          Share (0-1) of interactions that sent a link in which
                          the recipient clicked one.
                        type: object
                        properties:
                          value:
                            type: number
                            minimum: 0
                          previous:
                            description: >-
                              The same metric for the equally long period just
                              before.
                            type: number
                            minimum: 0
                        required:
                          - value
                          - previous
                      link_interactions:
                        description: >-
                          Interactions that sent a link. When it is 0,
                          link_click_rate has nothing to measure; it is not a
                          poor result.
                        type: object
                        properties:
                          value:
                            type: number
                            minimum: 0
                          previous:
                            description: >-
                              The same metric for the equally long period just
                              before.
                            type: number
                            minimum: 0
                        required:
                          - value
                          - previous
                      completion_rate:
                        description: >-
                          Share (0-1) of interactions whose main DM was sent.
                          The rest are waiting at a gate or stopped before the
                          DM.
                        type: object
                        properties:
                          value:
                            type: number
                            minimum: 0
                          previous:
                            description: >-
                              The same metric for the equally long period just
                              before.
                            type: number
                            minimum: 0
                        required:
                          - value
                          - previous
                    required:
                      - previous_start
                      - interactions
                      - people_reached
                      - link_click_rate
                      - link_interactions
                      - completion_rate
                  top_automations:
                    description: >-
                      Up to 5 automations with the most interactions in the
                      period, as on the dashboard.
                    type: array
                    items:
                      type: object
                      properties:
                        automation_id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        name:
                          type: string
                        interactions:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        messages_sent:
                          description: >-
                            Messages sent in those interactions, each flow
                            message counted.
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        link_clicks:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                        - automation_id
                        - name
                        - interactions
                        - messages_sent
                        - link_clicks
                  interactions_by_hour:
                    description: >-
                      Interactions started in each hour of the day in timezone,
                      from 00:00.
                    minItems: 24
                    maxItems: 24
                    type: array
                    items:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  click_locations:
                    description: >-
                      Top 5 countries and cities by link clicks in the period,
                      located by Cloudflare from each click. Clicks without a
                      location are left out.
                    type: object
                    properties:
                      countries:
                        type: array
                        items:
                          type: object
                          properties:
                            country:
                              description: ISO 3166-1 alpha-2 country code.
                              type: string
                            clicks:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                          required:
                            - country
                            - clicks
                      cities:
                        type: array
                        items:
                          type: object
                          properties:
                            country:
                              type: string
                            city:
                              type: string
                            clicks:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                          required:
                            - country
                            - city
                            - clicks
                    required:
                      - countries
                      - cities
                required:
                  - workspace
                  - account
                  - period
                  - timezone
                  - messages_sent
                  - interaction_metrics
                  - top_automations
                  - interactions_by_hour
                  - click_locations
        default:
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: Refused
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    description: >-
                      Why the request was refused, such as AUTOMATION_NOT_FOUND
                      or VERSION_CONFLICT. Other fields beside it give details.
                  message:
                    type: string
                    description: The same reason, in English.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: A Replier API key (rpl_...).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.