REST APIeasy-svg-pro/v1/sets/create

easy-svg-pro/v1/sets/create

Creates a new, empty, published icon set and answers with its collection slug.

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

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

Usage

POST /wp-json/easy-svg-pro/v1/sets/create

Example

curl -u admin:app-password -H 'Content-Type: application/json' -d '{"label":"ACME"}' https://example.com/wp-json/easy-svg-pro/v1/sets/create

Description

The label is stripped of markup, whitespace collapsed and cut to 100 characters; an empty result answers 400 easy_svg_pro_set_name. The slug is made from it once and never changes later, so templates calling the set keep working after a rename. 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

body
labelstring
Required

The name of the new set.

Return value

returnWP_REST_Response|WP_Error

id, label and collection, the slug the set registers under.

Response

id, label and collection, the slug the set registers under.

{
  "id": 42,
  "label": "ACME",
  "collection": "acme"
}