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

# Run a report now

> Enqueues and synchronously runs pending executions for every destination.



## OpenAPI

````yaml POST /reports/{reportId}/executions
openapi: 3.0.0
info:
  title: Costory
  version: '1.0'
  description: API Documentation
servers:
  - url: https://app-api.costory.io
security: []
paths:
  /reports/{reportId}/executions:
    post:
      tags:
        - Reports
      summary: Run a report now
      description: >-
        Enqueues and synchronously runs pending executions for every
        destination.
      operationId: runReportNow
      parameters:
        - schema:
            type: string
            format: cuid
          required: true
          name: reportId
          in: path
      responses:
        '200':
          description: Run started and completed (or left pending for async widgets)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportRunNow'
        '400':
          description: Report cannot be run
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ReportsValidationError'
                  - type: object
                    properties:
                      error:
                        type: string
                        enum:
                          - NO_DESTINATIONS
                          - REPORT_NOT_ACTIVE
                          - REPORT_ARCHIVED
                    required:
                      - error
                    additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsForbidden'
        '500':
          description: Execution outcome could not be resolved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsRunOutcomeUnknown'
      security:
        - bearerAuth: []
components:
  schemas:
    ReportRunNow:
      type: object
      properties:
        executionIds:
          type: array
          items:
            type: string
      required:
        - executionIds
      additionalProperties: false
    ReportsValidationError:
      type: object
      properties:
        error:
          type: string
          enum:
            - VALIDATION_ERROR
        reason:
          type: string
        details:
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - nullable: true
              type: string
              enum:
                - null
            - type: array
              items: {}
            - type: object
              additionalProperties: {}
      required:
        - error
        - details
      additionalProperties: false
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          description: Unauthorized error message
      required:
        - error
    ReportsForbidden:
      type: object
      properties:
        error:
          type: string
          enum:
            - FORBIDDEN
      required:
        - error
      additionalProperties: false
    ReportsRunOutcomeUnknown:
      type: object
      properties:
        ok:
          type: boolean
          enum:
            - false
        error:
          type: string
          enum:
            - OUTCOME_UNKNOWN
        reportId:
          type: string
        executionIds:
          type: array
          items:
            type: string
      required:
        - ok
        - error
        - reportId
        - executionIds
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or Clerk ak_* API key
      description: >-
        Send `Authorization: Bearer <credential>` using either a Clerk session
        JWT or a Clerk API key (`ak_*`). API keys may identify a user (`user_*`)
        or organization (`org_*`) principal and are generated in the Clerk
        Dashboard under API keys.

````