---
title: "Create or update work request by external ID"
method: PATCH
path: "/workrequests/external/{externalId}"
tags: ["Work Requests"]
---

# Create or update work request by external ID

`PATCH /workrequests/external/{externalId}`

## Request

- Base URL: `https://api.getmaintainx.com/v1`
- URL: `https://api.getmaintainx.com/v1/workrequests/external/{externalId}`
- Auth: HTTP bearer

Idempotent upsert keyed on the external ID in the path. If a work request has this external ID, it will be updated (and undeleted, if the work request was previously deleted). Otherwise, a new work request will be created with this external ID.

## Path parameters

- `externalId` string, required

## Query parameters

- `skipWebhook` boolean

## Headers

- `x-organization-id` integer

## Request body

- object
  - `title` string
  - `description` string, nullable
  - `priority` 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH'
  - `assetId` number, nullable
  - `locationId` number, nullable
  - `extraFields` object: Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: "Request Type")
  - `approverTeamId` number, nullable: ID of the team that is reponsible for approving the request.
  - `creatorContactInfo` string, nullable: The creator's contact information associated with this work order request. Possible types are `EMAIL`, `PHONE`, and `OTHER`, which will be inferred from the string provided

## Response `200`

Successfully updated work request

- object
  - `workRequest` object, required
    - `id` number, required: Global ID of the work request
    - `title` string, required
    - `attachments` object[]: List of attachments linked to the Work Request
      - `id` number, required: Global ID of the attachment
      - `mimeType` string, required: MIME type of the file
      - `fileName` string, required: Attachment's file name
      - `url` string, required: Url of the file. Valid for 60 minutes.
      - `createdAt` string, date-time, required: Date & time at which the attachment was uploaded
      - `width` number, nullable: Width if the file is an image
      - `height` number, nullable: Height if the file is an image
    - `thumbnail` object, nullable
      - `id` number, required: Global ID of the attachment
      - `mimeType` string, required: MIME type of the file
      - `fileName` string, required: Attachment's file name
      - `url` string, required: Url of the file. Valid for 60 minutes.
      - `createdAt` string, date-time, required: Date & time at which the attachment was uploaded
      - `width` number, nullable: Width if the file is an image
      - `height` number, nullable: Height if the file is an image
    - `priority` 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH', required
    - `description` string, nullable
    - `requestStatus` 'PENDING' | 'REJECTED' | 'APPROVED' | 'DONE', required
    - `assetId` number, nullable
    - `locationId` number, nullable
    - `workOrderId` number, nullable: Global ID of the work order attached to the work request. A work order is created once a work request is approved.
    - `sendEmailNotification` boolean
    - `extraFields` object: Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: "Request Type")
    - `approverTeamId` number, nullable: ID of the team that is reponsible for approving the request.
    - `creatorContactInfo` object, nullable: The creator's contact information associated with this work order request
      - `type` 'PHONE' | 'EMAIL' | 'OTHER'
      - `value` string
    - `createdAt` string, date-time: Date & time at which the work request was created
    - `updatedAt` string, date-time: Date & time at which the work request was last updated
    - `externalId` string, nullable: External ID for this work request, unique per organization.

## Other responses

- `201`: Successfully created work request
- `400`: OrganizationId was not provided
- `401`: Invalid token
- `404`: Could not find the specified work request.
- `409`: Conflict with existing work request

## Changes

> 30 revisions in range; 1 not diffed.

- **2026-10-01** `dff2bfdd78fa`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/getmaintainx/apis/maintainx-api/changes/workrequests/external/:externalId/patch.md)

---

[API](https://skmtc.dev/getmaintainx/apis/maintainx-api.md) - [All operations](https://skmtc.dev/getmaintainx/apis/maintainx-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getmaintainx/apis/maintainx-api/revisions/6258367c04ff?raw)
