easy-svg-pro/v1/sets/{id}/import
Parses an uploaded ZIP of SVGs or an SVG icon font into sanitized icons for one set, without saving them.
REST endpoint · Easy SVG Pro · Status: Internal · Defined in includes/core/rest.php
Usage
POST /wp-json/easy-svg-pro/v1/sets/{id}/import
Example
curl -u admin:app-password -F 'file=@icons.zip' https://example.com/wp-json/easy-svg-pro/v1/sets/42/import
Description
Send the file as multipart under the field name file. A name ending in .zip is read as an archive, capped by easy_svg_pro_import_max_entries and easy_svg_pro_import_max_total_bytes; anything else is read as an SVG font, capped by easy_svg_pro_import_font_max_bytes (413 easy_svg_pro_file_too_large). The editor merges the answer into its state and the admin saves explicitly. Errors: 404 easy_svg_pro_no_set, 400 easy_svg_pro_no_file, 409 when the free plugin is missing or too old. Permission: Requires manage_options, an active licence and the editor feature (Icon set editor) switched on.
Permission: Requires manage_options, an active licence and the editor feature (Icon set editor) switched on.
Parameters
The icon set post id.
Multipart upload: a .zip of SVG files or an SVG font.
Return value
icons as a list of {slug, label, markup} and imported, their count. Nothing is stored.
Response
icons as a list of {slug, label, markup} and imported, their count. Nothing is stored.
{
"icons": [
{
"slug": "arrow",
"label": "Arrow",
"markup": "<svg ...></svg>"
}
],
"imported": 1
}