Skip to content

Create preset

POST
/wp-json/wp2/elementor-style-presets/v1/presets
curl --request POST \
--url https://example.com/wp-json/wp2/elementor-style-presets/v1/presets \
--header 'Content-Type: application/json' \
--header 'X-WP-Nonce: <X-WP-Nonce>' \
--data '{ "widget_type": "example", "name": "example", "settings": "example" }'

Creates or updates a preset: widget_type, name, and settings (JSON string of widget settings).

Media typeapplication/json
object
widget_type
required

Elementor widget type.

string
name
required

Human-readable name.

string
settings
required

JSON string

string
Example
{
"widget_type": "example",
"name": "example",
"settings": "example"
}

OK

Media typeapplication/json
object
id

Numeric entity id.

integer
name

Human-readable name.

string
widget_type

Elementor widget type.

string
settings

Preset settings (JSON string).

object
Examplegenerated
{
"id": 1,
"name": "example",
"widget_type": "example",
"settings": {}
}

Not authenticated. WordPress REST: rest_not_logged_in / rest_forbidden. Use cookie + X-WP-Nonce or Application Password.

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}

Insufficient capability or invalid REST nonce. WordPress REST: rest_forbidden / rest_cookie_invalid_nonce.

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}