> ## Documentation Index
> Fetch the complete documentation index at: https://learn.breezing.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Regenerate Report API

> Re-run an existing Breezing report with its stored parameters after recalculating gains or importing transactions to refresh its data.



## OpenAPI

````yaml POST /reports/{id}/regenerate
openapi: 3.1.0
info:
  title: Breezing Public API
  version: 1.0.0
  description: >-
    Crypto accounting API for programmatic access and AI agents. Authenticate
    with an API key using the Authorization header: `Bearer brz_...`
servers:
  - url: https://api.breezing.io/v1
security:
  - BearerAuth: []
paths:
  /reports/{id}/regenerate:
    post:
      tags:
        - Reports
      summary: Regenerate a report
      description: >-
        Re-run an existing report with its stored parameters (same type, period,
        tokens, wallets, chains). Existing detail rows are DELETED, the report
        goes back to "pending" with the SAME reportId, and generation is
        re-queued under a new task. Use after recalculating net gain/loss or
        importing missed transactions so the report reflects current data.


        Generation is ASYNCHRONOUS: the response returns the pending report and
        task ids immediately. Poll GET /tasks and GET /reports/{id} until the
        status is no longer "pending"/"progress" ("done" = detail rows are ready
        via GET /reports/{id}/details). Parallel report creation is allowed (no
        409 gating, dashboard parity), so do NOT create another report with the
        same parameters while one is still pending; check GET /reports first.


        Returns 404 if the report does not exist for this org/company, 409 while
        the report is still generating.
      parameters:
        - schema:
            type: string
            description: Report ID
            example: '42'
          required: true
          description: Report ID
          name: id
          in: path
        - schema:
            type: string
            description: >-
              Organization ID. Use GET /v1/companies to discover available
              org/company pairs.
            example: '1'
          required: true
          description: >-
            Organization ID. Use GET /v1/companies to discover available
            org/company pairs.
          name: orgId
          in: query
        - schema:
            type: string
            description: >-
              Company ID. Use GET /v1/companies to discover available companies
              and their access levels.
            example: '1'
          required: true
          description: >-
            Company ID. Use GET /v1/companies to discover available companies
            and their access levels.
          name: companyId
          in: query
      responses:
        '200':
          description: Report regeneration queued
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      reportId:
                        type: integer
                        description: >-
                          ID of the (pending) report row. Poll GET
                          /reports/{id}.
                      taskId:
                        type: integer
                        description: >-
                          ID of the createReport task tracking generation. Poll
                          GET /tasks.
                    required:
                      - reportId
                      - taskId
                required:
                  - success
                  - data
        '400':
          description: Invalid report ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '403':
          description: >-
            API key has no access to this company, has read-only access where
            write was required, or the company subscription is inactive
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '404':
          description: Report not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '409':
          description: Report is still generating
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
      security:
        - BearerAuth: []
components: {}

````