REST APIeasy-svg-pro/v1/presets

easy-svg-pro/v1/presets

Returns the catalog of ready made icon sets offered by UnleashWP.

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

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

Usage

GET /wp-json/easy-svg-pro/v1/presets

Example

curl -X GET "https://example.com/wp-json/easy-svg-pro/v1/presets?refresh=1" \
	-H "X-WP-Nonce: $NONCE" -b "$COOKIES"

Description

Fetches the preset catalog from UnleashWP and caches it for an hour. An empty presets list means the server really said so; every other state carries a message, so could not ask is never shown as none. Pass refresh to skip the cache.

Permission: manage_options and an active licence with the Preset icon sets feature switched on under Icons, Features.

Parameters

query
refreshboolean

Ask UnleashWP again rather than using the cached answer.

Return value

returnobject

{state, presets: [{slug, label, icons, bytes, sha256, url, version, about}], at, cached, message}. state is ok, unavailable, unauthorised, unreadable or no_token.

Response

{state, presets: [{slug, label, icons, bytes, sha256, url, version, about}], at, cached, message}. state is ok, unavailable, unauthorised, unreadable or no_token.

{
  "state": "ok",
  "presets": [
    {
      "slug": "lucide-ui",
      "label": "Lucide UI",
      "icons": 120,
      "bytes": 84213,
      "sha256": "...",
      "url": "https://updates.unleash-wp.com/...",
      "version": "1",
      "about": ""
    }
  ],
  "at": 1792800000,
  "cached": true,
  "message": ""
}