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

# Delivery Stats

> Return aggregated delivery outcome counts for a webhook over a time window, broken down by status and by event name. When `since` is omitted, the window defaults to the last 7 days.

**Authentication**: X-API-Key header required



## OpenAPI

````yaml /openapi.json get /v1/webhooks/{webhook_id}/stats
openapi: 3.1.0
info:
  title: Briq API
  description: Karibu Briq API Documentation
  version: '0.8'
servers:
  - url: https://karibu.briq.tz
    description: Production
  - url: https://pre-release.karibu.briq.tz
    description: Pre-release
  - url: http://karibu.briq.tz
    description: LocalPass
security: []
paths:
  /v1/webhooks/{webhook_id}/stats:
    get:
      tags:
        - Karibu-Webhooks
      summary: Delivery Stats
      description: >-
        Return aggregated delivery outcome counts for a webhook over a time
        window, broken down by status and by event name. When `since` is
        omitted, the window defaults to the last 7 days.


        **Authentication**: X-API-Key header required
      operationId: webhook_delivery_stats_v1_webhooks__webhook_id__stats_get
      parameters:
        - name: webhook_id
          in: path
          required: true
          schema:
            type: string
            title: Webhook Id
        - name: since
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Since
          description: Start of the stats window. Defaults to 7 days ago.
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookStatsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WebhookStatsResponse:
      properties:
        webhook_id:
          type: string
          title: Webhook Id
        since:
          type: string
          format: date-time
          title: Since
          description: Start of the stats window (UTC).
        total:
          type: integer
          title: Total
          description: Total delivery attempts in the window.
        by_status:
          type: object
          additionalProperties:
            type: integer
          title: By Status
          description: Count per delivery status.
        by_event:
          type: object
          additionalProperties:
            type: integer
          title: By Event
          description: Count per event name.
      type: object
      required:
        - webhook_id
        - since
        - total
        - by_status
        - by_event
      title: WebhookStatsResponse
      description: Aggregated delivery outcome counts for a webhook.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````