# List activity logs

Returns activity logs, one page at a time.

```http
GET https://api.pozy.ai/v1/logs
```

- Area: Workspace / Logs
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `type` (string): one of all, publishing, connections, webhooks, messaging, workflow_event, api_request, activity
- `status` (string): one of success, failed, pending, skipped, all
- `platform` (string): one of tiktok, instagram, whatsapp, facebook, youtube, linkedin, twitter, threads, pinterest, reddit, bluesky, googlebusiness, telegram, snapchat, all
- `action` (string)
- `search` (string)
- `days` (integer)
- `limit` (integer)
- `skip` (integer)
- `accountId` (string)
- `event` (string)
- `requestId` (string)
- `from` (string (date-time))
- `to` (string (date-time))
- `statusCode` (integer)
- `apiKeyId` (string)
- `profileId` (string)
- `includeReadReceipts` (boolean)
- `statusClass` (string): one of 1xx, 2xx, 3xx, 4xx, 5xx
- `method` (string): one of GET, POST, PUT, PATCH, DELETE
- `source` (string): one of api, dashboard, mcp, cli

## Example request

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

```ts
const res = await fetch("https://api.pozy.ai/v1/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/logs",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "limit": 50,
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `logs`, array of object
  - `type`, string
  - `action`, string
  - `user_id`, string
  - `platform`, string
  - `account_id`, string
  - `profile_id`, string
  - `operation_id`, string
  - `status`, string: One of `success`, `failed`, `pending`, `skipped`
  - `status_code`, integer
  - `error_message`, string
  - `error_code`, string
  - `duration_ms`, integer
  - `endpoint`, string
  - `request_body`, string
  - `response_body`, string
  - `created_at`, string (date-time)
  - `metadata`, string
  - `request_id`, string
  - `api_key_id`, string
  - `method`, string
  - `path`, string
  - `ip_address`, string
  - `user_agent`, string
- `pagination`, object
  - `total`, integer
  - `limit`, integer
  - `skip`, integer
  - `pages`, integer
  - `hasMore`, boolean

```json
{
  "logs": [
    {
      "type": "string",
      "action": "string",
      "user_id": "6bcbade0f9d4bd9ddd667038",
      "platform": "instagram",
      "account_id": "6c0452ba13f893983745d2dc",
      "profile_id": "6532c1777e5dfc41188fa1ee",
      "operation_id": "6d45b066a711cb6b0400a4c5",
      "status": "success",
      "status_code": 1,
      "error_message": "Hello from Pozy",
      "error_code": "string",
      "duration_ms": 1,
      "endpoint": "string",
      "request_body": "string",
      "response_body": "string",
      "created_at": "2026-10-02T09:00:00.000Z",
      "metadata": "string",
      "request_id": "658ac18fdfa6e639bea5f24e",
      "api_key_id": "6c997b4d4de22bc698229e77",
      "method": "string",
      "path": "string",
      "ip_address": "string",
      "user_agent": "string"
    }
  ],
  "pagination": {
    "total": 42,
    "limit": 1,
    "skip": 1,
    "pages": 1,
    "hasMore": true
  }
}
```
