> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chargeapi.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Report

Creates a report. Report generation is asynchronous. The initial response returns a report object with `status` set to `pending`. Retrieve the report later or listen for `report.succeeded` to know when the file is ready.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.chargeapi.co/v1/reports \
    -H "Authorization: Bearer ch_sk_test_..." \
    --json '{
    "parameters": {
      "period_end": "2026-05-02T00:17:49.442Z",
      "period_start": "2026-04-01T00:18:06.932Z",
      "type": "charging_summary"
    }
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "id": "rpt_kryMLRtfr8HJYs7xUm2lA2MS3pe8RzR9",
      "object": "report",
      "account": "acct_7XRI8yvnFHeUxJTZyrEHZpvbeoXHAPcn",
      "created": "2026-05-02T00:18:03.609Z",
      "fleet": "flt_QP37STtAqG1IDAy6Dd6Qwpy2L2jq8rUC",
      "parameters": {
          "filters": {
              "vehicle": ["veh_hMbjoAIhToYAb14hkjgjEHDwJ4eT0Q3c"]
          },
          "group_by": "vehicle",
          "period_end": "2026-05-02T00:17:49.442Z",
          "period_start": "2026-04-01T00:18:06.932Z",
          "type": "charging_summary"
      },
      "size": 0,
      "status": "pending",
      "succeeded_at": null,
      "type": "csv",
      "url": null
  }
  ```
</ResponseExample>

## Parameters

<ParamField body="fleet" type="string">
  Limit the report to a single fleet.
</ParamField>

<ParamField body="parameters" type="object">
  Report configuration payload.

  <Expandable title="properties">
    <ParamField body="filters" type="object">
      Optional filters (vehicle IDs, driver IDs, etc.).
    </ParamField>

    <ParamField body="group_by" type="string">
      Dimension to group rows by.

      Available options: `vehicle`, `driver`, `fleet`, `station`
    </ParamField>

    <ParamField body="period_end" type="string" required>
      End of the reporting window (exclusive). RFC 3339 UTC timestamp with millisecond precision, e.g. `2026-03-03T14:05:23.789Z`.
    </ParamField>

    <ParamField body="period_start" type="string" required>
      Start of the reporting window (inclusive). RFC 3339 UTC timestamp with millisecond precision, e.g. `2026-03-03T14:05:23.789Z`.
    </ParamField>

    <ParamField body="type" type="string" required>
      Kind of report to generate.

      Available options: `charging_summary`, `cost_analysis`, `usage_breakdown`, `fleet_efficiency`
    </ParamField>
  </Expandable>
</ParamField>

## Returns

Returns the created report.
