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

# [DRAFT] List webhook deliveries

<Note>
  **Coming soon**: The Webhooks API is currently under design review. This documentation describes the target interface and may change before release.
</Note>

## Overview

Retrieves the delivery history of a webhook subscription: which events were sent, whether they were acknowledged, the HTTP status code your endpoint returned, the number of attempts and the last error, if any.

> **Important**: `pending` deliveries are still being retried with exponential backoff. A delivery is marked as `failed` after 72 hours of unsuccessful attempts.

Use this endpoint to debug your integration or to recover from an outage on your side: failed deliveries carry the event `id` and `type`, and since consumption events always contain accumulated totals, calling the corresponding `GET` consumptions endpoint is enough to converge to the current state.


## OpenAPI

````yaml GET /webhooks/subscriptions/{subscriptionId}/deliveries
openapi: 3.0.1
info:
  title: Partners API
  description: >-
    Partners API definition where you can check the documentation for the
    different available operations to integrate with the platform.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://pre-partners-api.cobee.io/api/v3
  - url: https://partners-api.cobee.io/api/v3
security:
  - bearerAuth: []
paths:
  /webhooks/subscriptions/{subscriptionId}/deliveries:
    get:
      summary: List webhook deliveries
      parameters:
        - name: subscriptionId
          in: path
          required: true
          description: The unique identifier of the webhook subscription
          schema:
            type: string
            format: uuid
          example: c3d4e5f6-a1b2-4c3d-8e5f-6a7b8c9d0e1f
        - name: status
          in: query
          required: false
          description: Filter deliveries by status.
          schema:
            type: string
            enum:
              - pending
              - succeeded
              - failed
        - name: eventType
          in: query
          required: false
          description: Filter deliveries by event type.
          schema:
            type: string
            enum:
              - employee.consumption.registered
              - company.payroll-cycle.closed
              - employee.committed-expense.requested
              - employee.committed-expense.finished
              - employee.committed-expense.cancelled
              - employee.committed-expense.payment.executed
              - employee.committed-expense.payment.cancelled
      responses:
        '200':
          description: Webhook deliveries successfully retrieved
          content:
            application/json:
              schema:
                type: object
                required:
                  - deliveries
                properties:
                  deliveries:
                    type: array
                    description: List of webhook deliveries, most recent first
                    items:
                      type: object
                      required:
                        - eventId
                        - eventType
                        - status
                        - attempts
                        - lastAttemptAt
                      properties:
                        eventId:
                          type: string
                          format: uuid
                          description: The unique identifier of the delivered event.
                          example: 0d9f2b1a-4c3e-4f6a-9b2d-8e7f6a5b4c3d
                        eventType:
                          type: string
                          description: The type of the delivered event.
                          enum:
                            - employee.consumption.registered
                            - company.payroll-cycle.closed
                            - employee.committed-expense.requested
                            - employee.committed-expense.finished
                            - employee.committed-expense.cancelled
                            - employee.committed-expense.payment.executed
                            - employee.committed-expense.payment.cancelled
                          example: employee.consumption.registered
                        status:
                          type: string
                          description: >-
                            The status of the delivery. `pending` deliveries are
                            still being retried.
                          enum:
                            - pending
                            - succeeded
                            - failed
                          example: succeeded
                        responseCode:
                          type: integer
                          nullable: true
                          description: >-
                            The HTTP status code returned by your endpoint on
                            the last attempt. Null if the endpoint could not be
                            reached.
                          example: 200
                        attempts:
                          type: integer
                          description: The number of delivery attempts made so far.
                          example: 1
                        lastAttemptAt:
                          type: integer
                          description: >-
                            When the last delivery attempt was made, in
                            timestamp format.
                          format: timestamp
                          example: 1753939051
                        error:
                          type: string
                          nullable: true
                          description: A description of the last delivery error, if any.
                          example: null
        '404':
          description: Not Found - The webhook subscription was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Resource not found
        '500':
          description: Internal Server Error - Something went wrong on our end
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Internal server error
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
      example:
        message: 'Bad request: Invalid field value'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````