---
title: "Create a maintenance plan"
method: POST
path: "/maintenanceplans"
tags: ["Maintenance Plans"]
---

# Create a maintenance plan

`POST /maintenanceplans`

## Query parameters

- `skipWebhook` boolean

## Headers

- `x-organization-id` integer

## Request body

- object
  - `name` string, required — Name of the maintenance plan.
  - `recurrence` union, required — The recurrence schedule configuration.
    - object
      - `type` 'DAILY', required
    - object
      - `type` 'WEEKLY', required
      - `interval` integer, required — Number of weeks between occurrences
      - `days` string[], required — Days of the week the event will occur
    - object
      - `type` 'MONTHLY', required
      - `interval` integer, required — Number of months between occurrences
      - `day` integer, required — Day of the month the event will occur
    - object
      - `type` 'YEARLY', required
      - `interval` integer, required — Number of years between occurrences
    - object
      - `type` 'PERIODICALLY', required
      - `interval` integer, required — Number of seconds after the previous due date. Required for plans whose intervalStrategy is FLOATING, and rejected for any other interval strategy.
  - `startDate` string, date-time — The first due date for generated work orders.
  - `workOrderBlueprintId` number, required — ID of the maintenance plan work order blueprint used to generate work orders. These can be created through the /maintenanceplans/workorderblueprints endpoint.
  - `workOrderStartDatePadding` number — Hours between the start date and due date of generated work orders. Deprecated: use workOrderStartDateOffset instead.
  - `workOrderStartDateOffset` object — Offset between the work order start date and the due date, expressed as a (value, unit) pair.
    - `value` number, required — The numeric value of the offset between the work order start date and the due date. Must be >= 1. Per-unit caps: HOUR <= 8760, DAY <= 365, WEEK <= 52.
    - `unit` 'HOUR' | 'DAY' | 'WEEK', required — The unit of the work order start date offset.
  - `planningHorizon` object, required — How far ahead to generate work orders.
    - `value` number, required — The numeric value of the planning horizon.
    - `unit` 'DAY' | 'WEEK' | 'MONTH' | 'YEAR', required — The unit of the planning horizon.
  - `planAssets` object[] — Assets to associate with this plan.
    - `assetId` number, required — ID of the asset.
  - `intervals` object[] — Multi-cycle intervals with different blueprints per cycle.
    - `interval` number, required — The cycle number at which this interval's blueprint is used.
    - `workOrderBlueprintId` number, required — ID of the maintenance plan work order blueprint for this cycle. These can be created through the /maintenanceplans/workorderblueprints endpoint.
  - `nextCycleOccurrence` number — Which cycle in the multi-cycle sequence comes next.

## Response `201`

Successfully created the maintenance plan.

- object
  - `id` number, required — ID of the created maintenance plan.

## Other responses

- `400` — OrganizationId was not provided
- `401` — Invalid token

---

[API](https://skmtc.net/getmaintainx/apis/maintainx-api.md) · [All operations](https://skmtc.net/getmaintainx/apis/maintainx-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getmaintainx/maintainx-api/revisions/ef9153fcac7c/schema)
