---
title: "Get API Usage Logs"
method: POST
path: "/v1/usage"
tags: ["Authorization"]
---

# Get API Usage Logs

`POST /v1/usage`

## Request

- Base URL: `https://api.casparser.in`
- URL: `https://api.casparser.in/v1/usage`
- Auth: API key in header `x-api-key`

Retrieve detailed API usage logs for your account.

Returns a list of API calls with timestamps, features used, status codes, and credits consumed.
Useful for monitoring usage patterns and debugging.

**Legacy path:** `/logs` (still supported)

## Request body

- object
  - `start_time` string, date-time: Start time filter (ISO 8601). Defaults to 30 days ago.
  - `end_time` string, date-time: End time filter (ISO 8601). Defaults to now.
  - `limit` integer: Maximum number of logs to return

## Response `200`

Usage logs retrieved successfully

- object
  - `status` string
  - `logs` object[]
    - `request_id` string: Unique request identifier
    - `feature` string: API feature used
    - `path` string: API endpoint path
    - `status_code` integer: HTTP response status code
    - `credits` number: Credits consumed for this request
    - `timestamp` string, date-time: When the request was made
  - `count` integer: Number of logs returned

## Other responses

- `400`: Bad request (e.g., using access token)
- `401`: Unauthorized. This can happen if the `x-api-key` header is missing.

## Changes

- **2026-09-13** `cf1b57c0f2f7`: 1 warning
  - the optional response header `X-Request-ID` removed for the status `401`
- **2026-07-12** `c74b9ecd5b53`: 1 warning
  - added the new `failed` enum value to the `status` response property for the response status `401`
- **2026-02-22** `be3ca0403f2f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/changes/v1/usage/post.md)

---

[API](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2.md) - [All operations](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/llms.txt) - [OpenAPI document](https://skmtc.dev/casparser/apis/cas-parser-track-portfolios-from-cdsl-nsdl-cams-kfintech-2/revisions/9d8f1445bad3?raw)
