Delete an image

Delete an image

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

DELETE /library-images/{id}
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'

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.

Parameters2 fields
FieldTypeDescription
idrequiredstring · path—
forcestring · query`true` deletes an image that's in use.
204401403404409422

Search docs and guides

Search the docs and product guides.