---
title: "Create a new Report Component"
method: POST
path: "/report/{id}/component"
tags: ["Reports"]
---

# Create a new Report Component

`POST /report/{id}/component`

## Request

- Base URL: `https://api.lytics.io/v2`
- URL: `https://api.lytics.io/v2/report/{id}/component`
- Auth: API key in header `Authorization`

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.

## Path parameters

- `id` string, required

## Query parameters

- `account_id` string

## Request body `*/*`

- ModelsComponent
  - `config` unknown
  - `description` string: An optional description of the component
  - `id` string
  - `name` string, required: The name of the component to be used in the Report.
  - `type` 'size' | 'composition' | 'overlap' | 'dataflow', required: The type of component to be used in the Report.

## Response `200`

Report Response

- object
  - `_meta` object: Response Metadata
  - `data` object: Response Payload
    - `components` ModelsComponent[]: List of components that make up the report
      - `config` unknown
      - `description` string: An optional description of the component
      - `id` string
      - `name` string, required: The name of the component to be used in the Report.
      - `type` 'size' | 'composition' | 'overlap' | 'dataflow', required: The type of component to be used in the Report.
    - `description` string: An optional description of the Report
    - `label` string, required: A label for the Report. This is how the report will be identified in the UI.
    - `user_id` string: The user ID that created or updated the report
  - `request_id` string
  - `status` integer: HTTP Status Code

## Other responses

- `201`: Report Response
- `400`: Bad Request
- `404`: Not Found
- `500`: Internal Server Error

## Changes

- **2026-11-03** `d8e975057aec`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lytics/apis/lytics-api/changes/report/:id/component/post.md)

---

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