---
title: "Delete a work order attachment"
method: DELETE
path: "/workorders/{workOrderId}/attachments/{attachmentId}"
tags: ["Attachments"]
---

# Delete a work order attachment

`DELETE /workorders/{workOrderId}/attachments/{attachmentId}`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/workorders/{workOrderId}/attachments/{attachmentId}`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/workorders/:workOrderId/attachments/:attachmentId/delete.ts> (a function with typed inputs; its response is checked against the schema)

Removes an attachment from the specified work order. Returns the work order ID in the response. Removing an attachment from the work order using this method creates a system note for this work order. 
            <br />This method is available for subscribers and providers.
            <br />***Note***: Deleting an attachment from the work order doesn’t remove this attachment from the ServiceChannel database.

## Path parameters

- `workOrderId` integer, required
- `attachmentId` integer, required

## Response `200`

Attachment is successfully removed from the work order.

- ServiceChannelServicesWebApiModelsResponseAttachmentsDeleteWorkOrderAttachmentResponse
  - `WorkOrderId` integer: Unique numeric identifier of the work order the attachment was removed from.

## Other responses

- `400`: The request was not accepted due to bad syntax, missing parameters, insufficient data, etc. <br/>Error codes: 503 — Data not found. The work order or attachment are not found in the database
- `401`: The requested resource requires authentication. <br/>Error codes: 504 - API call rejected by security permissions
- `403`: You are not authorized to request this resource, or the resource is unavailable for some reason. <br/>Error codes: 100 — User has no rights to perform this action
- `500`: Something went wrong, and the server was unable to complete your request.

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
