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

# Update a plant's watering schedule



## OpenAPI

````yaml /mintlify-demo/v2.0/api-reference/openapi.yaml patch /plants/{id}
openapi: 3.0.3
info:
  title: Plant Care API
  version: 2.0.0
  description: >-
    A simple API for managing houseplants. Version 2.0 adds single-plant
    retrieval, watering schedule updates, and last-watered tracking.
servers:
  - url: http://localhost:3000/v2
security: []
paths:
  /plants/{id}:
    patch:
      summary: Update a plant's watering schedule
      operationId: updatePlant
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the plant to update
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePlantRequest'
      responses:
        '200':
          description: Plant updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plant'
        '404':
          description: Plant not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdatePlantRequest:
      type: object
      properties:
        wateringFrequencyDays:
          type: integer
          example: 5
    Plant:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Monstera
        species:
          type: string
          example: Monstera deliciosa
        wateringFrequencyDays:
          type: integer
          example: 7
        lastWateredAt:
          type: string
          format: date-time
          nullable: true
          description: When the plant was last watered. Null if never recorded.
          example: '2026-07-28T09:30:00Z'
    Error:
      type: object
      properties:
        error:
          type: string
          example: Plant not found

````