---
title: "Create a Report"
method: POST
path: "/reports"
tags: ["Reports"]
---

# Create a Report

`POST /reports`

## Request

- Base URL: `https://api.enterprise.airtm.com/v2`
- URL: `https://api.enterprise.airtm.com/v2/reports`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/airtm/apis/airtm-enterprise-api-v2/docs/reports/post.ts> (a function with typed inputs; its response is checked against the schema)

Generate a new report for a given year/month.

To get a PDF or CSV report, you must first request its generation if it does not already exist.
To do so, you must provide the year and month

## Request body

- CreateReportRequest
  - `year` number, double, required: The year of the report to generate
  - `month` number, double, required: The month of the report to generate
  - `type` 'PDF' | 'CSV' | 'XLSX': Type of activity report

## Response `200`

Ok

- Report
  - `updatedAt` string, date-time, required: Report end date
  - `createdAt` string, date-time, required: Report end date
  - `periodTo` string, date-time, required: Report end date
  - `periodFrom` string, date-time, required: Report start date
  - `status` 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED', required: The current status of the report - `PENDING`: The report is pending generation. - `IN_PROGRESS`: The report is currently being generated. - `COMPLETED`: The report has been generated and is ready for download. - `FAILED`: The report generation failed.
  - `enterpriseUserId` string, uuid, required: Unique ID of the enterprise
  - `type` 'PDF' | 'CSV' | 'XLSX', required: Type of activity report
  - `id` string, uuid, required: Unique ID of the report

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/airtm/apis/airtm-enterprise-api-v2.md) - [All operations](https://skmtc.dev/airtm/apis/airtm-enterprise-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/airtm/apis/airtm-enterprise-api-v2/revisions/c9ed13d4c5c0?raw)
