---
title: "Save saved reports"
method: POST
path: "/api/v1/reports/saved-reports/save"
tags: ["reports"]
---

# Save saved reports

`POST /api/v1/reports/saved-reports/save`

## Request

- Base URL: `https://point11.ai`
- URL: `https://point11.ai/api/v1/reports/saved-reports/save`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://auth.point11.ai/oauth2/authorize`, token URL `https://auth.point11.ai/oauth2/token`)

Create or replace a saved report: a name and a report definition, which names the dataset and the campaign and date range it reads. Omit `id` to create one, which the server names; a retry with the same Idempotency-Key returns the report its first attempt made. Pass the `id` of one of the organization's reports and the `updatedAt` you read it at (`expectedUpdatedAt`) to replace it: a report changed since is 409 STALE_WRITE (read it again), a deleted one is 409 PRECONDITION_FAILED, and an id that is not the organization's report is 404 RESOURCE_NOT_FOUND. A definition that does not fit its dataset is 400 INVALID_INPUT with `details.issues`; a campaign that is not the organization's campaign of the dataset's product is 404 RESOURCE_NOT_FOUND.

## Headers

- `Point11-Organization` string, uuid
- `Idempotency-Key` string, uuid, required

## Request body

- ReportsSavedReportsSaveRequest
  - `id` string, uuid: One of the organization's reports to replace, with `expectedUpdatedAt`; omit it to create a report (the server names it).
  - `expectedUpdatedAt` string, date-time: The `updatedAt` the report was read at; a replace is refused once it moved.
  - `name` string, required
  - `definition` union, required: The report definition: the dataset it reads, the campaign and date range (`scope`), and how it groups, shows, filters and sorts; its keys the dataset's (reports.datasets.list.v1).
    - object
      - `version` 1, required
      - `grain` 'aggregate', required
      - `dataset` string, required
      - `scope` object, required
        - `campaignId` string, uuid, nullable, required
        - `profileId` string, uuid, nullable
        - `dateRange` string, nullable, required
      - `rows` string[], required
      - `columns` string[], required
      - `values` object[], required
        - `measure` string, required
        - `showAs` 'value' | 'row' | 'column' | 'total', required
      - `filters` object[], required
        - `dimension` string, required
        - `values` string[], required
      - `sort` object, nullable, required
        - `by` union, required
          - object
            - `kind` 'dimension', required
            - `key` string, required
          - object
            - `kind` 'measure', required
            - `key` string, required
            - `column` string, nullable, required
        - `direction` 'asc' | 'desc', required
      - `compare` boolean, required
      - `chart` object, nullable, required
        - `mark` 'bar' | 'stacked-bar' | 'stacked-100' | 'line' | 'area' | 'pie', required
        - `orientation` 'vertical' | 'horizontal', required
        - `x` string, nullable, required
        - `y` integer, required
        - `topN` integer, required
        - `labels` boolean, required
    - object
      - `version` 1, required
      - `grain` 'records', required
      - `dataset` string, required
      - `scope` object, required
        - `campaignId` string, uuid, nullable, required
        - `profileId` string, uuid, nullable
        - `dateRange` string, nullable, required
      - `fields` string[], required
      - `filters` object[], required
        - `dimension` string, required
        - `values` string[], required
      - `sort` object, nullable, required
        - `field` string, required
        - `direction` 'asc' | 'desc', required

## Response `200`

Success.

- ReportsSavedReportsSaveResponse
  - `id` string, uuid, required
  - `name` string, required
  - `product` 'discovery' | 'experience' | 'research', required: The product whose results a report reads.
  - `dataset` string, required: The dataset the report reads (reports.datasets.list.v1).
  - `campaignId` string, uuid, nullable, required: The campaign the report reads; null when it reads every campaign of its product.
  - `status` 'active' | 'archived', required
  - `createdByUserId` string, uuid, nullable, required: Who created the report; attribution only.
  - `createdByName` string, nullable, required: The creator's name as the member list shows it; null once the account is gone.
  - `createdAt` string, date-time, required: ISO instant, at the store's microsecond precision.
  - `updatedAt` string, date-time, required: When the report last changed; a replace names it as `expectedUpdatedAt`.
  - `definition` union, required
    - object
      - `version` 1, required
      - `grain` 'aggregate', required
      - `dataset` string, required
      - `scope` object, required
        - `campaignId` string, uuid, nullable, required
        - `profileId` string, uuid, nullable, required
        - `dateRange` string, nullable, required
      - `rows` string[], required
      - `columns` string[], required
      - `values` object[], required
        - `measure` string, required
        - `showAs` 'value' | 'row' | 'column' | 'total', required
      - `filters` object[], required
        - `dimension` string, required
        - `values` string[], required
      - `sort` object, nullable, required
        - `by` union, required
          - object
            - `kind` 'dimension', required
            - `key` string, required
          - object
            - `kind` 'measure', required
            - `key` string, required
            - `column` string, nullable, required
        - `direction` 'asc' | 'desc', required
      - `compare` boolean, required
      - `chart` object, nullable, required
        - `mark` 'bar' | 'stacked-bar' | 'stacked-100' | 'line' | 'area' | 'pie', required
        - `orientation` 'vertical' | 'horizontal', required
        - `x` string, nullable, required
        - `y` integer, required
        - `topN` integer, required
        - `labels` boolean, required
    - object
      - `version` 1, required
      - `grain` 'records', required
      - `dataset` string, required
      - `scope` object, required
        - `campaignId` string, uuid, nullable, required
        - `profileId` string, uuid, nullable, required
        - `dateRange` string, nullable, required
      - `fields` string[], required
      - `filters` object[], required
        - `dimension` string, required
        - `values` string[], required
      - `sort` object, nullable, required
        - `field` string, required
        - `direction` 'asc' | 'desc', required

## Other responses

- `400`: The input, query, or Idempotency-Key is invalid.
- `401`: The bearer is missing, expired, or not accepted.
- `402`: Billing refused the write: the code names the reason and `details.reason` carries it.
- `403`: The credential lacks the operation's scope or role, or the operation needs a different door.
- `404`: The resource or organization does not exist for this caller.
- `405`: This path takes another HTTP method, named in `Allow`.
- `409`: The request conflicts with current state or with prior use of its Idempotency-Key.
- `413`: The request, or the answer it asks for, is too large; narrow it.
- `429`: The credential's rate budget is spent; retry after `Retry-After` seconds.
- `500`: An unexpected server failure; retry later. Only `request_id` identifies it.
- `503`: A dependency is temporarily unavailable; retry after `Retry-After` seconds.
- `default`: Another status a product answers for its own refusal (for example `415` for an unsupported attachment); branch on `code`.

---

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