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

# Update Project

> Update a project. If `repositories` is provided, replaces all repos.

Accepts JSON ({name, odoo_version, odoo_edition, icon, color,
repositories}) — the existing shape — OR multipart/form-data with the
same scalar fields plus an optional ``icon_image`` file upload and a
``clear_icon_image=true`` flag to wipe the stored image. Multipart is
only used by the project settings page when uploading an icon image;
everything else keeps the JSON path.



## OpenAPI

````yaml /openapi.json put /api/projects/{project_id}
openapi: 3.1.0
info:
  description: >-
    Public CodeCobra API. Authenticate by sending a personal API key in the
    `Authorization: Bearer <key>` header. Generate keys from Settings → API keys
    in the CodeCobra dashboard.
  title: CodeCobra Public API
  version: 1.0.0
servers: []
security: []
paths:
  /api/projects/{project_id}:
    put:
      tags:
        - public
      summary: Update Project
      description: |-
        Update a project. If `repositories` is provided, replaces all repos.

        Accepts JSON ({name, odoo_version, odoo_edition, icon, color,
        repositories}) — the existing shape — OR multipart/form-data with the
        same scalar fields plus an optional ``icon_image`` file upload and a
        ``clear_icon_image=true`` flag to wipe the stored image. Multipart is
        only used by the project settings page when uploading an icon image;
        everything else keeps the JSON path.
      operationId: update_project_api_projects__project_id__put
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            format: uuid
            title: Project Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    ProjectResponse:
      properties:
        color:
          anyOf:
            - type: string
            - type: 'null'
          default: '#3B82F6'
          title: Color
        created_at:
          format: date-time
          title: Created At
          type: string
        has_icon_image:
          default: false
          title: Has Icon Image
          type: boolean
        icon:
          anyOf:
            - type: string
            - type: 'null'
          default: Box
          title: Icon
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
        odoo_edition:
          title: Odoo Edition
          type: string
        odoo_version:
          title: Odoo Version
          type: string
        organization_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Color
        organization_icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Icon
        organization_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Organization Id
        organization_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Name
        owner_type:
          default: user
          title: Owner Type
          type: string
        repositories:
          default: []
          items:
            $ref: '#/components/schemas/RepositoryResponse'
          title: Repositories
          type: array
        updated_at:
          format: date-time
          title: Updated At
          type: string
        user_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: User Id
      required:
        - id
        - name
        - odoo_version
        - odoo_edition
        - created_at
        - updated_at
      title: ProjectResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    RepositoryResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        directory_name:
          title: Directory Name
          type: string
        github_repository:
          title: Github Repository
          type: string
        id:
          format: uuid
          title: Id
          type: string
        production_branch:
          anyOf:
            - type: string
            - type: 'null'
          title: Production Branch
      required:
        - id
        - github_repository
        - directory_name
        - production_branch
        - created_at
      title: RepositoryResponse
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````