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

# Update a model

> Update model metadata. Does not modify the model's node tree - use create_version for that.



## OpenAPI

````yaml PATCH /models/{model_id}
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /models/{model_id}:
    patch:
      summary: Update a model
      description: >-
        Update model metadata. Does not modify the model's node tree - use
        create_version for that.
      operationId: update-model
      parameters:
        - name: model_id
          in: path
          description: Model friendly ID (e.g., mdl_abc123def456)
          schema:
            type: string
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: object
                  properties:
                    cadence:
                      type: string
                      description: Calculation cadence
                    partition_type:
                      type: string
                      description: How data is partitioned
                    production_accounting_ledger_id:
                      type: integer
                      description: Link to a production accounting ledger
            examples:
              Result:
                value:
                  model:
                    cadence: monthly
                    partition_type: feedstock
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: mdl_abc123def456
                    name: Carbon Calculation Model
                    version: 1
                    is_latest: true
                    cadence: monthly
                    partition_type: feedstock
                    order: 1
                    created_at: '2025-01-15T10:00:00.000Z'
                    updated_at: '2025-01-15T12:00:00.000Z'
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  version:
                    type: integer
                  is_latest:
                    type: boolean
                  cadence:
                    type: string
                  partition_type:
                    type: string
                  order:
                    type: integer
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '404':
          description: '404'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: error
                    statusCode: 404
                    errors:
                      - message: record not found
              schema:
                type: object
                properties:
                  status:
                    type: string
                  statusCode:
                    type: integer
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````