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

# Get a webhook endpoint's delivery stats

> Deliveries created and attempts made between `since` and `until` (default: the last 24 hours), in total, in `hour` or `day` steps (at most 200), and by event type. The error rate is `failed_attempts / attempts`.



## OpenAPI

````yaml /api-reference/openapi.json get /webhook-endpoints/{id}/stats
openapi: 3.1.0
info:
  title: i10 API
  version: 0.0.0
  description: >-
    Transactional email API. Generated from the same Zod schemas the server
    validates with and the SDKs are built from, so the reference cannot drift
    from the implementation.
servers:
  - url: https://api.i10.tech
    description: Production
security: []
tags:
  - name: Emails
    description: Sending and retrieving transactional mail.
  - name: Domains
    description: Managing sending domains and DNS verification.
  - name: Webhooks
    description: Managing webhook endpoints, deliveries, replays and stats.
  - name: Webhook events
    description: Event payloads i10 signs and POSTs to your webhook endpoints.
  - name: Suppressions
    description: Managing workspace-wide suppressed recipient addresses.
  - name: Trusted templates
    description: Submitting email templates for deliverability review.
paths:
  /webhook-endpoints/{id}/stats:
    get:
      tags:
        - Webhooks
      summary: Get a webhook endpoint's delivery stats
      description: >-
        Deliveries created and attempts made between `since` and `until`
        (default: the last 24 hours), in total, in `hour` or `day` steps (at
        most 200), and by event type. The error rate is `failed_attempts /
        attempts`.
      operationId: getWebhookEndpointStats
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
        - schema:
            type: string
            format: date-time
          required: false
          name: since
          in: query
        - schema:
            type: string
            format: date-time
          required: false
          name: until
          in: query
        - schema:
            type: string
            enum:
              - hour
              - day
          required: false
          name: bucket
          in: query
      responses:
        '200':
          description: The stats.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointStats'
        '401':
          description: The API key is missing, malformed, or unknown.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key is restricted to a domain, or is a test key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such endpoint for this API key's tenant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The window is backwards, or has too many steps.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Webhook endpoints are not configured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    WebhookEndpointStats:
      type: object
      properties:
        object:
          type: string
          enum:
            - webhook_endpoint_stats
        endpoint_id:
          type: string
          format: uuid
        since:
          type: string
        delivered:
          type: integer
        failed:
          type: integer
        pending:
          type: integer
        success_rate:
          type:
            - number
            - 'null'
        last_success_at:
          type:
            - string
            - 'null'
        failing_since:
          type:
            - string
            - 'null'
        until:
          type: string
        bucket:
          type: string
          enum:
            - hour
            - day
        attempts:
          type: integer
        failed_attempts:
          type: integer
        p50_ms:
          type:
            - number
            - 'null'
        p95_ms:
          type:
            - number
            - 'null'
        series:
          type: array
          items:
            type: object
            properties:
              start:
                type: string
              delivered:
                type: integer
              failed:
                type: integer
              pending:
                type: integer
              attempts:
                type: integer
              failed_attempts:
                type: integer
              p50_ms:
                type:
                  - number
                  - 'null'
              p95_ms:
                type:
                  - number
                  - 'null'
            required:
              - start
              - delivered
              - failed
              - pending
              - attempts
              - failed_attempts
              - p50_ms
              - p95_ms
        by_event_type:
          type: array
          items:
            type: object
            properties:
              event_type:
                type: string
                enum:
                  - email.sent
                  - email.delivered
                  - email.delivery_delayed
                  - email.bounced
                  - email.complained
                  - email.failed
                  - email.opened
                  - email.clicked
                  - email.unsubscribed
                  - webhook_endpoint.failing
                  - webhook_endpoint.disabled
                  - webhook_endpoint.recovered
                  - member.provisioned
                  - member.deprovisioned
                  - sso.connection.failed
                  - sso.certificate.expiring
              delivered:
                type: integer
              failed:
                type: integer
              pending:
                type: integer
            required:
              - event_type
              - delivered
              - failed
              - pending
      required:
        - object
        - endpoint_id
        - since
        - delivered
        - failed
        - pending
        - success_rate
        - last_success_at
        - failing_since
        - until
        - bucket
        - attempts
        - failed_attempts
        - p50_ms
        - p95_ms
        - series
        - by_event_type
    Error:
      type: object
      properties:
        statusCode:
          type: integer
        name:
          type: string
          enum:
            - validation_error
            - missing_required_field
            - invalid_access
            - not_found
            - method_not_allowed
            - rate_limit_exceeded
            - daily_quota_exceeded
            - monthly_quota_exceeded
            - test_quota_exceeded
            - invalid_from_address
            - invalid_to_address
            - domain_not_verified
            - idempotency_conflict
            - domain_already_exists
            - domain_already_claimed
            - plan_limit_exceeded
            - mail_signin_off
            - mailbox_already_exists
            - restricted_api_key
            - test_key_not_allowed
            - confirmation_required
            - sending_paused
            - sending_held
            - template_already_submitted
            - internal_server_error
        message:
          type: string
      required:
        - statusCode
        - name
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your i10 API key, prefixed `i10_live_` or `i10_test_`. Test keys can
        only send simulated emails (never delivered externally or counted toward
        limits), read test emails and list domains; all other endpoints refuse
        them with 403 `test_key_not_allowed`.

````

## Related topics

- [Get webhook stats for the workspace](https://docs.i10.tech/api-reference/webhooks/get-webhook-stats.md)
- [Get a webhook delivery and its attempts](https://docs.i10.tech/api-reference/webhooks/get-webhook-delivery.md)
- [Get a webhook endpoint](https://docs.i10.tech/api-reference/webhooks/get-webhook-endpoint.md)
- [Replay a webhook endpoint's deliveries](https://docs.i10.tech/api-reference/webhooks/replay-webhook-endpoint.md)
- [Recover a webhook endpoint's failed deliveries](https://docs.i10.tech/api-reference/webhooks/recover-webhook-endpoint.md)


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