# Automation logs

URL: https://www.callshift.ai/docs/api/automation-logs

The tool calls of your agents and the deliveries of the after-call webhook, each with the request sent, the answer, its status and its duration.

## List automation logs

`GET /v1/automation-logs`

Bearer API key

List the tool calls and after-call webhook deliveries of the authenticated tenant with pagination, most recent first. Filter by `callId` to see what happened during a given call, or by `statusCode` to find the failures.

### Authorization

- `Authorization` (string, required): `Bearer <API key>`, a key created at app.callshift.ai/api-keys.

### Query parameters

- `page` (integer) · minimum 1, default `1`, example `1`
- `limit` (integer) · from 1 to 100, default `50`, example `50`
- `type` (enum<string>): `tool_call`: a tool the agent called during a call. `end_of_call`: an after-call webhook delivery. · example `tool_call` · allowed: `tool_call`, `end_of_call`
- `agentId` (string<uuid>) · example `550e8400-e29b-41d4-a716-446655440000`
- `callId` (string<uuid>) · example `550e8400-e29b-41d4-a716-446655440000`
- `toolId` (string<uuid>) · example `550e8400-e29b-41d4-a716-446655440000`
- `toolName` (string): Exact match on the name of the called tool. · example `book_appointment`
- `statusCode` (integer): HTTP status code the tool or webhook answered with. · from 100 to 599, example `500`
- `from` (string<date-time>) · example `2024-01-01T00:00:00Z`
- `to` (string<date-time>) · example `2024-12-31T23:59:59Z`

### Responses

**200**

Automation logs listed successfully

- `data` (object[], required)

  - `id` (string<uuid>, required) · example `550e8400-e29b-41d4-a716-446655440000`
  - `type` (enum<string>, required): `tool_call`: a tool the agent called during a call. `end_of_call`: an after-call webhook delivery. · example `tool_call` · allowed: `tool_call`, `end_of_call`
  - `agentId` (string<uuid>, required)
  - `callId` (string<uuid> | null, required)
  - `toolId` (string<uuid> | null, required): Tool called, on a `tool_call` log.
  - `webhookEndpointId` (string<uuid> | null, required): Webhook delivered to, on an `end_of_call` log.
  - `requestTime` (string<date-time>, required)
  - `durationMs` (integer, required) · example `230`
  - `statusCode` (integer | null, required): Null when no HTTP response was received. · example `200`
  - `request` (any | null): Payload sent to the tool or webhook.
  - `response` (any | null): Body the tool or webhook answered with.
  - `error` (string | null, required)
- `pageCount` (number, required) · example `3`

**400**

Invalid request

- `success` (enum<boolean>, required) · allowed: `false`
- `error` (object, required)

  - `name` (enum<string>, required) · allowed: `ZodError`
  - `issues` (object[], required)

    - `code` (string, required) · example `invalid_enum_value`
    - `path` (string | number[], required)
    - `message` (string, required) · example `Invalid email`

**401**

Unauthorized

- `error` (string, required)

**500**

Internal server error

- `error` (string, required)

**Request**

**cURL**

```bash
curl "https://api.callshift.ai/v1/automation-logs" \
  -H "Authorization: Bearer $CALLSHIFT_API_KEY"
```

**JavaScript**

```javascript
const res = await fetch("https://api.callshift.ai/v1/automation-logs", {
  headers: {
    Authorization: `Bearer ${process.env.CALLSHIFT_API_KEY}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os
import requests

res = requests.get(
    "https://api.callshift.ai/v1/automation-logs",
    headers={"Authorization": f"Bearer {os.environ['CALLSHIFT_API_KEY']}"},
)
print(res.json())
```

**Response**

**200**

```json
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "type": "tool_call",
      "agentId": "550e8400-e29b-41d4-a716-446655440000",
      "callId": "550e8400-e29b-41d4-a716-446655440000",
      "toolId": "550e8400-e29b-41d4-a716-446655440000",
      "webhookEndpointId": "550e8400-e29b-41d4-a716-446655440000",
      "requestTime": "2026-10-30T09:12:00.000Z",
      "durationMs": 230,
      "statusCode": 200,
      "request": null,
      "response": null,
      "error": "string"
    }
  ],
  "pageCount": 3
}
```

**400**

```json
{
  "success": false,
  "error": {
    "name": "ZodError",
    "issues": [
      {
        "code": "invalid_enum_value",
        "path": [
          "contacts",
          0,
          "email"
        ],
        "message": "Invalid email"
      }
    ]
  }
}
```

**401**

```json
{
  "error": "Authentication error"
}
```

**500**

```json
{
  "error": "Internal server error"
}
```
