> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://catena.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://catena.ferndocs.com/_mcp/server.

# Get Webhook Subscription Logs

GET https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/logs

Get delivery logs for a webhook subscription.

Reference: https://catena.ferndocs.com/api-reference/notifications/webhook-subscriptions/get-webhook-subscription-logs

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `webhook_id` (string, required)

### Query parameters

- `start_date` (datetime, optional, nullable)
- `end_date` (datetime, optional, nullable)
- `status` (enum, optional, nullable)
  - Allowed values: `success`, `failed`
- `sort_by` (enum, optional) — Enum for webhook log list sortable fields
  - Allowed values: `created_at`, `status`
- `sort_order` (enum, optional) — Enum for sort direction shared across paginated list endpoints
  - Allowed values: `asc`, `desc`
- `cursor` (string, optional, nullable) — Cursor for the next page
- `size` (integer, optional, default: 300) — Page size

## Response

### 200

Successful Response

- `items` (list of WebhookLogRead, required)
- `total` (integer, required)
- `current_page` (string, optional, nullable) — Cursor to refetch the current page
- `current_page_backwards` (string, optional, nullable) — Cursor to refetch the current page starting from the last item
- `previous_page` (string, optional, nullable) — Cursor for the previous page
- `next_page` (string, optional, nullable) — Cursor for the next page

## Errors

### 400 Bad Request Error

Bad Request

- `code` (integer, optional, default: 400)
- `message` (string, optional, default: Bad Request)
- `detail` (string, optional, nullable)

### 401 Unauthorized Error

Unauthorized

- `code` (integer, optional, default: 401)
- `message` (string, optional, default: Unauthorized)
- `detail` (string, optional, nullable)

### 403 Forbidden Error

Forbidden

- `code` (integer, optional, default: 403)
- `message` (string, optional, default: Forbidden)
- `detail` (string, optional, nullable)

### 404 Not Found Error

Not Found

- `code` (integer, optional, default: 404)
- `message` (string, optional, default: Not Found)
- `detail` (string, optional, nullable)

### 405 Method Not Allowed Error

Method Not Allowed

- `code` (integer, optional, default: 405)
- `message` (string, optional, default: Method Not Allowed)
- `detail` (string, optional, nullable)

### 409 Conflict Error

Conflict

- `code` (integer, optional, default: 409)
- `message` (string, optional, default: Conflict)
- `detail` (string, optional, nullable)

### 422 Unprocessable Entity Error

Unprocessable Entity

- `code` (integer, optional, default: 422)
- `message` (string, optional, default: Invalid Request Body)
- `detail` (list of ValidationErrorDetail, optional, nullable)

### 429 Too Many Requests Error

Too Many Requests

- `code` (integer, optional, default: 429)
- `message` (string, optional, default: Too Many Requests)
- `detail` (RetryAfterDetail, optional, nullable)

### 500 Internal Server Error

Internal Server Error

- `message` (string, optional, default: Internal Server Error)

## Types

### WebhookLogRead

Webhook log read model.

