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

# Get Webhook Logs

> Get logs for a webhook

Retrieves delivery logs for a specific webhook. Use this endpoint to monitor webhook delivery status, debug failures, and inspect payloads.

### Path Parameters

* **id** (*required*, string): Webhook ID

### Query Parameters

* **limit** (*optional*, number): Number of items per page (default: 10, max: 100)
* **page** (*optional*, number): The current page number to retrieve (default: 1)
* **sort** (*optional*, string): Sort field with optional `-` prefix for descending order (default: `-createdAt`)

### Response

Returns a paginated list of webhook log entries.

```json theme={null}
{
  "data": [
    {
      "_id": "507f1f77bcf86cd799439055",
      "event": "CALL_LOGGED",
      "status": "success",
      "request": {
        "body": {
          "event": "CALL_LOGGED",
          "payload": {
            "call_id": "call_abc123",
            "outcome": "answered",
            "duration": 180
          }
        }
      },
      "response": {
        "code": 200,
        "body": { "received": true }
      },
      "responseTime": 245,
      "createdAt": "2024-01-15T14:33:00.000Z"
    }
  ],
  "pagination": {
    "total": 50,
    "page": 1,
    "limit": 10,
    "pages": 5
  }
}
```

### Response Fields

| Field          | Type   | Description                                        |
| -------------- | ------ | -------------------------------------------------- |
| `_id`          | string | Log entry ID                                       |
| `event`        | string | The event type that triggered this delivery        |
| `status`       | string | Delivery status (`success` or `failed`)            |
| `request`      | object | The request payload sent to the webhook URL        |
| `response`     | object | The response received (includes `code` and `body`) |
| `responseTime` | number | Response time in milliseconds                      |
| `createdAt`    | date   | When the delivery was attempted                    |


## OpenAPI

````yaml GET /v1/webhooks/{id}/logs
openapi: 3.0.1
info:
  title: Salesfinity API
  description: API documentation for Salesfinity platform
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://client-api.salesfinity.co
security:
  - ApiKeyAuth: []
paths:
  /v1/webhooks/{id}/logs:
    get:
      tags:
        - Webhooks
      description: Get logs for a webhook
      operationId: get-webhook-logs
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Webhook ID
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
          description: Items per page
        - name: sort
          in: query
          required: false
          schema:
            type: string
          description: Sort field(s). Prefix with - for descending
      responses:
        '200':
          description: Webhook logs retrieved successfully
          content:
            application/json:
              schema:
                type: object
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````