REST APIeasy-svg/v1/library/delete

easy-svg/v1/library/delete

Permanently deletes one icon.

REST endpoint · Easy SVG · Status: Internal · Defined in includes/panel.php

Internal: not part of the promised public surface. It may change without notice.

Usage

POST /wp-json/easy-svg/v1/library/delete

Example

curl -X POST https://example.com/wp-json/easy-svg/v1/library/delete \
	-H 'Content-Type: application/json' \
	-H 'X-WP-Nonce: <nonce>' \
	-d '{"id":42}'

Description

Only an esw_icon post can be deleted; any other id answers 404 easy_svg_no_icon. The post is deleted with force, so it skips the trash.

Permission: manage_options (easy_svg_panel_rest_permission)

Parameters

body
idinteger
Required

The icon post id, minimum 1.

Response

items (id, slug, label, content), total and truncated. The list is capped at 500 icons.

{
  "items": [],
  "total": 0,
  "truncated": false
}
There is no undo. Pages and Icon blocks that use the slug render nothing afterwards. The handler reads the JSON body only; send Content-Type: application/json. Values in the query string are ignored by the handler.