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

# Create Maintenance Ticket

Create a maintenance ticket with description and optional photos. CasaAI will classify severity and category, then dispatch according to your rules.

<RequestExample>
  ```json theme={null}
  {
    "ticket_id": "mnt_10021",
    "unit_id": "unit_7C",
    "description": "Water leaking under the kitchen sink for two days",
    "photos": ["https://files.casaai.dev/img/leak1.jpg"],
    "priority_hint": "high"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "ticket_id": "mnt_10021",
    "unit_id": "unit_7C",
    "description": "Water leaking under the kitchen sink for two days",
    "severity": "urgent",
    "vendor_assigned": "vendor_plumb_pro"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /api/v1/maintenance
openapi: 3.1.0
info:
  title: CasaAI API
  description: >-
    APIs for properties, tenants, maintenance, workflows, agents, finance, and
    documents.
  version: 1.0.0
servers:
  - url: https://api.casaai.dev
security:
  - bearerAuth: []
paths:
  /api/v1/maintenance:
    post:
      summary: Create maintenance ticket
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewMaintenanceTicket'
      responses:
        '200':
          description: Ticket accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaintenanceTicket'
components:
  schemas:
    NewMaintenanceTicket:
      type: object
      required:
        - ticket_id
        - unit_id
        - description
      properties:
        ticket_id:
          type: string
        unit_id:
          type: string
        description:
          type: string
        photos:
          type: array
          items:
            type: string
        priority_hint:
          type: string
    MaintenanceTicket:
      type: object
      required:
        - ticket_id
        - unit_id
        - description
      properties:
        ticket_id:
          type: string
        unit_id:
          type: string
        description:
          type: string
        severity:
          type: string
          enum:
            - emergency
            - urgent
            - standard
        vendor_assigned:
          type: string
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````