---
title: "Reports"
description: "<p>Create and manage reports.</p>"
url: "https://www.contentstack.com/docs/developers/apis/lytics-api/reports"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-11-05"
---

# Reports

Create and manage reports.

## Get Reports

### Get Reports

**GET** `/v2/report`

Get a list of all Reports for the account

#### Query Parameters

- **account_id** (optional)
  The account ID. Defaults to the user's default account.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": [
    {
      "components": [
        {
          "config": null,
          "description": "string",
          "id": "string",
          "name": "string",
          "type": "size"
        }
      ],
      "description": "string",
      "label": "string",
      "user_id": "string"
    }
  ],
  "request_id": "string",
  "status": 0
}
```

## Create a Report

### Create a Report

**POST** `/v2/report`

Create a new Report

#### Query Parameters

- **account_id** (optional)
  The account ID. Defaults to the user's default account.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": {
    "components": [
      {
        "config": null,
        "description": "string",
        "id": "string",
        "name": "string",
        "type": "size"
      }
    ],
    "description": "string",
    "label": "string",
    "user_id": "string"
  },
  "request_id": "string",
  "status": 0
}
```

## Get a Report

### Get a Report

**GET** `/v2/report/{id}`

Get a Report by ID

#### URL Parameters

- **id** (required)
  The report ID

#### Query Parameters

- **account_id** (optional)
  The account ID. Defaults to the user's default account.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": {
    "components": [
      {
        "config": null,
        "description": "string",
        "id": "string",
        "name": "string",
        "type": "size"
      }
    ],
    "description": "string",
    "label": "string",
    "user_id": "string"
  },
  "request_id": "string",
  "status": 0
}
```

## Update Report

### Update Report

**PUT** `/v2/report/{id}`

Update a Report's label or description

#### URL Parameters

- **id** (required)
  The report ID

#### Query Parameters

- **account_id** (optional)
  The account ID. Defaults to the user's default account.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": {
    "components": [
      {
        "config": null,
        "description": "string",
        "id": "string",
        "name": "string",
        "type": "size"
      }
    ],
    "description": "string",
    "label": "string",
    "user_id": "string"
  },
  "request_id": "string",
  "status": 0
}
```

## Delete a Report

### Delete a Report

**DELETE** `/v2/report/{id}`

Delete a Report by ID

#### URL Parameters

- **id** (required)
  The report ID

#### Query Parameters

- **account_id** (optional)
  The account ID. Defaults to the user's default account.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": {
    "components": [
      {
        "config": null,
        "description": "string",
        "id": "string",
        "name": "string",
        "type": "size"
      }
    ],
    "description": "string",
    "label": "string",
    "user_id": "string"
  },
  "request_id": "string",
  "status": 0
}
```

## Create a new Report Component

### Create a new Report Component

**POST** `/v2/report/{id}/component`

Add a new Report Component to the Report. If the component already exists, it will be updated.

To create a new Component, you will need to specify the type, name, and config fields.

Depending on the Component type, you may need to specify additional fields in the config object.

For size components, you will need to specify the segment\_ids field (\[\]string) in the config object.

For composition components, you will need to specify the segment\_ids (\[\]string) field and a field (string) from the user schema in the config object.

For overflow components, you will need to specify the segment\_ids (\[\]string) field in the config object.

For dataflow components, you will need to specify the segment\_ids (\[\]string) field in the config object, as well as show\_providers, show\_streams, and show\_destinations (boolean) options.

#### URL Parameters

- **id** (required)
  The report ID

#### Query Parameters

- **account_id** (optional)
  The account ID. Defaults to the user's default account.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": {
    "components": [
      {
        "config": null,
        "description": "string",
        "id": "string",
        "name": "string",
        "type": "size"
      }
    ],
    "description": "string",
    "label": "string",
    "user_id": "string"
  },
  "request_id": "string",
  "status": 0
}
```

## Update a Report component

### Update a Report component

**PUT** `/v2/report/{id}/component/{componentid}`

Update a Report Component by ID

#### URL Parameters

- **id** (required)
  The report ID
- **componentid** (required)
  The component ID

#### Query Parameters

- **account_id** (optional)
  The account ID. Defaults to the user's default account.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": {
    "components": [
      {
        "config": null,
        "description": "string",
        "id": "string",
        "name": "string",
        "type": "size"
      }
    ],
    "description": "string",
    "label": "string",
    "user_id": "string"
  },
  "request_id": "string",
  "status": 0
}
```

## Delete a Report Component

### Delete a Report Component

**DELETE** `/v2/report/{id}/component/{componentid}`

Delete a Report Component by ID

#### URL Parameters

- **id** (required)
  The report ID
- **componentid** (required)
  The component ID

#### Query Parameters

- **account_id** (optional)
  The account ID. Defaults to the user's default account.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "_meta": {},
  "data": {
    "components": [
      {
        "config": null,
        "description": "string",
        "id": "string",
        "name": "string",
        "type": "size"
      }
    ],
    "description": "string",
    "label": "string",
    "user_id": "string"
  },
  "request_id": "string",
  "status": 0
}
```