Create preset
POST
/wp-json/wp2/elementor-style-presets/v1/presets
const url = 'https://example.com/wp-json/wp2/elementor-style-presets/v1/presets';const options = { method: 'POST', headers: {'X-WP-Nonce': '<X-WP-Nonce>', 'Content-Type': 'application/json'}, body: '{"widget_type":"example","name":"example","settings":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”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"}Responses
Section titled “Responses”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": {}}