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

# create via scan

> create a code version via explorer scan, which will scan all whitelisted networks if a network is not passed



## OpenAPI

````yaml /api-reference/openapi.json post /codes/create/scan
openapi: 3.0.0
info:
  title: BevorAI API
  version: 1.0.0
servers: []
security: []
tags:
  - name: project
    description: Managing projects, which are used to group code versions
  - name: code
    description: >-
      Used for retrieving or creating smart contract references. Required for
      creating analyses.
  - name: analysis
    description: Managing security analyses
  - name: chat
    description: Chat functionality for interacting with audit results
paths:
  /codes/create/scan:
    post:
      tags:
        - code
      summary: create via scan
      description: >-
        create a code version via explorer scan, which will scan all whitelisted
        networks if a network is not passed
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              properties:
                project_id:
                  title: Project Id
                  type: string
                is_private:
                  type: boolean
                  nullable: true
                parent_id:
                  type: string
                  nullable: true
                network:
                  $ref: '#/components/schemas/NetworkEnum'
                  nullable: true
                  description: Network the contract is deployed on
                address:
                  description: Contract address if source_type is SCAN
                  title: Address
                  type: string
              required:
                - project_id
                - address
              title: ContractScanBody
              type: object
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                properties:
                  id:
                    title: Id
                    type: string
                  status:
                    $ref: '#/components/schemas/CodeVersionStatusEnum'
                required:
                  - id
                  - status
                title: CreateCodeMappingResponse
                type: object
        '400':
          description: Error Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - BearerAuth: []
components:
  schemas:
    NetworkEnum:
      enum:
        - eth
        - bsc
        - polygon
        - base
        - avax
        - mode
        - arb
        - eth_sepolia
        - bsc_test
        - polygon_amoy
        - base_sepolia
        - avax_fuji
        - mode_testnet
        - arb_sepolia
      title: NetworkEnum
      type: string
    CodeVersionStatusEnum:
      enum:
        - waiting
        - parsing
        - parsed
        - failed_parsing
        - embedding
        - failed_embedding
        - success
      title: CodeVersionStatusEnum
      type: string
    ApiError:
      properties:
        code:
          enum:
            - auth.session_expired
            - auth.session_revoked
            - auth.session_invalid
            - auth.user_does_not_exist
            - auth.invalid_team_membership
            - auth.unauthorized
            - auth.key_revoked
            - auth.key_invalid
            - auth.payment_required
            - error.not_found
            - error.validation
            - error.server
            - error.invalid_scope
            - error.limit
            - error.entity_deletedcompiler.error
            - compiler.validation_error
            - compiler.authorization_error
            - compiler.not_found_error
            - compiler.invalid_version_error
            - compiler.old_version_error
            - explorer.contract_not_verified_error
            - explorer.contract_not_found_error
            - explorer.contract_fetch_error
            - compiler.internal_error
            - compiler.binary_error
            - compiler.compiler_error
            - ast.invalid_node
            - ast.invalid_reference
          title: Code
          type: string
        message:
          title: Message
          type: string
      required:
        - code
        - message
      title: ApiError
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key in Bearer token format

````