> ## Documentation Index
> Fetch the complete documentation index at: https://onextel-09023014.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Campaign report

> Funnel, rates, timings, clicks and failure reasons for a campaign.

* **`timing`**: average and median seconds to deliver, read and click, measured from when
  Truecaller accepted each message.
* **`clicks.by_button`**: taps per button and on links in the text. Taps on link buttons and quick
  replies are reported by Truecaller; links are counted through a short redirect when
  `track_links` is on.
* **`categories`**: failed and skipped messages grouped by reason. See
  [Errors](https://onextel-09023014.mintlify.site/api-reference/truecaller/errors.md).


## OpenAPI

````yaml api-reference/truecaller/openapi.yaml GET /v1/campaigns/{id}/report
openapi: 3.1.0
info:
  title: OneXtel Truecaller Business Messaging API
  version: 1.0.0
  description: >
    Send verified business messages to Truecaller users: single messages,
    templates with

    personalisation, images, files and buttons, and campaigns to contact lists.


    Every request carries a workspace API key in the `x-api-key` header. Create
    one in the

    Truecaller campaigns portal under **Developers → API keys**.


    Errors are JSON with a single `error` string (and `details` for validation
    errors):


    ```json

    { "error": "invalid phone number" }

    ```
servers:
  - url: https://truecaller.udchowdhury.me
    description: Production
security:
  - apiKey: []
tags:
  - name: Messages
    description: Send one message and read its status.
  - name: Templates
    description: Reusable messages with variables, media and buttons.
  - name: Media
    description: Upload files to attach to templates.
  - name: Contact lists
    description: Audiences for campaigns.
  - name: Campaigns
    description: Send a template to a whole contact list, now or later.
  - name: Senders
    description: The verified business profiles your workspace sends from.
paths:
  /v1/campaigns/{id}/report:
    get:
      tags:
        - Campaigns
      summary: Campaign report
      description: >-
        Funnel, rates, timings, clicks per button and failure reasons grouped by
        category.
      operationId: campaignReport
      parameters:
        - $ref: '#/components/parameters/Id'
      responses:
        '200':
          description: The report.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Report'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    Id:
      in: path
      name: id
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Report:
      type: object
      properties:
        campaign:
          $ref: '#/components/schemas/Campaign'
        funnel:
          type: array
          items:
            type: object
            properties:
              stage:
                type: string
              count:
                type: integer
              bad:
                type: boolean
        rates:
          type: object
          properties:
            delivery_rate:
              type: number
            read_rate:
              type: number
            click_rate:
              type:
                - number
                - 'null'
            failure_rate:
              type: number
            blocked_rate:
              type: number
        timing:
          type: object
          description: Seconds from Truecaller accepting each message.
          properties:
            avg_deliver_s:
              type:
                - number
                - 'null'
            median_deliver_s:
              type:
                - number
                - 'null'
            avg_read_s:
              type:
                - number
                - 'null'
            median_read_s:
              type:
                - number
                - 'null'
            avg_click_s:
              type:
                - number
                - 'null'
            median_click_s:
              type:
                - number
                - 'null'
        clicks:
          type: object
          properties:
            tracked:
              type: boolean
            unique:
              type: integer
            total:
              type: integer
            by_button:
              type: array
              items:
                type: object
                properties:
                  label:
                    type: string
                  type:
                    type: string
                    enum:
                      - link
                      - reply
                      - text
                  people:
                    type: integer
                  taps:
                    type: integer
        categories:
          type: array
          description: Failed and skipped messages grouped by reason.
          items:
            type: object
            properties:
              key:
                type: string
                example: not_on_truecaller
              label:
                type: string
                example: Not on Truecaller
              count:
                type: integer
    Campaign:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        status:
          type: string
          enum:
            - draft
            - scheduled
            - running
            - completed
            - cancelled
        template_id:
          type: string
          format: uuid
        template_name:
          type: string
        list_id:
          type: string
          format: uuid
        list_name:
          type: string
        sender_id:
          type: string
        scheduled_at:
          type:
            - string
            - 'null'
          format: date-time
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        note:
          type:
            - string
            - 'null'
          description: Why a running campaign is waiting
          e.g. a daily sender limit.: null
        recipients:
          type: integer
        processed:
          type: integer
        sent:
          type: integer
        delivered:
          type: integer
        read:
          type: integer
        failed:
          type: integer
        blocked:
          type: integer
        queued:
          type: integer
    Error:
      type: object
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: object
  responses:
    NotFound:
      description: Not found in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: not found
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Workspace API key from **Developers → API keys**. It starts with
        `tc_live_`.

````

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