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

# List webhook deliveries

> Recent delivery attempts for one endpoint, newest first.



## OpenAPI

````yaml /openapi.json get /webhooks/deliveries
openapi: 3.1.0
info:
  title: NinjaChat API
  version: 1.0.0
  description: >-
    Clean-break NinjaChat v1. Chat and Responses bill actual token usage; images
    and videos use catalog unit pricing.
servers:
  - url: https://www.ninjachat.ai/api/v1
security: []
paths:
  /webhooks/deliveries:
    get:
      summary: List webhook deliveries
      description: Recent delivery attempts for one endpoint, newest first.
      responses:
        '200':
          description: Recent webhook deliveries.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDeliveriesResponse'
        '400':
          description: Invalid or unsupported request parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient balance or project spend limit reached.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Gateway error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: javascript
          label: TypeScript SDK
          source: >-
            import { NinjaChat } from "@ninjachat/sdk";


            const client = new NinjaChat({ apiKey:
            process.env.NINJACHAT_API_KEY! });

            const deliveries = await client.webhooks.listDeliveries({
              endpointId: "webhook_endpoint_id",
              limit: 20,
            });


            console.log(deliveries);
        - lang: python
          label: Python SDK
          source: |-
            import os
            from ninjachat import NinjaChat

            client = NinjaChat(api_key=os.environ["NINJACHAT_API_KEY"])
            deliveries = client.webhooks.list_deliveries(
                endpoint_id="webhook_endpoint_id",
                limit=20,
            )

            print(deliveries)
components:
  schemas:
    WebhookDeliveriesResponse:
      type: object
      properties:
        deliveries:
          type: array
          items:
            $ref: '#/components/schemas/WebhookDelivery'
      required:
        - deliveries
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
            param:
              type:
                - string
                - 'null'
          required:
            - message
            - type
            - code
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    WebhookDelivery:
      type: object
      properties:
        id:
          type: string
        endpoint_id:
          type:
            - string
            - 'null'
        event:
          type: string
        status:
          type: string
          enum:
            - delivered
            - retrying
            - dead
            - pending
        attempts:
          type: integer
          minimum: 0
        delivered_at:
          type:
            - string
            - 'null'
          format: date-time
        next_attempt_at:
          type: string
          format: date-time
        last_error:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        request_id:
          type:
            - string
            - 'null'
      required:
        - id
        - endpoint_id
        - event
        - status
        - attempts
        - delivered_at
        - next_attempt_at
        - last_error
        - created_at
        - request_id
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: NinjaChat API key
      description: Use an API key created in the NinjaChat developer console.

````