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

# Create a report



## OpenAPI

````yaml https://app.pentest-tools.com/api-schema.yml post /reports
openapi: 3.0.3
info:
  title: pentest-tools.com REST API
  version: 1.0.1.1
servers:
  - url: https://app.pentest-tools.com/api/v2
security:
  - bearerAuth: []
tags:
  - name: targets
    x-displayName: Targets
    description: Operations done on Targets
  - name: scans
    x-displayName: Scans
    description: Operations done on Scans
  - name: workspaces
    x-displayName: Workspaces
    description: Operations done on Workspaces
  - name: http_loggers
    x-displayName: HTTP Loggers
    description: Operations done on HTTP Loggers
  - name: wordlists
    x-displayName: Wordlists
    description: Operations done on Wordlists
  - name: finding_templates
    x-displayName: Finding Templates
    description: Operations done on Finding Templates
  - name: vpn_profiles
    x-displayName: VPN Profiles
    description: Operations done on VPN Profiles
  - name: findings
    x-displayName: Findings
    description: Operations done on Findings
  - name: reports
    x-displayName: Reports
    description: Operations done on Reports
paths:
  /reports:
    post:
      tags:
        - reports
      summary: Create a report
      operationId: create_report
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReport'
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    properties:
                      report_id:
                        type: integer
                        example: 123456
                        description: The ID of the report that is being generated
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '422':
          $ref: '#/components/responses/UnprocessableEntityError'
        '429':
          $ref: '#/components/responses/TooManyRequestsError'
        '500':
          description: Internal server error
components:
  schemas:
    CreateReport:
      type: object
      required:
        - format
        - group_by
        - source
        - resources
      properties:
        format:
          type: string
          enum:
            - pdf
            - html
            - json
            - csv
            - xlsx
            - docx
        group_by:
          type: string
          enum:
            - target
            - vulnerability
        source:
          type: string
          enum:
            - scans
            - findings
        resources:
          type: array
          items:
            type: integer
          description: >-
            The IDs of the resources to include in the report. Use finding IDs
            if the source parameter is set to `findings`, or scan IDs if the
            source parameter is set to `scans`.
        filters:
          type: object
          properties:
            include_finding_history:
              type: boolean
              default: false
            include_all_targets:
              type: boolean
              default: false
            include_how_to_reproduce:
              type: boolean
              default: true
            include_false_positives:
              type: boolean
              default: false
            include_info:
              type: boolean
              default: true
            include_not_verified:
              type: boolean
              default: true
            include_ignored:
              type: boolean
              default: false
            include_accepted:
              type: boolean
              default: true
            include_fixed:
              type: boolean
              default: true
            include_tool_configuration:
              type: boolean
              default: true
        webhook_url:
          type: string
          format: url
          nullable: true
    ErrorResponse:
      type: object
      additionalProperties: false
      properties:
        status:
          type: integer
          example: 401
        message:
          type: string
          example: No API key specified
  responses:
    UnauthorizedError:
      description: API key is missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ForbiddenError:
      description: You can"t perform this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnprocessableEntityError:
      description: Invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequestsError:
      description: Too many requests made in a short period of time
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Use the "API key" from the [profile
        page](https://app.pentest-tools.com/account/api) as the token

````