---
title: "Delete an image"
description: "Remove an image from the library. `DELETE /api/v1/library-images/{id}`"
url: https://www.unitpost.com/docs/platform/delete-library-images-id
section: "Platform API reference"
updated: 2026-10-13
---
# Delete an image

`DELETE /api/v1/library-images/{id}`

Remove an image from the library. While a template, a campaign or sent mail uses it, the answer is `409 resource_in_use` naming them (`details[]`); `force=true` deletes it anyway, as the dashboard's "Delete anyway" does: those emails then show a broken image wherever it isn't cached yet. Requires the `templates:write` capability.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | — |
| `force` | query | string | no | `true` deletes an image that's in use. One of: `true`, `false`. |

## Responses

| Status | Description |
| --- | --- |
| 204 | Deleted. |
| 401 | Missing or invalid API key. |
| 403 | Insufficient scope; or `force=true` on the workspace's logo or image, or a graphic pinned to a Brand Kit profile, without `branding:write`, since deleting it changes them. |
| 404 | Image not found. |
| 409 | The image is in use (`resource_in_use`, `details[]` names where), or the workspace is protected. |
| 422 | A bad `force`, or an unknown query key. |

## Example request

```bash
curl -X DELETE 'https://www.unitpost.com/api/v1/library-images/img_123' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0'
```

## Links

- HTML reference (with Node.js, Python, Ruby, PHP, Laravel, Go, Java, Rust, .NET and CLI examples): https://www.unitpost.com/docs/platform/delete-library-images-id
- OpenAPI 3.1 (full schemas): https://www.unitpost.com/api/v1/openapi.json
