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

> Trustblock API route to create a new audit

# Create a new audit



## OpenAPI

````yaml post /v1/audit
openapi: 3.0.0
info:
  title: TrustBlock Audit API
  version: 1.0.0
servers:
  - url: https://api.trustblock.run
security: []
paths:
  /v1/audit:
    post:
      summary: Create a new audit
      operationId: createAudit
      parameters:
        - in: header
          name: Content-Type
          required: true
          schema:
            type: string
            enum:
              - application/json
          example: application/json
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - title: File Report
                  required:
                    - reportFileCid
                    - reportType
                  properties:
                    reportFileCid:
                      type: string
                    reportType:
                      type: string
                      enum:
                        - file
                - title: Web Report
                  required:
                    - reportUrl
                    - reportType
                  properties:
                    reportUrl:
                      type: string
                    reportType:
                      type: string
                      enum:
                        - web
              type: object
              required:
                - name
                - description
                - project
                - contracts
                - issues
                - conductedAt
              properties:
                name:
                  type: string
                description:
                  type: string
                conductedAt:
                  type: number
                reportFileCid:
                  type: string
                project:
                  type: object
                  required:
                    - links
                    - name
                    - tags
                    - chains
                  properties:
                    links:
                      type: object
                      required:
                        - website
                      properties:
                        website:
                          type: string
                        twitter:
                          type: string
                          nullable: true
                        discord:
                          type: string
                          nullable: true
                        telegram:
                          type: string
                          nullable: true
                        github:
                          type: string
                          nullable: true
                        youtube:
                          type: string
                          nullable: true
                        linkedIn:
                          type: string
                          nullable: true
                    email:
                      type: string
                    name:
                      type: string
                    tags:
                      type: array
                      items:
                        $ref: '#/components/schemas/Tag'
                    chains:
                      type: array
                      items:
                        $ref: '#/components/schemas/Chain'
                contracts:
                  type: array
                  items:
                    oneOf:
                      - $ref: '#/components/schemas/OnChainContract'
                      - $ref: '#/components/schemas/OffChainContract'
                      - $ref: '#/components/schemas/PrivateContract'
                issues:
                  type: array
                  items:
                    $ref: '#/components/schemas/Issue'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  extra:
                    type: object
                    properties:
                      requestId:
                        type: string
                        description: The request id
                  id:
                    type: string
                    description: ID of the new audit
                required:
                  - extra
                  - id
        '400':
          description: Bad request
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '413':
          description: Payload Too Large
        '500':
          description: Internal Server Error
      security:
        - Bearer: []
components:
  schemas:
    Tag:
      type: string
      enum:
        - analytics
        - collectibles
        - finance
        - gaming
        - security
        - social
        - wallet
        - other
    Chain:
      type: string
      enum:
        - ethereum
        - polygon
        - avalanche
        - bnbchain
        - arbitrum
        - optimism
        - fantom
        - zksync
        - base
        - polygonZkEvm
        - scroll
        - blast
        - starknet
        - solana
        - stellar
        - sui
        - tron
        - injective
      description: Supported blockchain chains.
    OnChainContract:
      title: On Chain Contract
      type: object
      required:
        - type
        - chain
        - address
      properties:
        type:
          type: string
          enum:
            - onChain
        chain:
          type: string
        address:
          type: string
    OffChainContract:
      title: Public Repository Contract
      type: object
      required:
        - type
        - repositoryUrl
        - repositoryCommitHash
        - repositoryFilePath
      properties:
        type:
          type: string
          enum:
            - offChainPublic
        repositoryUrl:
          type: string
        repositoryCommitHash:
          type: string
        repositoryFilePath:
          type: string
    PrivateContract:
      title: Private Repository Contract
      type: object
      required:
        - type
        - name
      properties:
        type:
          type: string
          enum:
            - offChainPrivate
        name:
          type: string
    Issue:
      type: object
      required:
        - name
        - description
        - status
        - severity
      properties:
        name:
          type: string
        description:
          type: string
        status:
          type: string
        severity:
          type: string
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````