# Webhook Delivery Logs

`GET /api/webhooks/{id}/logs`

Latest 500 delivery attempts with status, response code and error details. Paginated via page/per_page.

- **Group:** Webhooks
- **Since:** v3.0.0
- **Authentication:** `authtoken` header, created under Setup > API > API Management
- **HTML version:** /apiguide/webhooks/get-webhook-logs/

## Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authtoken` | String | **required** | Authentication token, generated from admin area |

## Example request

```bash
curl -X GET "https://yoursite.com/api/webhooks/123/logs" \
  -H "authtoken: YOUR_API_TOKEN"
```

## Success response

### Success-Response:

```json
HTTP/1.1 200 OK
{
  "data": [
    {
      "id": "982",
      "webhook_id": "3",
      "event": "invoice_paid",
      "url": "https://hooks.example.com/perfex",
      "payload": "{\"event\":\"invoice_paid\",\"timestamp\":1753021930,\"data\":{\"webhook_id\":3}}",
      "response_code": "200",
      "response_body": "{\"ok\":true}",
      "error_message": null,
      "attempt_number": "1",
      "status": "success",
      "triggered_at": "2026-07-20 14:32:10"
    },
    {
      "id": "981",
      "webhook_id": "3",
      "event": "invoice_created",
      "url": "https://hooks.example.com/perfex",
      "payload": "{\"event\":\"invoice_created\",\"timestamp\":1753021300,\"data\":{\"webhook_id\":3}}",
      "response_code": "500",
      "response_body": "Internal Server Error",
      "error_message": "HTTP 500: Internal Server Error",
      "attempt_number": "2",
      "status": "failed",
      "triggered_at": "2026-07-20 14:21:40"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total": 2,
    "total_pages": 1,
    "has_more": false,
    "current_page": 1,
    "last_page": 1
  }
}
```

## Error responses

### Error-Response:

```json
HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Webhook not found"
}
```

---

Perfex CRM REST API by Themesic Interactive. Full reference: /apiguide/
