# List automation logs

Returns automation logs, one page at a time.

```http
GET https://api.pozy.ai/v1/comment-automations/{automationId}/logs
```

- Area: Automations / Comment Automations
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `automationId` (string, required)

## Query parameters

- `status` (string): one of pending, sent, failed, skipped, gated
- `limit` (integer)
- `skip` (integer)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/comment-automations/66795db1e7f0419ba4a14e79/logs?limit=50" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/comment-automations/66795db1e7f0419ba4a14e79/logs?limit=50", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/comment-automations/66795db1e7f0419ba4a14e79/logs",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "limit": 50,
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `success`, boolean
- `logs`, array of object
  - `id`, string
  - `commentId`, string
  - `commenterId`, string
  - `commenterName`, string: Can be null
  - `commenterUsername`, string: Can be null
  - `commentText`, string: Can be null
  - `source`, string: One of `comment`, `live_comment`, `story_reply`, `story_mention`, `dm`. Can be null
  - `status`, string: One of `pending`, `sent`, `failed`, `skipped`, `gated`
  - `audienceOutcome`, string: One of `passed`, `blocked`, `gate_sent`, `gate_passed`, `gate_failed`. Can be null
  - `gateButtonStatus`, string: One of `delivered`, `rejected`, `omitted`. Can be null
  - `commenterIsFollower`, boolean: Can be null
  - `commenterFollowerCount`, integer: Can be null
  - `gateResolvedAt`, string (date-time): Can be null
  - `error`, string: Can be null
  - `platformError`, object: Can be null
    - `code`, integer
    - `subcode`, integer
  - `privateReplyConsumed`, boolean: Can be null
  - `commentReplyStatus`, string: One of `pending`, `sent`, `failed`, `skipped`. Can be null
  - `commentReplyError`, string: Can be null
  - `publicReplyPostedAt`, string (date-time): Can be null
  - `likeSkipped`, string: Can be null
  - `hideSkipped`, string: Can be null
  - `mediaError`, string: Can be null
  - `nextDueAt`, string (date-time): Can be null
  - `clickedAt`, string (date-time): Can be null
  - `clickCount`, integer
  - `createdAt`, string (date-time)
- `pagination`, object
  - `total`, integer
  - `limit`, integer
  - `skip`, integer
  - `hasMore`, boolean
- `misses`, object
  - `total`, integer
  - `retentionDays`, integer
  - `samples`, array of object
    - `commentText`, string
    - `commenterName`, string
    - `excludedBy`, string
    - `at`, string (date-time)

```json
{
  "success": true,
  "logs": [
    {
      "id": "6bfebd43ddc270f6d2c56fc5",
      "commentId": "6cc7605fa43607e4ad43b1d4",
      "commenterId": "6cf092e7d0bbf7835e6b78dc",
      "commenterName": "Acme",
      "commenterUsername": "acme",
      "commentText": "Hello from Pozy",
      "source": "comment",
      "status": "pending",
      "audienceOutcome": "passed",
      "gateButtonStatus": "delivered",
      "commenterIsFollower": true,
      "commenterFollowerCount": 42,
      "gateResolvedAt": "2026-10-02T09:00:00.000Z",
      "error": "string",
      "platformError": {
        "code": 1,
        "subcode": 1
      },
      "privateReplyConsumed": true,
      "commentReplyStatus": "pending",
      "commentReplyError": "string",
      "publicReplyPostedAt": "2026-10-02T09:00:00.000Z",
      "likeSkipped": "string",
      "hideSkipped": "string",
      "mediaError": "string",
      "nextDueAt": "2026-10-02T09:00:00.000Z",
      "clickedAt": "2026-10-02T09:00:00.000Z",
      "clickCount": 42,
      "createdAt": "2026-10-02T09:00:00.000Z"
    }
  ],
  "pagination": {
    "total": 42,
    "limit": 1,
    "skip": 1,
    "hasMore": true
  },
  "misses": {
    "total": 42,
    "retentionDays": 1,
    "samples": [
      {
        "commentText": "Hello from Pozy",
        "commenterName": "Acme",
        "excludedBy": "string",
        "at": "2026-10-02T09:00:00.000Z"
      }
    ]
  }
}
```
