> ## 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.

# Archive a report

> Soft-archives the report (sets `archivedAt`).



## OpenAPI

````yaml DELETE /reports/{id}
openapi: 3.0.0
info:
  title: Costory
  version: '1.0'
  description: API Documentation
servers:
  - url: https://app-api.costory.io
security: []
paths:
  /reports/{id}:
    delete:
      tags:
        - Reports
      summary: Archive a report
      description: Soft-archives the report (sets `archivedAt`).
      operationId: archiveReport
      parameters:
        - schema:
            type: string
            format: cuid
          required: true
          name: id
          in: path
      responses:
        '204':
          description: Report archived
        '400':
          description: Invalid report id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsValidationError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportsForbidden'
      security:
        - bearerAuth: []
components:
  schemas:
    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
  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.

````