---
title: "Create new work order"
method: POST
path: "/workorders"
tags: ["Work Orders"]
---

# Create new work order

`POST /workorders`

## Query parameters

- `skipWebhook` boolean — Set skipWebhook=true to skip all webhooks upon successful work order creation.
- `skipWebhook` boolean

## Headers

- `x-organization-id` integer

## Request body

- object
  - `assetId` integer, nullable
  - `assignees` object[] — Either the teamId, the userId or the user email address
    - `type` 'USER' | 'TEAM', required
    - `id` union, required
      - integer
      - string
  - `estimatedTime` integer, nullable — The estimated time taken in seconds to complete the work order
  - `requesterId` union — ID or email of the user who requested the work order
    - integer, nullable
    - string
  - `workRequestId` integer, nullable — ID of the Work Request that will be approved by the creation of this work order
  - `workOrderTemplateId` integer, nullable — ID of the Work Order Template that will be used to create this work order. Note that data from the payload will overwrite the Template data. Also, restrictions defined by the Template (EG: Required/Hidden/Read-Only fields) will apply.
  - `categories` string[] — List of categories that identify the work order
  - `description` string, nullable
  - `dueDate` string, date-time, nullable — Date & time at which the work order is due
  - `externalData` union — Extra data that can be attached to the work order, for example to help reference to a matching record in an external system.
    - object
    - number
    - string
  - `isParent` boolean, nullable — Whether the work order is a parent work order. A parent work order has only a subset of the standard work order fields. It also has fields that aren't included in a standard work order. <a href='https://help.getmaintainx.com/multi-asset-work-orders?utm_source=mx-api-docs&utm_medium=web&utm_campaign=multi-asset-work-orders&utm_id=maintainx' target='_blank'>Learn more</a></br>Mutually exclusive with **parentId**
  - `startDate` string, date-time, nullable — Date & time at which the work order will show up in the inbox</br>Only valid when <b>dueDate</b> is set
  - `locationId` integer, nullable — Global ID of the location assigned to the work order
  - `priority` 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH'
  - `procedure` object, nullable
    - `id` number — You should favor 'procedureTemplateId' to attach a procedure template.
    - `title` string, required — Title of the procedure
    - `fields` object[], required — Steps of a procedure
      - `label` string, required
      - `type` 'NUMBER' | 'AMOUNT' | 'TEXT' | 'UNSUPPORTED' | 'HEADING' | 'FILE' | 'SIGNATURE' | 'MULTIPLE_CHOICE' | 'INSPECTION_CHECK' | 'YES_NO_NA' | 'CHECKBOX' | 'CHECKLIST' | 'METER' | 'DATE' | 'CYCLE_COUNT', required
      - `description` string, nullable
      - `choices` string[]
      - `urls` object[]
        - `label` string — Label of the url
        - `link` string, required — Link
      - `meterId` number, nullable — Id of the meter
      - `isDateAndTime` boolean — Indicate if a DATE field also contains the time
      - `index` number — Order which the row is displayed
  - `procedureTemplateId` number, nullable — ID of the procedure template to attach
  - `repeatability` union
    - object, nullable
      - `type` 'DAILY', required
      - `automationMeterTrigger` object, nullable — Automation meter trigger configuration
        - `automationTriggerInput` object
          - `conditions` object[], required — Conditions to trigger automation
            - `operator` 'increasedBy' | 'decreasedBy', required — Operator for the condition
            - `value` number, required — Value for the condition
          - `meterId` integer, required — ID of the meter to trigger the automation
        - `lastTriggerValue` number — Last trigger value for the meter
        - `newDueDateOffsetSeconds` integer — Offset in seconds for new due date. If you want to set the due date to 2 days from now set this to 172800 - (24 * 60 * 60 * 2)
    - object, nullable
      - `type` 'WEEKLY', required
      - `interval` integer — Number of weeks between events
      - `days` string[], required — Days of the week the event will occur
      - `automationMeterTrigger` object, nullable — Automation meter trigger configuration
        - `automationTriggerInput` object
          - `conditions` object[], required — Conditions to trigger automation
            - `operator` 'increasedBy' | 'decreasedBy', required — Operator for the condition
            - `value` number, required — Value for the condition
          - `meterId` integer, required — ID of the meter to trigger the automation
        - `lastTriggerValue` number — Last trigger value for the meter
        - `newDueDateOffsetSeconds` integer — Offset in seconds for new due date. If you want to set the due date to 2 days from now set this to 172800 - (24 * 60 * 60 * 2)
    - object, nullable
      - `type` 'MONTHLY', required
      - `interval` integer — Number of months between events
      - `day` integer, required — Day of the month the event will occur
      - `automationMeterTrigger` object, nullable — Automation meter trigger configuration
        - `automationTriggerInput` object
          - `conditions` object[], required — Conditions to trigger automation
            - `operator` 'increasedBy' | 'decreasedBy', required — Operator for the condition
            - `value` number, required — Value for the condition
          - `meterId` integer, required — ID of the meter to trigger the automation
        - `lastTriggerValue` number — Last trigger value for the meter
        - `newDueDateOffsetSeconds` integer — Offset in seconds for new due date. If you want to set the due date to 2 days from now set this to 172800 - (24 * 60 * 60 * 2)
    - object, nullable
      - `type` 'YEARLY', required
      - `interval` integer — Number of years between events
      - `automationMeterTrigger` object, nullable — Automation meter trigger configuration
        - `automationTriggerInput` object
          - `conditions` object[], required — Conditions to trigger automation
            - `operator` 'increasedBy' | 'decreasedBy', required — Operator for the condition
            - `value` number, required — Value for the condition
          - `meterId` integer, required — ID of the meter to trigger the automation
        - `lastTriggerValue` number — Last trigger value for the meter
        - `newDueDateOffsetSeconds` integer — Offset in seconds for new due date. If you want to set the due date to 2 days from now set this to 172800 - (24 * 60 * 60 * 2)
    - object, nullable
      - `type` 'PERIODICALLY', required
      - `interval` integer — Number of seconds between events
      - `automationMeterTrigger` object, nullable — Automation meter trigger configuration
        - `automationTriggerInput` object
          - `conditions` object[], required — Conditions to trigger automation
            - `operator` 'increasedBy' | 'decreasedBy', required — Operator for the condition
            - `value` number, required — Value for the condition
          - `meterId` integer, required — ID of the meter to trigger the automation
        - `lastTriggerValue` number — Last trigger value for the meter
        - `newDueDateOffsetSeconds` integer — Offset in seconds for new due date. If you want to set the due date to 2 days from now set this to 172800 - (24 * 60 * 60 * 2)
  - `skipRestHook` boolean — When work order is created, will not trigger any rest hook that is subscribed
  - `title` string, required
  - `type` 'OTHER' | 'REACTIVE' | 'PREVENTIVE' — Valid types of Work Orders.
  - `extraFields` object — Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: "Estimated Time Allotted")
  - `vendorIds` number[] — Vendor IDs
  - `partsUsed` object[] — Parts IDs and quantities used in this work order
    - `partId` integer, required — Global ID of the part
    - `quantityUsed` integer, required — Quantity used in the work order.
    - `locationId` integer, nullable — Global ID of the location of the part
    - `copyOnRecurring` 'NoCopy' | 'Copy' | 'Default' — Indicates if the parts will be copied to the next work order in the chain (if applicable).
  - `parentId` number, nullable — ID of the parent work order. If provided, the work order will be created as a sub-work order under this parent work order. Sub-work orders inherit most of their fields from the parent work order. <a href='https://help.getmaintainx.com/create-and-manage-sub-work-orders?utm_source=mx-api-docs&utm_medium=web&utm_campaign=create-and-manage-sub-work-orders&utm_id=maintainx' target='_blank'>Learn more</a></br>Mutually exclusive with **isParent**

## Response `200`

Successfully created work order

- object
  - `id` number, required

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