> ## 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.

# Add a plant



## OpenAPI

````yaml /mintlify-demo/v1.1/api-reference/openapi.yaml post /plants
openapi: 3.0.3
info:
  title: Plant Care API
  version: 1.0.0
  description: A simple API for managing houseplants.
servers:
  - url: http://localhost:3000
security: []
paths:
  /plants:
    post:
      summary: Add a plant
      operationId: createPlant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePlantRequest'
      responses:
        '201':
          description: Plant created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plant'
        '400':
          description: Missing required fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreatePlantRequest:
      type: object
      required:
        - name
        - species
      properties:
        name:
          type: string
          example: Monstera
        species:
          type: string
          example: Monstera deliciosa
        wateringFrequencyDays:
          type: integer
          example: 7
          default: 7
    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
    Error:
      type: object
      properties:
        error:
          type: string
          example: Plant not found

````