# Search call logs (/docs/api/logs/logs_list)

Every call and routed attempt for this org, newest first (360-day retention). Filter by time, outcome, status, provider, capability, endpoint, key, agent, client, mode, credential, error code, latency and cost; cursor-paginated.

`GET /v1/logs`

```json
{
  "operationId": "logs_list",
  "summary": "Search call logs",
  "description": "Every call and routed attempt for this org, newest first (360-day retention). Filter by time, outcome, status, provider, capability, endpoint, key, agent, client, mode, credential, error code, latency and cost; cursor-paginated.",
  "tags": [
    "logs"
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "schema": {
        "type": "string",
        "format": "date-time",
        "description": "Start of the window (default: 24 hours ago)"
      },
      "required": false,
      "description": "Start of the window (default: 24 hours ago)",
      "name": "from",
      "in": "query"
    },
    {
      "schema": {
        "type": "string",
        "format": "date-time",
        "description": "End of the window (default: now)"
      },
      "required": false,
      "description": "End of the window (default: now)",
      "name": "to",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "hit",
                "miss",
                "failed"
              ]
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "outcome",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "http_status",
      "in": "query"
    },
    {
      "schema": {
        "type": "integer",
        "minimum": 100,
        "maximum": 599,
        "description": "Lowest HTTP status (inclusive)"
      },
      "required": false,
      "description": "Lowest HTTP status (inclusive)",
      "name": "status_min",
      "in": "query"
    },
    {
      "schema": {
        "type": "integer",
        "minimum": 100,
        "maximum": 599,
        "description": "Highest HTTP status (inclusive)"
      },
      "required": false,
      "description": "Highest HTTP status (inclusive)",
      "name": "status_max",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^(outcome|http_status|provider|capability|endpoint_id|key_id|agent_id|workspace_id|app_id|client_name|client_kind|mode|client_mode|supply_mode|credential|error_code|country|cache|billing_verdict):[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ],
        "description": "`column:value` pairs to leave out"
      },
      "required": false,
      "description": "`column:value` pairs to leave out",
      "name": "exclude",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "provider",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "capability",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "endpoint_id",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "key_id",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "agent_id",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "workspace_id",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "app_id",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "client_name",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "sdk",
                "mcp",
                "cli",
                "browser",
                "server",
                "unknown"
              ]
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "client_kind",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "mode",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "sync",
                "wait",
                "async",
                "batch",
                "list",
                "mcp"
              ]
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "client_mode",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "byok",
                "managed",
                "connected"
              ]
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "supply_mode",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "managed",
                "byok",
                "none"
              ]
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "credential",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "error_code",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "country",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "hit",
                "partial",
                "miss",
                "stale",
                "bypass"
              ]
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ]
      },
      "required": false,
      "name": "cache",
      "in": "query"
    },
    {
      "schema": {
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ok",
                "charged_for_miss",
                "double_charged_retry",
                "price_mismatch",
                "unverifiable",
                "none",
                "managed",
                "mismatch"
              ]
            },
            "maxItems": 25
          },
          {
            "type": "string",
            "maxLength": 4000
          }
        ],
        "description": "Vendor billing verdicts; `mismatch` = charged_for_miss, double_charged_retry or price_mismatch"
      },
      "required": false,
      "description": "Vendor billing verdicts; `mismatch` = charged_for_miss, double_charged_retry or price_mismatch",
      "name": "billing_verdict",
      "in": "query"
    },
    {
      "schema": {
        "type": [
          "integer",
          "null"
        ],
        "minimum": 0
      },
      "required": false,
      "name": "latency_min",
      "in": "query"
    },
    {
      "schema": {
        "type": [
          "integer",
          "null"
        ],
        "minimum": 0
      },
      "required": false,
      "name": "latency_max",
      "in": "query"
    },
    {
      "schema": {
        "type": [
          "integer",
          "null"
        ],
        "minimum": 0
      },
      "required": false,
      "name": "cost_min",
      "in": "query"
    },
    {
      "schema": {
        "type": [
          "integer",
          "null"
        ],
        "minimum": 0
      },
      "required": false,
      "name": "cost_max",
      "in": "query"
    },
    {
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9_.-]{1,128}$",
        "description": "Search call, parent or run id, endpoint or error code (substring)"
      },
      "required": false,
      "description": "Search call, parent or run id, endpoint or error code (substring)",
      "name": "q",
      "in": "query"
    },
    {
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9_.:/@-]{1,200}$"
      },
      "required": false,
      "name": "parent_id",
      "in": "query"
    },
    {
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      },
      "required": false,
      "name": "limit",
      "in": "query"
    },
    {
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9_-]{1,300}$",
        "description": "Opaque cursor from a previous page"
      },
      "required": false,
      "description": "Opaque cursor from a previous page",
      "name": "cursor",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "call_id": {
                      "type": "string",
                      "minLength": 3,
                      "maxLength": 128
                    },
                    "parent_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 128
                    },
                    "attempt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "workspace_id": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "app_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "app_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 80
                    },
                    "key_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "agent_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "run_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 128
                    },
                    "supply_mode": {
                      "type": "string",
                      "enum": [
                        "byok",
                        "managed",
                        "connected"
                      ]
                    },
                    "capability": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "endpoint_id": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "provider": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "mode": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "client_mode": {
                      "type": "string",
                      "enum": [
                        "sync",
                        "wait",
                        "async",
                        "batch",
                        "list",
                        "mcp"
                      ]
                    },
                    "credential": {
                      "type": "string",
                      "enum": [
                        "managed",
                        "byok",
                        "none"
                      ]
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "hit",
                        "miss",
                        "failed"
                      ]
                    },
                    "error_code": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "http_status": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "upstream_status": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "total_ms": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "overhead_ms": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "upstream_ms": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "ttfb_ms": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "queue_wait_ms": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "bytes_in": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "bytes_out": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "cost_micro": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "cache": {
                      "type": "string",
                      "enum": [
                        "hit",
                        "partial",
                        "miss",
                        "stale",
                        "bypass"
                      ]
                    },
                    "saved_micro": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "user_agent": {
                      "type": "string",
                      "maxLength": 512
                    },
                    "client_name": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "client_version": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "client_kind": {
                      "type": "string",
                      "enum": [
                        "sdk",
                        "mcp",
                        "cli",
                        "browser",
                        "server",
                        "unknown"
                      ]
                    },
                    "ip": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "asn": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "country": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 8
                    },
                    "colo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 8
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "maxLength": 500
                      }
                    },
                    "request_hash": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "effective_options": {
                      "type": "string",
                      "maxLength": 4000,
                      "default": ""
                    },
                    "billing_verdict": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "charged_for_miss",
                        "double_charged_retry",
                        "price_mismatch",
                        "unverifiable",
                        "none",
                        "managed"
                      ]
                    },
                    "billing_billable": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "default": null
                    },
                    "vendor_expected_credits": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "vendor_reported_credits": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "vendor_balance_after": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "default": null
                    },
                    "vendor_expected_micro": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "vendor_reported_micro": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "ts": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "has_body": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "call_id",
                    "parent_id",
                    "attempt",
                    "workspace_id",
                    "app_id",
                    "app_name",
                    "key_id",
                    "agent_id",
                    "run_id",
                    "supply_mode",
                    "capability",
                    "endpoint_id",
                    "provider",
                    "mode",
                    "client_mode",
                    "credential",
                    "outcome",
                    "error_code",
                    "http_status",
                    "upstream_status",
                    "total_ms",
                    "overhead_ms",
                    "upstream_ms",
                    "ttfb_ms",
                    "queue_wait_ms",
                    "bytes_in",
                    "bytes_out",
                    "cost_micro",
                    "cache",
                    "user_agent",
                    "client_name",
                    "client_version",
                    "client_kind",
                    "ip",
                    "asn",
                    "country",
                    "colo",
                    "meta",
                    "request_hash",
                    "billing_verdict",
                    "ts",
                    "has_body"
                  ]
                }
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "items",
              "next_cursor"
            ]
          }
        }
      }
    },
    "default": {
      "description": "Error",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "invalid_request",
                      "unauthorized",
                      "insufficient_balance",
                      "max_cost_exceeded",
                      "scope_denied",
                      "budget_blocked",
                      "not_found",
                      "idempotency_mismatch",
                      "invalid_meta",
                      "rate_limited",
                      "upstream_error",
                      "response_buffer_limit",
                      "provider_capacity_unavailable",
                      "grid_saturated",
                      "upstream_timeout",
                      "conflict",
                      "internal_error",
                      "account_frozen",
                      "strict_filters",
                      "plan_limit_reached",
                      "validation_failed",
                      "deadline_exceeded",
                      "cancelled"
                    ]
                  },
                  "message": {
                    "type": "string"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "call_id": {
                    "type": "string"
                  },
                  "retry_after_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "details": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              }
            },
            "required": [
              "error"
            ]
          }
        }
      }
    }
  }
}
```
