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

# Get webhook analytics by ID

> Get analytics for a specific webhook by ID



## OpenAPI

````yaml get /analytics/webhooks/{id}
openapi: 3.1.0
info:
  title: BitGPT 402pay API
  description: Full description of private and dev-availble API endpoints
  version: 1.0.0
  termsOfService: https://bitgpt.xyz/terms
  contact:
    name: API Support
    url: https://help.bitgpt.xyz
    email: support@bitgpt.xyz
servers:
  - url: https://api.bitgpt.xyz
    description: Production API server
security: []
tags:
  - name: Payments
    description: Invoice and payment management endpoints
  - name: Products
    description: Product management endpoints
  - name: dev-api
    description: Developer API endpoints
externalDocs:
  description: Full BitGPT 402pay API documentation
  url: https://docs.bitgpt.xyz
paths:
  /analytics/webhooks/{id}:
    get:
      tags:
        - Webhooks
        - dev-api
      summary: Get webhook analytics by ID
      description: Get analytics for a specific webhook by ID
      operationId: getWebhookAnalyticsById
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook ID
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/analyticsSpecificDeveloperWebhookResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
      security:
        - BearerAuth: []
          ApiKeyAuth: []
components:
  responses:
    '400':
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                enum:
                  - 400
                  - 401
                  - 403
                  - 404
                description: Status code of the response
              data:
                type:
                  - object
                  - 'null'
                description: Response data containing the requested object
              error:
                type:
                  - string
                  - 'null'
                examples:
                  - Invalid email address
                description: Error message of the response, human readable
              message:
                type: 'null'
              env:
                type: string
                enum:
                  - development
                  - production
                description: API environment
              log:
                type:
                  - string
                  - object
                  - 'null'
                examples:
                  - request_id: req_1234567890
                  - Some pertinent log message
                description: Useful informaiton, not always present, to debug the response
              validator:
                type:
                  - object
                  - 'null'
                examples:
                  - email: Invalid email address
                    password: Password is required
                description: >-
                  Validator response object, each key is the field name and
                  value is the error message
              support_id:
                type:
                  - string
                  - 'null'
                format: uuid
                examples:
                  - support_uuidv7-something-else
                description: >-
                  Support ID linked to the response, used to identify it when
                  talking with our team
            required:
              - status
              - error
              - message
              - env
              - log
              - validator
              - support_id
    '401':
      description: Access token is missing or invalid
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                      - 401
                      - 403
                      - 404
                    description: Status code of the response
                  data:
                    type:
                      - object
                      - 'null'
                    description: Response data containing the requested object
                  error:
                    type:
                      - string
                      - 'null'
                    examples:
                      - Invalid email address
                    description: Error message of the response, human readable
                  message:
                    type: 'null'
                  env:
                    type: string
                    enum:
                      - development
                      - production
                    description: API environment
                  log:
                    type:
                      - string
                      - object
                      - 'null'
                    examples:
                      - request_id: req_1234567890
                      - Some pertinent log message
                    description: >-
                      Useful informaiton, not always present, to debug the
                      response
                  validator:
                    type:
                      - object
                      - 'null'
                    examples:
                      - email: Invalid email address
                        password: Password is required
                    description: >-
                      Validator response object, each key is the field name and
                      value is the error message
                  support_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    examples:
                      - support_uuidv7-something-else
                    description: >-
                      Support ID linked to the response, used to identify it
                      when talking with our team
                required:
                  - status
                  - error
                  - message
                  - env
                  - log
                  - validator
                  - support_id
              - properties:
                  status:
                    type: integer
                    enum:
                      - 401
    '403':
      description: You do not have the required permissions to access this resource
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                      - 401
                      - 403
                      - 404
                    description: Status code of the response
                  data:
                    type:
                      - object
                      - 'null'
                    description: Response data containing the requested object
                  error:
                    type:
                      - string
                      - 'null'
                    examples:
                      - Invalid email address
                    description: Error message of the response, human readable
                  message:
                    type: 'null'
                  env:
                    type: string
                    enum:
                      - development
                      - production
                    description: API environment
                  log:
                    type:
                      - string
                      - object
                      - 'null'
                    examples:
                      - request_id: req_1234567890
                      - Some pertinent log message
                    description: >-
                      Useful informaiton, not always present, to debug the
                      response
                  validator:
                    type:
                      - object
                      - 'null'
                    examples:
                      - email: Invalid email address
                        password: Password is required
                    description: >-
                      Validator response object, each key is the field name and
                      value is the error message
                  support_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    examples:
                      - support_uuidv7-something-else
                    description: >-
                      Support ID linked to the response, used to identify it
                      when talking with our team
                required:
                  - status
                  - error
                  - message
                  - env
                  - log
                  - validator
                  - support_id
              - properties:
                  status:
                    type: integer
                    enum:
                      - 403
    analyticsSpecificDeveloperWebhookResponse:
      description: Successful webhook analytics for specific webhook response
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Response200'
              - $ref: '#/components/schemas/analyticsSpecificDeveloperWebhookResponse'
  schemas:
    Response200:
      type: object
      properties:
        status:
          type: integer
          enum:
            - 200
            - 201
            - 202
          description: Status code of the response
        data:
          type:
            - object
            - array
            - 'null'
          description: Response data containing the requested object
        error:
          type:
            - string
            - 'null'
          examples:
            - Invalid email address
          description: Error message of the response, human readable
        message:
          type:
            - string
            - 'null'
          examples:
            - Resource created successfully
          description: Message of the response, human readable
        env:
          type: string
          enum:
            - development
            - production
          description: API environment
        log:
          type:
            - string
            - object
            - 'null'
          examples:
            - request_id: req_1234567890
            - Some pertinent log message
          description: Useful informaiton, not always present, to debug the response
        validator:
          type:
            - object
            - 'null'
          examples:
            - email: Invalid email address
              password: Password is required
          description: >-
            Validator response object, each key is the field name and value is
            the error message
        support_id:
          type:
            - string
            - 'null'
          format: uuid
          examples:
            - support_uuidv7-something-else
          description: >-
            Support ID linked to the response, used to identify it when talking
            with our team
      required:
        - status
        - data
        - message
        - env
      examples:
        - status: 200
          data:
            id: '123'
          error: null
          log: null
          validator: null
          support_id: null
          message: Resource created successfully
          env: development
    analyticsSpecificDeveloperWebhookResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            day_metrics:
              $ref: '#/components/schemas/webhookDayMetrics'
            last_events:
              type:
                - array
                - object
              description: Last 10 webhook events
              items:
                $ref: '#/components/schemas/developersWebhookQueue'
            top_events:
              type:
                - array
                - object
                - 'null'
              description: Top events by count for the last 24 hours
              items:
                type: object
                properties:
                  event:
                    type: string
                    description: Event name
                  count:
                    type: integer
                    description: Number of occurrences
            hourly_metrics:
              description: Hourly metrics for the last 24 hours
              type:
                - array
                - 'null'
              items:
                $ref: '#/components/schemas/webhookHourlyMetrics'
            top_failed_urls:
              type:
                - array
                - object
                - 'null'
              description: Top 5 URLs with failed deliveries
              items:
                type: object
                properties:
                  url:
                    type: string
                    description: Webhook URL
                  count:
                    type: integer
                    description: Number of failed deliveries
          required:
            - day_metrics
            - last_events
            - top_events
            - hourly_metrics
            - top_failed_urls
      required:
        - data
      examples:
        - data:
            day_metrics:
              total: 3
              success: 1
              failed: 2
              pending: 3
              retry_rate_pct: 33.33
              avg_delay_ms: 6.33
            last_events:
              - id: '125'
                webhook_id: webhook_0197bc00-48b8-7f8e-a84e-7bf59dea2563
                organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
                url: https://url.com
                event: api_key.updated
                resource_id: '1'
                payload: null
                response_status: 404
                response_body: '{"body": "123"}'
                error:
                  error: '123'
                retries: 0
                created_at: '2025-07-01 23:26:30'
                updated_at: '2025-07-01 23:35:57'
                first_sent_at: null
                delay_ms: 5
                done: 0
              - id: '124'
                webhook_id: webhook_0197bc00-48b8-7f8e-a84e-7bf59dea2563
                organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
                url: https://url.com
                event: api_key.updated
                resource_id: '1'
                payload:
                  name: Ho
                  description: Hu
                response_status: 300
                response_body: '{"body": "123"}'
                error:
                  error: '123'
                retries: 0
                created_at: '2025-07-01 17:36:19'
                updated_at: '2025-07-01 23:35:26'
                first_sent_at: null
                delay_ms: 10
                done: 0
              - id: '123'
                webhook_id: webhook_0197bc00-48b8-7f8e-a84e-7bf59dea2563
                organization_id: org_0196b0e9-11d8-7f26-b1d2-bd47054e4827
                url: https://url.com
                event: api_key.created
                resource_id: '1'
                payload: null
                response_status: 200
                response_body: null
                error: null
                retries: 1
                created_at: '2025-07-01 17:36:19'
                updated_at: '2025-07-01 23:35:11'
                first_sent_at: null
                delay_ms: 4
                done: 0
            day_top_events:
              event: api_key.updated
              count: 2
            day_hourly_metrics:
              hour: '2025-07-01 17:00:00'
              count: 2
    webhookDayMetrics:
      type: object
      properties:
        webhook_id:
          type: string
          description: Unique identifier for the webhook
        total:
          type: integer
          description: Total number of webhook deliveries
        success:
          type: integer
          description: Number of successful webhook deliveries
        failed:
          type: integer
          description: Number of failed webhook deliveries
        pending:
          type: integer
          description: Number of pending webhook deliveries
        retry_rate_pct:
          type: number
          description: Average number of retries per webhook delivery
        avg_delay_ms:
          type: number
          description: Average delay in seconds for webhook deliveries
    developersWebhookQueue:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the webhook queue item
        organization_id:
          type: string
          description: Organization ID that owns this webhook queue item
        url:
          type: string
          format: uri
          description: URL where webhook event will be sent
        webhook_id:
          type: string
          description: ID of the webhook this queue item belongs to
        event:
          type: string
          description: Event type that triggered this webhook
        resource_id:
          type: string
          description: ID of the resource related to this event
        retries:
          type: integer
          description: Number of retry attempts made for this webhook event
        done:
          type: integer
          description: >-
            Flag indicating if the webhook event has been successfully processed
            (1) or not (0)
        is_simulator:
          type: integer
          description: >-
            Flag indicating if this webhook event is for a simulator (1) or not
            (0)
        created_at:
          type: string
          format: mysql-date-time
          examples:
            - '2025-06-29 16:03:44'
          description: Timestamp when the webhook queue item was created
        updated_at:
          type:
            - string
            - 'null'
          format: mysql-date-time
          examples:
            - '2025-06-29 16:03:44'
          description: Timestamp when the webhook queue item was last updated
        payload:
          type:
            - object
            - 'null'
          description: Payload data to be sent with the webhook event
        response_status:
          type:
            - integer
            - 'null'
          description: HTTP response status code from the webhook delivery
        response_body:
          type:
            - string
            - 'null'
          description: Response body from the webhook delivery, if any
        error:
          type:
            - object
            - 'null'
          description: Error message if the webhook delivery failed
        first_sent_at:
          type:
            - string
            - 'null'
          format: mysql-date-time
          description: Timestamp when the webhook event was first sent
        delay_ms:
          type:
            - integer
            - 'null'
          description: Delay in seconds before the webhook event is sent
      required:
        - id
        - organization_id
        - url
        - webhook_id
        - event
        - resource_id
    webhookHourlyMetrics:
      type: object
      description: Hourly metrics
      properties:
        webhook_id:
          type: string
          description: ID of the webhook for which metrics are being reported
        hour:
          type: string
          description: Hour in format YYYY-MM-DD HH:00:00
        total:
          type: integer
          description: Total number of webhook deliveries in this hour
        success:
          type: integer
          description: Number of successful webhook deliveries in this hour
        failed:
          type: integer
          description: Number of failed webhook deliveries in this hour
        pending:
          type: integer
          description: Number of pending webhook deliveries in this hour
      required:
        - hour
        - total
        - success
        - failed
        - pending
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Send your access token as header Authorization: Bearer {accessToken}'
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your API key that starts with sk_live or sk_test. You can create yours
        at go.bitgpt.xyz/api-keys.

````