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

# Upload Code Repository

> Manually upload a repository zip file.

**Required Scope:** `write:repo`
**Security:** Organization-level access control



## OpenAPI

````yaml api-reference/openapi.json post /api/upload
openapi: 3.1.0
info:
  title: Enforster AI API
  description: Enforster AI API for code analysis and security scanning.
  version: 1.8.0
servers: []
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /api/upload:
    post:
      summary: Upload Code Repository
      description: |-
        Manually upload a repository zip file.

        **Required Scope:** `write:repo`
        **Security:** Organization-level access control
      operationId: upload_code_repo_api_upload_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_code_repo_api_upload_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    Body_upload_code_repo_api_upload_post:
      properties:
        file:
          type: string
          format: binary
          title: File
        repo_name:
          type: string
          title: Repo Name
        branch_name:
          type: string
          title: Branch Name
      type: object
      required:
        - file
        - repo_name
        - branch_name
      title: Body_upload_code_repo_api_upload_post
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Use an API key in the X-API-Key header.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Clerk JWT bearer token.

````