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

# Create Object Report Api

`POST /reports`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/reports`
- Auth: HTTP bearer

Save a report owned by this credential. Private by default; a shared one (``visibility: "org"``) needs
``objects:manage`` and current Admin access. Fields the credential cannot see are unknown to it.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- ReportCreate
  - `title` string, required
  - `description` string, nullable
  - `object_slug` string, required
  - `chart_type` 'table' | 'bar' | 'line' | 'funnel' | 'stage_over_time' | 'time_in_stage', required
  - `config` ReportConfig, required: What a report computes. ``timezone`` (an IANA name) fixes how dates are bucketed and what "end of day" means; when absent the organization's time zone applies (never the server's).
    - `filters` ReportFilter[]
      - `attribute_slug` string, required
      - `relationship_slug` string, nullable
      - `operator` 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'starts_with' | 'is_null' | 'is_not_null' | 'in', required
      - `value` unknown
    - `group_by` ReportGroupBy[]
      - `kind` 'attribute' | 'related_attribute' | 'created_at'
      - `attribute_slug` string, nullable
      - `relationship_slug` string, nullable
      - `grain` 'day' | 'week' | 'month' | 'quarter' | 'year', nullable
    - `measures` ReportMeasure[]
      - `kind` 'count' | 'sum' | 'avg' | 'min' | 'max' | 'related_count', required
      - `attribute_slug` string, nullable
      - `relationship_slug` string, nullable
      - `label` string, nullable
    - `stage` ReportStage: The stage field and the ORDERED stages a funnel, stage-over-time or time-in-stage report walks.
      - `attribute_slug` string, required
      - `order` string[], required
    - `range` ReportRange: The calendar range a stage-over-time report snapshots, one column per ``grain`` period end (in the report's time zone).
      - `from` string, date, required
      - `to` string, date, required
      - `grain` 'day' | 'week' | 'month' | 'quarter' | 'year'
    - `timezone` string, nullable
  - `visibility` 'private' | 'org'

## Response `201`

Successful Response

- ApiResponseReportDefinitionResponse
  - `data` ReportDefinitionResponse, required
    - `id` string, uuid, required
    - `title` string, required
    - `description` string, nullable
    - `source` ReportSource, required
      - `slug` string, required
      - `singular_noun` string, required
      - `plural_noun` string, required
      - `kind` 'object' | 'process_list', required
      - `is_archived` boolean
    - `chart_type` 'table' | 'bar' | 'line' | 'funnel' | 'stage_over_time' | 'time_in_stage', required
    - `config` object, required
    - `visibility` 'private' | 'org', required
    - `revision` integer, required
    - `owner` ReportOwner, required
      - `id` string, nullable
      - `name` string, nullable
      - `is_you` boolean
    - `is_owner` boolean, required
    - `can_edit` boolean, required
    - `can_delete` boolean, required
    - `restricted` RestrictedComponent[]
      - `id` string, required
      - `restricted` true
    - `restricted_count` integer
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/89fc11143b70?raw)
