> ## 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 Composer Prefs

> Upsert the current user's composer prefs for this project.
Every field is independently optional — omitted fields preserve
their current value. ``clear_fields`` lets the caller explicitly
blank a column back to NULL (otherwise the missing-vs-null ambiguity
on JSON decode would prevent that).



## OpenAPI

````yaml /openapi.json put /api/projects/{project_id}/composer-prefs
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}/composer-prefs:
    put:
      tags:
        - public
      summary: Update Composer Prefs
      description: |-
        Upsert the current user's composer prefs for this project.
        Every field is independently optional — omitted fields preserve
        their current value. ``clear_fields`` lets the caller explicitly
        blank a column back to NULL (otherwise the missing-vs-null ambiguity
        on JSON decode would prevent that).
      operationId: update_composer_prefs_api_projects__project_id__composer_prefs_put
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            format: uuid
            title: Project Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComposerPrefsUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComposerPrefsResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    ComposerPrefsUpdate:
      description: |-
        Partial update. Every field is independently optional — omitted
        fields preserve their current row value. The Odoo / model fields
        accept ``null`` explicitly to clear back to "no opinion" (next
        fresh task falls through to the hard-coded composer default).
      properties:
        active_odoo_credential_ids:
          anyOf:
            - items:
                format: uuid
                type: string
              type: array
            - type: 'null'
          title: Active Odoo Credential Ids
        active_odoo_tier_overrides:
          anyOf:
            - additionalProperties:
                type: string
              propertyNames:
                format: uuid
              type: object
            - type: 'null'
          title: Active Odoo Tier Overrides
        clear_fields:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Clear Fields
        develop:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Develop
        model_tier:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Tier
        onboard_odoo_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Onboard Odoo Enabled
        plan_first:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Plan First
      title: ComposerPrefsUpdate
      type: object
    ComposerPrefsResponse:
      description: |-
        Per-user per-project composer "+" menu state — the full set of
        persisted task-level settings (Plan First, Code Mode, model tier,
        Odoo env selection + tier downgrades, onboard-Odoo toggle). Wire
        shape is snake_case; the frontend hook adapts to camelCase.
      properties:
        active_odoo_credential_ids:
          anyOf:
            - items:
                format: uuid
                type: string
              type: array
            - type: 'null'
          title: Active Odoo Credential Ids
        active_odoo_tier_overrides:
          anyOf:
            - additionalProperties:
                type: string
              propertyNames:
                format: uuid
              type: object
            - type: 'null'
          title: Active Odoo Tier Overrides
        develop:
          title: Develop
          type: boolean
        model_tier:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Tier
        onboard_odoo_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Onboard Odoo Enabled
        plan_first:
          title: Plan First
          type: boolean
      required:
        - plan_first
        - develop
      title: ComposerPrefsResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      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

````