- `created_at` (datetime, required) — The date and time the log was created
- `webhook_id` (string, required) — The ID of the webhook that the metrics are for
- `message_id` (string, required) — The ID of the message
- `event_name` (enum, required) — The name of the event
  - Allowed values: `document.added`, `document.modified`, `document.*`, `dvir_log.added`, `dvir_log.modified`, `dvir_log.removed`, `dvir_log.*`, `driver_safety_event.added`, `driver_safety_event.modified`, `driver_safety_event.removed`, `driver_safety_event.*`, `driver_vehicle_association.added`, `driver_vehicle_association.modified`, `driver_vehicle_association.*`, `trailer_vehicle_association.added`, `trailer_vehicle_association.modified`, `trailer_vehicle_association.*`, `invitation.created`, `invitation.rejected`, `invitation.declined`, `invitation.viewed`, `invitation.sent`, `invitation.accepted`, `invitation.expired`, `invitation.deleted`, `invitation.*`, `connection.created`, `connection.staled`, `connection.*`, `fleet_connection.created`, `fleet_connection.*`, `fleet_info.added`, `fleet_info.modified`, `fleet_info.removed`, `fleet_info.*`, `share_agreement.created`, `share_agreement.updated`, `share_agreement.deleted`, `share_agreement.*`, `webhook.created`, `webhook.updated`, `webhook.deleted`, `webhook.staled`, `webhook.activated`, `webhook.paused`, `webhook.*`, `workflow.added`, `workflow.modified`, `workflow.removed`, `workflow.*`, `tsp.created`, `tsp.requested`, `vehicle.added`, `vehicle.modified`, `vehicle.removed`, `vehicle.*`, `trailer.added`, `trailer.modified`, `trailer.removed`, `trailer.*`, `trailer_location.added`, `trailer_location.modified`, `trailer_location.*`, `trailer_status.added`, `trailer_status.modified`, `trailer_status.*`, `execution.created`, `execution.staled`, `execution.failed`, `execution.*`, `schedule.deactivated`, `schedule.*`, `user.added`, `user.modified`, `user.removed`, `user.*`, `vehicle_location.added`, `vehicle_location.*`, `ifta_summary.added`, `ifta_summary.modified`, `ifta_summary.removed`, `ifta_summary.*`, `hos_availability.added`, `hos_availability.modified`, `hos_availability.removed`, `hos_availability.*`, `hos_daily_log.added`, `hos_daily_log.modified`, `hos_daily_log.*`, `hos_daily_snapshot.added`, `hos_daily_snapshot.modified`, `hos_daily_snapshot.removed`, `hos_daily_snapshot.*`, `hos_event.added`, `hos_event.modified`, `hos_event.removed`, `hos_event.*`, `hos_violation.added`, `hos_violation.modified`, `hos_violation.removed`, `hos_violation.*`, `engine_log.added`, `engine_log.modified`, `engine_log.removed`, `engine_log.*`, `engine_status.added`, `engine_status.modified`, `engine_status.*`, `group_message.added`, `group_message.modified`, `group_message.*`, `message.added`, `message.modified`, `message.*`, `fuel_transaction.added`, `fuel_transaction.modified`, `fuel_transaction.*`, `geofence_monitor.created`, `geofence_monitor.departed`, `geofence_monitor.arrived`, `geofence_monitor.completed`, `geofence_monitor.cancelled`, `geofence_monitor.expired`, `geofence_monitor.*`, `resource_operation.created`, `resource_operation.succeeded`, `resource_operation.failed`, `resource_operation.*`
- `status` (enum, required) — The status of the webhook message
  - Allowed values: `success`, `failed`
- `status_code` (integer, required) — The HTTP status code of the webhook delivery
- `error_message` (string, required, nullable) — The error message of the webhook delivery
- `response_time_ms` (integer, required, nullable) — The response time of the webhook delivery in milliseconds

### ValidationErrorDetail

- `path` (string, required)
- `input` (string, required)
- `message` (string, required)
- `error_type` (string, required)

### RetryAfterDetail

- `retry_after_seconds` (integer, required)
- `message` (string, required)

## Examples

**Response**

```json
{
  "items": [
    {
      "created_at": "2024-01-15T09:30:00Z",
      "webhook_id": "string",
      "message_id": "string",
      "event_name": "document.added",
      "status": "success",
      "status_code": 1,
      "error_message": "string",
      "response_time_ms": 1
    }
  ],
  "total": 1,
  "current_page": "string",
  "current_page_backwards": "string",
  "previous_page": "string",
  "next_page": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.catenatelematics.com/v2/notifications/webhooks/webhook_id/logs"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.catenatelematics.com/v2/notifications/webhooks/webhook_id/logs';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.catenatelematics.com/v2/notifications/webhooks/webhook_id/logs"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.catenatelematics.com/v2/notifications/webhooks/webhook_id/logs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.catenatelematics.com/v2/notifications/webhooks/webhook_id/logs")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.catenatelematics.com/v2/notifications/webhooks/webhook_id/logs', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.catenatelematics.com/v2/notifications/webhooks/webhook_id/logs");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.catenatelematics.com/v2/notifications/webhooks/webhook_id/logs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```