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

# Read report

> Reads one analytics report. The cheap way to poll a single pending report:
it returns `reportStatus` and, once generation lands, the `resultURL` of the
printed PDF, resolved from talqui-services-storage per request.

Scoped to the tenant in the URL — a report belonging to another tenant reads
as not found.



## OpenAPI

````yaml /api/services-api.yaml get /v1/tenants/{tenantID}/analytics/reports/{reportID}
openapi: 3.0.3
info:
  description: >-
    Talqui is an omnichannel customer service platform that unifies
    conversations from WhatsApp, Instagram, Telegram, and many other channels
    into a single attendant panel, alongside a broader ecosystem of plugins and
    integrations. This API gives developers programmatic access to Talqui's
    services layer, exposing the operations needed to read and manage tenants,
    conversations, plugins, and related resources that power that platform.


    Authentication is available on behalf of an Operator (the default for this
    API), a Plugin Connection, or a Plugin — see the [Talqui authentication
    guide](https://docs.talqui.chat/guides/introduction/authentication/) for how
    each token is obtained and when to use it.


    Need help or have questions not covered here? Reach out to
    support@talqui.com.
  license:
    name: ISC
    url: https://opensource.org/license/isc-license-txt
  title: Talqui - Services API
  version: 0.65.0
servers:
  - description: Production
    url: https://services-api.talqui.chat
security: []
tags:
  - name: Tenants
  - name: Settings
  - name: Analytics
  - name: Campaigns
  - name: Campaigns models
  - name: Contacts
  - name: Handoff links
  - name: Inboxes
  - name: Messages
  - name: Notifications
  - name: Sessions
  - name: Operators
  - name: Plugins
  - name: Setup
  - name: Uploads
paths:
  /v1/tenants/{tenantID}/analytics/reports/{reportID}:
    get:
      tags:
        - Analytics
      summary: Read report
      description: >-
        Reads one analytics report. The cheap way to poll a single pending
        report:

        it returns `reportStatus` and, once generation lands, the `resultURL` of
        the

        printed PDF, resolved from talqui-services-storage per request.


        Scoped to the tenant in the URL — a report belonging to another tenant
        reads

        as not found.
      operationId: ReadReportController
      parameters:
        - in: path
          name: tenantID
          required: true
          schema:
            type: string
        - in: path
          name: reportID
          required: true
          schema:
            description: Identifier of the report to read.
            minLength: 1
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  report:
                    additionalProperties: false
                    description: The requested report.
                    properties:
                      __reportErrorCode:
                        description: Failure code, for a failed report.
                        nullable: true
                        type: string
                      __reportErrorMessage:
                        description: Failure reason, for a failed report.
                        nullable: true
                        type: string
                      completedAt:
                        description: When the PDF was stored.
                        format: date-time
                        nullable: true
                        type: string
                      createdAt:
                        description: When the report was requested.
                        format: date-time
                        type: string
                      createdBy:
                        description: Operator who requested the report.
                        nullable: true
                        type: string
                      email:
                        description: Address the completion e-mail was sent to.
                        nullable: true
                        type: string
                      failedAt:
                        description: When generation failed, if it did.
                        format: date-time
                        nullable: true
                        type: string
                      processingStartedAt:
                        description: When the worker claimed the job.
                        format: date-time
                        nullable: true
                        type: string
                      reportID:
                        description: Identifier of the report.
                        type: string
                      reportSpec:
                        additionalProperties: false
                        description: What the report was requested with.
                        properties:
                          groups:
                            description: >-
                              Report groups the report covers, in printed
                              section order.
                            items:
                              type: string
                            type: array
                          namespaces:
                            description: >-
                              Analytics namespaces those groups expanded to, at
                              request time.
                            items:
                              type: string
                            type: array
                          query:
                            additionalProperties: false
                            description: >-
                              The shared analytics window every namespace in the
                              report was rendered against.
                            properties:
                              filterBag:
                                description: >-
                                  Structured filter clauses applied to every
                                  namespace.
                                items:
                                  additionalProperties: false
                                  properties:
                                    criterion:
                                      description: Field the clause tests.
                                      type: string
                                    operator:
                                      description: Comparison applied.
                                      enum:
                                        - eq
                                        - gt
                                        - lt
                                        - ha
                                        - nh
                                        - sw
                                        - ew
                                        - ct
                                      type: string
                                    query:
                                      description: Values compared against.
                                      items:
                                        anyOf:
                                          - type: string
                                          - type: number
                                          - type: boolean
                                      type: array
                                    schema:
                                      description: Which entity the clause filters on.
                                      enum:
                                        - session
                                        - contact
                                        - procedure
                                      type: string
                                  required:
                                    - schema
                                    - criterion
                                    - operator
                                    - query
                                  type: object
                                type: array
                              filters:
                                description: >-
                                  Dimension whitelist, where the namespace
                                  supports one.
                                items:
                                  type: string
                                type: array
                              from:
                                description: Start of the reported window.
                                format: date-time
                                type: string
                              granularity:
                                description: Bucket size of the series.
                                enum:
                                  - hour
                                  - day
                                  - week
                                  - month
                                  - year
                                type: string
                              tenantID:
                                description: Tenant the query is scoped to.
                                type: string
                              timezone:
                                description: IANA timezone the days were bucketed on.
                                type: string
                              to:
                                description: End of the reported window.
                                format: date-time
                                type: string
                            required:
                              - tenantID
                              - from
                              - to
                              - granularity
                              - timezone
                              - filters
                              - filterBag
                            type: object
                        required:
                          - groups
                          - namespaces
                          - query
                        type: object
                      reportStatus:
                        description: Where the report is in its lifecycle.
                        enum:
                          - pending
                          - processing
                          - failed
                          - completed
                        type: string
                      resultURL:
                        description: >-
                          Download URL of the printed PDF, resolved per request;
                          null until the report completes.
                        nullable: true
                        type: string
                      tenantID:
                        description: Tenant the report belongs to.
                        type: string
                      updatedAt:
                        description: Last write to the record.
                        format: date-time
                        nullable: true
                        type: string
                    required:
                      - reportID
                      - tenantID
                      - reportSpec
                      - reportStatus
                      - resultURL
                      - createdBy
                      - email
                      - createdAt
                      - updatedAt
                      - processingStartedAt
                      - completedAt
                      - failedAt
                      - __reportErrorMessage
                      - __reportErrorCode
                    type: object
                required:
                  - report
                type: object
          description: Response for status 200.
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/MissingTenantIDError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            MissingTenantIDError (error_code 1001): tenantID absent from the
            URL.
        '401':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/UnauthorizedError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: 'UnauthorizedError (error_code 1003): missing/invalid operator token.'
        '403':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/ForbiddenError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: 'ForbiddenError (error_code 1004): operator token rejected upstream.'
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/ReportNotFoundError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            ReportNotFoundError (error_code 1500): no such report for this
            tenant.
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/UnknownError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            UnknownError (error_code 5999): Unexpected internal error not
            otherwise documented for this endpoint.
      security:
        - operatorAuth: []
components:
  schemas:
    MissingTenantIDError:
      additionalProperties: false
      properties:
        error:
          enum:
            - MissingTenantIDError
          type: string
        error_code:
          enum:
            - 1001
          type: number
        message:
          example: tenantID is required.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    UnauthorizedError:
      additionalProperties: false
      properties:
        error:
          enum:
            - UnauthorizedError
          type: string
        error_code:
          enum:
            - 1003
          type: number
        message:
          example: You are not authorized to perform this request.
          type: string
        statusCode:
          enum:
            - 401
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    ForbiddenError:
      additionalProperties: false
      properties:
        error:
          enum:
            - ForbiddenError
          type: string
        error_code:
          enum:
            - 1004
          type: number
        message:
          example: You do not have access to this resource.
          type: string
        statusCode:
          enum:
            - 403
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    ReportNotFoundError:
      additionalProperties: false
      properties:
        error:
          enum:
            - ReportNotFoundError
          type: string
        error_code:
          enum:
            - 1500
          type: number
        message:
          example: Report not found.
          type: string
        statusCode:
          enum:
            - 404
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    UnknownError:
      additionalProperties: false
      properties:
        error:
          enum:
            - UnknownError
          type: string
        error_code:
          enum:
            - 5999
          type: number
        message:
          example: For some unknown reason your request has not succeeded.
          type: string
        statusCode:
          enum:
            - 500
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
  securitySchemes:
    operatorAuth:
      bearerFormat: JWT
      description: >-
        Behalf of an Operator (default). A JWT issued by Talqui Core when an
        operator signs in, scoped to every tenant that operator belongs to. Send
        as `Authorization: Bearer <jwt-token>`.
      scheme: bearer
      type: http

````

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