### Install and Configure Plugins via AJAX
Source: https://context7.com/posimyth/uichemy/llms.txt
Automate the installation and configuration of required plugins like Elementor or The Plus Blocks directly from the dashboard.
```javascript
jQuery.ajax({
url: ajaxurl,
type: 'POST',
data: {
action: 'uich_uichemy',
nonce: uichemy_vars.nonce,
type: 'install_elementor'
},
success: function(response) {
console.log(response.message);
}
});
```
--------------------------------
### Get Bricks Configuration API
Source: https://context7.com/posimyth/uichemy/llms.txt
Retrieves the Bricks Builder configuration status.
```APIDOC
## GET /wp-json/uichemy/v2/bricks/get_config
### Description
Retrieves the Bricks Builder configuration status.
### Method
GET
### Endpoint
/wp-json/uichemy/v2/bricks/get_config
### Parameters
#### Query Parameters
None
#### Headers
- **UiChemy-Security-Token** (string) - Required - Your security token.
### Request Example
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v2/bricks/get_config" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
```
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the request was successful.
- **version** (string) - The version of Bricks Builder installed.
- **is_bricks_installed** (boolean) - Indicates if Bricks Builder is installed.
#### Response Example
```json
{
"success": true,
"version": "4.7.2",
"is_bricks_installed": true
}
```
```
--------------------------------
### GET /uichemy/v1/check
Source: https://context7.com/posimyth/uichemy/llms.txt
Verifies that the WordPress site is properly connected and the security token is valid.
```APIDOC
## GET /uichemy/v1/check
### Description
Verifies that the WordPress site is properly connected and the security token is valid. Use this endpoint to test connectivity before attempting imports.
### Method
GET
### Endpoint
/wp-json/uichemy/v1/check
### Parameters
#### Headers
- **UiChemy-Security-Token** (string) - Required - The security token provided by the UiChemy plugin.
### Request Example
curl -X GET "https://your-site.com/wp-json/uichemy/v1/check" -H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
### Response
#### Success Response (200)
- **success** (boolean) - Status of the connection.
- **message** (string) - Confirmation message.
#### Response Example
{
"success": true,
"message": "All Good."
}
```
--------------------------------
### Fetch Bricks Builder Configuration and Posts
Source: https://context7.com/posimyth/uichemy/llms.txt
Retrieves the installation status of Bricks Builder and a list of all pages and templates created within the builder.
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v2/bricks/get_config" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
curl -X GET "https://your-site.com/wp-json/uichemy/v2/bricks/get_posts" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
```
--------------------------------
### Check Recommended Settings via WordPress Filters
Source: https://context7.com/posimyth/uichemy/llms.txt
Verify the installation and activation status of required plugins and settings using the uich_recommended_settings filter.
```php
$result = apply_filters('uich_recommended_settings', 'elementor_install');
$result = apply_filters('uich_recommended_settings', 'flexbox_container');
$result = apply_filters('uich_recommended_settings', 'tpgb_install');
```
--------------------------------
### GET /uichemy/v2/elementor/get_config
Source: https://context7.com/posimyth/uichemy/llms.txt
Retrieves the current Elementor configuration including installed plugins and version info.
```APIDOC
## GET /uichemy/v2/elementor/get_config
### Description
Retrieves the current Elementor configuration including installed plugins, version info, and atomic elements status.
### Method
GET
### Endpoint
/wp-json/uichemy/v2/elementor/get_config
### Parameters
#### Headers
- **UiChemy-Security-Token** (string) - Required - The security token.
### Response
#### Success Response (200)
- **version** (string) - Elementor version.
- **is_elementor_pro_installed** (boolean) - Pro status.
- **is_elementor_installed** (boolean) - Installation status.
#### Response Example
{
"success": true,
"version": "4.7.2",
"is_elementor_pro_installed": true,
"is_elementor_installed": true
}
```
--------------------------------
### Get Bricks Posts API
Source: https://context7.com/posimyth/uichemy/llms.txt
Fetches all pages and templates built with Bricks Builder.
```APIDOC
## GET /wp-json/uichemy/v2/bricks/get_posts
### Description
Fetches all pages and templates built with Bricks Builder.
### Method
GET
### Endpoint
/wp-json/uichemy/v2/bricks/get_posts
### Parameters
#### Query Parameters
None
#### Headers
- **UiChemy-Security-Token** (string) - Required - Your security token.
### Request Example
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v2/bricks/get_posts" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
```
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the request was successful.
- **is_bricks_installed** (boolean) - Indicates if Bricks Builder is installed.
- **posts** (object) - Contains lists of Bricks posts.
- **page** (array) - List of Bricks pages.
- **bricks_template** (array) - List of Bricks templates.
#### Response Example
```json
{
"success": true,
"is_bricks_installed": true,
"posts": {
"page": [
{ "id": 50, "title": "Bricks Home" }
],
"bricks_template": [
{ "id": 51, "title": "Header Template" }
]
}
}
```
```
--------------------------------
### Get Bricks Globals
Source: https://context7.com/posimyth/uichemy/llms.txt
Retrieves the current global settings from Bricks Builder, including colors, typography, padding, shadows, and layout dimensions.
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v1/bricks/globals" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
```
--------------------------------
### Check UiChemy Connection Status (REST API)
Source: https://context7.com/posimyth/uichemy/llms.txt
Verifies the connection between the Figma plugin and the WordPress site by checking the validity of the security token. This endpoint is crucial for initial setup and troubleshooting connectivity issues.
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v1/check" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
# Expected response
{
"success": true,
"message": "All Good."
}
```
--------------------------------
### Get Bricks Globals
Source: https://context7.com/posimyth/uichemy/llms.txt
Retrieves global settings for Bricks Builder, including colors, typography, padding, shadow, border, and gap classes.
```APIDOC
## GET /wp-json/uichemy/v1/bricks/globals
### Description
Retrieves Bricks Builder's global settings.
### Method
GET
### Endpoint
/wp-json/uichemy/v1/bricks/globals
### Parameters
#### Headers
- **UiChemy-Security-Token** (string) - Required - Your security token for authentication.
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the operation was successful.
- **data** (object) - Contains the Bricks global settings.
- **width** (object) - Global width settings for different breakpoints.
- **colors** (array) - List of global color settings.
- **typography** (array) - List of global typography settings.
- **padding** (array) - List of global padding settings.
- **shadow** (array) - List of global shadow settings.
- **border** (array) - List of global border settings.
- **border_radius** (array) - List of global border radius settings.
- **gap** (array) - List of global gap settings.
#### Response Example
```json
{
"success": true,
"data": {
"width": { "desktop": "1100px", "tablet_portrait": "85%", "mobile_portrait": "90%" },
"colors": [
{ "id": "abc123", "hex": "#3B82F6", "name": "Primary Blue" }
],
"typography": [
{
"id": "typo1",
"name": "Body Text",
"value": {
"_typography": { "font-family": "Inter", "font-size": "16px" }
}
}
],
"padding": [],
"shadow": [
{
"id": "shadow1",
"name": "Card Shadow",
"value": { "offsetX": 0, "offsetY": 4, "blur": 12, "spread": 0, "color": { "hex": "#00000015" } }
}
],
"border": [],
"border_radius": [],
"gap": []
}
}
```
```
--------------------------------
### Get Elementor Configuration (REST API)
Source: https://context7.com/posimyth/uichemy/llms.txt
Retrieves the current configuration details for the Elementor page builder on your WordPress site. This includes information about installed Elementor versions, related plugins, and the status of atomic elements.
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v2/elementor/get_config" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
# Expected response
{
"success": true,
"version": "4.7.2",
"is_elementor_pro_installed": true,
"is_elementor_installed": true,
"isNexterInstalled": false,
"isAtomicEnable": true
}
```
--------------------------------
### Get Elementor Posts for Import (REST API)
Source: https://context7.com/posimyth/uichemy/llms.txt
Fetches a list of all posts, pages, and templates that have been created or are compatible with Elementor. This allows you to select existing Elementor content for potential updates or references.
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v2/elementor/get_posts" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
# Expected response
{
"success": true,
"is_elementor_pro_installed": true,
"is_elementor_installed": true,
"is_nexter_installed": false,
"posts": {
"elementor_library": [
{ "id": 123, "title": "Header Template" },
{ "id": 456, "title": "Footer Template" }
],
"page": [
{ "id": 789, "title": "Home Page" }
],
"nxt_builder": []
}
}
```
--------------------------------
### Get Gutenberg Configuration (REST API)
Source: https://context7.com/posimyth/uichemy/llms.txt
Retrieves the configuration settings for the WordPress Block Editor (Gutenberg). This endpoint provides information about supported block plugins and other relevant editor configurations.
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v2/gutenberg/get_config" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
```
--------------------------------
### Manage Import User via WordPress Filters
Source: https://context7.com/posimyth/uichemy/llms.txt
Manage the import user context using the uich_manage_usermanager filter. Allows getting, setting, or deleting the current user configuration.
```php
$user = apply_filters('uich_manage_usermanager', 'get_user');
apply_filters('uich_manage_usermanager', 'set_user', 'admin');
apply_filters('uich_manage_usermanager', 'delete_user');
```
--------------------------------
### Get Gutenberg Posts API
Source: https://context7.com/posimyth/uichemy/llms.txt
Fetches all pages and reusable blocks available in the Gutenberg editor.
```APIDOC
## GET /wp-json/uichemy/v2/gutenberg/get_posts
### Description
Fetches all pages and reusable blocks available in the Gutenberg editor.
### Method
GET
### Endpoint
/wp-json/uichemy/v2/gutenberg/get_posts
### Parameters
#### Query Parameters
None
#### Headers
- **UiChemy-Security-Token** (string) - Required - Your security token.
### Request Example
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v2/gutenberg/get_posts" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
```
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the request was successful.
- **is_tpag_installed** (boolean) - Indicates if TPAG is installed.
- **is_nexter_installed** (boolean) - Indicates if Nexter is installed.
- **is_spectra_installed** (boolean) - Indicates if Spectra is installed.
- **is_kadence_installed** (boolean) - Indicates if Kadence is installed.
- **is_generate_block_installed** (boolean) - Indicates if GenerateBlocks is installed.
- **posts** (object) - Contains lists of different post types.
- **wp_block** (array) - List of reusable blocks.
- **page** (array) - List of pages.
- **nxt_builder** (array) - List of Nexter builder content.
#### Response Example
```json
{
"success": true,
"is_tpag_installed": true,
"is_nexter_installed": false,
"is_spectra_installed": false,
"is_kadence_installed": true,
"is_generate_block_installed": false,
"posts": {
"wp_block": [
{ "id": 100, "title": "Hero Section Pattern" }
],
"page": [
{ "id": 200, "title": "About Page" }
],
"nxt_builder": []
}
}
```
```
--------------------------------
### Get Elementor Globals API
Source: https://context7.com/posimyth/uichemy/llms.txt
Retrieves Elementor's global colors, typography settings, and container width configurations.
```APIDOC
## GET /wp-json/uichemy/v1/elementor/globals
### Description
Retrieves Elementor's global colors, typography settings, and container width configurations.
### Method
GET
### Endpoint
/wp-json/uichemy/v1/elementor/globals
### Parameters
#### Query Parameters
None
#### Headers
- **UiChemy-Security-Token** (string) - Required - Your security token.
### Request Example
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v1/elementor/globals" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
```
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the request was successful.
- **typography** (array) - List of global typography settings.
- **id** (string) - The ID of the typography setting.
- **title** (string) - The title of the typography setting.
- **value** (object) - The typography values.
- **colors** (array) - List of global color settings.
- **id** (string) - The ID of the color setting.
- **title** (string) - The title of the color setting.
- **value** (string) - The color value (hex code).
- **container_width** (object) - Container width settings for different devices.
- **desktop** (object) - Desktop container width settings.
- **tablet** (object) - Tablet container width settings.
- **mobile** (object) - Mobile container width settings.
#### Response Example
```json
{
"success": true,
"typography": [
{
"id": "primary",
"title": "Primary",
"value": {
"typography_font_family": "Inter",
"typography_font_size": { "unit": "px", "size": 16 },
"typography_font_weight": "400"
}
}
],
"colors": [
{ "id": "primary", "title": "Primary", "value": "#6EC1E4" },
{ "id": "secondary", "title": "Secondary", "value": "#54595F" }
],
"container_width": {
"desktop": { "unit": "px", "size": 1140, "sizes": [] },
"tablet": { "unit": "%", "size": 85, "sizes": [] },
"mobile": { "unit": "%", "size": 90, "sizes": [] }
}
}
```
```
--------------------------------
### Get Elementor Classes and Variables
Source: https://context7.com/posimyth/uichemy/llms.txt
Retrieves Elementor's global CSS classes and variables when atomic elements are enabled.
```APIDOC
## GET /wp-json/uichemy/v1/elementor/classes_variables
### Description
Retrieves Elementor's global CSS classes and variables.
### Method
GET
### Endpoint
/wp-json/uichemy/v1/elementor/classes_variables
### Parameters
#### Headers
- **UiChemy-Security-Token** (string) - Required - Your security token for authentication.
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the operation was successful.
- **data** (object) - Contains the classes and variables.
- **classes** (array) - List of CSS classes.
- **variables** (array) - List of CSS variables.
#### Response Example
```json
{
"success": true,
"data": {
"classes": [...],
"variables": [...]
}
}
```
```
--------------------------------
### Get Elementor Classes and Variables
Source: https://context7.com/posimyth/uichemy/llms.txt
Fetches the current list of global CSS classes and variables defined in Elementor when atomic elements are active.
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v1/elementor/classes_variables" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
```
--------------------------------
### Import Content to Gutenberg
Source: https://context7.com/posimyth/uichemy/llms.txt
Creates or updates Gutenberg pages and reusable block patterns by sending block-formatted HTML content. The post type and title are specified via query parameters.
```bash
curl -X POST "https://your-site.com/wp-json/uichemy/v2/gutenberg/import?newImport=true&postType=page&postTitle=New%20Page%20From%20Figma" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: text/html" \
-d '
Welcome Section
This content was imported from Figma.
'
```
--------------------------------
### Import to Bricks API
Source: https://context7.com/posimyth/uichemy/llms.txt
Creates or updates Bricks Builder pages and templates with Figma-exported content.
```APIDOC
## POST /wp-json/uichemy/v2/bricks/import
### Description
Creates or updates Bricks Builder pages and templates with Figma-exported content.
### Method
POST
### Endpoint
/wp-json/uichemy/v2/bricks/import
### Parameters
#### Query Parameters
- **newImport** (boolean) - Required - Set to `true` to create a new import.
- **postType** (string) - Required - The type of post to create or update (e.g., `page`, `bricks`).
- **bricksPostSubType** (string) - Optional - Specifies the subtype for Bricks posts (e.g., `header`, `footer`, `section`, `popup`).
#### Headers
- **UiChemy-Security-Token** (string) - Required - Your security token.
- **Content-Type** (string) - Required - `application/json` for Bricks content.
#### Request Body
- **title** (string) - Required - The title of the Bricks post.
- **content** (array) - Required - An array representing the Bricks elements and their structure.
- **pageSettings** (object) - Optional - Settings for the Bricks page.
### Request Example
```bash
# Create new Bricks page
curl -X POST "https://your-site.com/wp-json/uichemy/v2/bricks/import?newImport=true&postType=page" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Bricks Page from Figma",
"content": [
{
"id": "brick1",
"name": "section",
"settings": {
"_background": { "color": { "hex": "#ffffff" } }
},
"children": ["brick2"]
},
{
"id": "brick2",
"name": "heading",
"parent": "brick1",
"settings": {
"text": "Hello from Figma",
"tag": "h1"
}
}
],
"pageSettings": {
"_bodyFont": { "family": "Inter" }
}
}'
# Create Bricks template (header, footer, section, popup, etc.)
curl -X POST "https://your-site.com/wp-json/uichemy/v2/bricks/import?newImport=true&postType=bricks&bricksPostSubType=header" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "Site Header", "content": [...] }'
```
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the import was successful.
- **id** (integer) - The ID of the created or updated Bricks post.
- **title** (string) - The title of the created or updated Bricks post.
#### Response Example
```json
{
"success": true,
"id": 75,
"title": "Bricks Page from Figma"
}
```
```
--------------------------------
### Fetch Gutenberg Posts and Templates
Source: https://context7.com/posimyth/uichemy/llms.txt
Retrieves a list of all pages and reusable blocks currently available in the Gutenberg editor. Requires a valid security token in the request header.
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v2/gutenberg/get_posts" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
```
--------------------------------
### Sync Bricks Globals
Source: https://context7.com/posimyth/uichemy/llms.txt
Synchronizes global style settings from Figma to Bricks Builder, including width, colors, typography, padding, shadows, borders, and gaps.
```APIDOC
## POST /wp-json/uichemy/v1/bricks/globals/sync
### Description
Synchronizes global style settings from Figma to Bricks Builder.
### Method
POST
### Endpoint
/wp-json/uichemy/v1/bricks/globals/sync
### Parameters
#### Headers
- **UiChemy-Security-Token** (string) - Required - Your security token for authentication.
- **Content-Type** (string) - Required - Should be `application/json`.
#### Request Body
- **width** (object) - Optional - Global width settings for different breakpoints.
- **colors** (array) - Optional - An array of color objects to add, set, or delete.
- **typography** (array) - Optional - An array of typography objects to add, set, or delete.
- **padding** (array) - Optional - An array of padding objects to add, set, or delete.
- **shadow** (array) - Optional - An array of shadow objects to add, set, or delete.
- **border** (array) - Optional - An array of border objects to add, set, or delete.
- **gap** (array) - Optional - An array of gap objects to add, set, or delete.
### Request Example
```json
{
"width": { "desktop": "1200px", "tablet_portrait": "90%", "mobile_portrait": "95%" },
"colors": [
{ "action": "ADD", "id": "newcolor1", "hex": "#10B981", "name": "Success Green" },
{ "action": "SET", "id": "existingcolor", "hex": "#EF4444", "name": "Error Red" }
],
"typography": [
{
"action": "ADD",
"value": {
"id": "typo_heading",
"name": "H1 Heading",
"value": {
"_typography": { "font-family": "Poppins", "font-size": "48px", "font-weight": "700" }
}
}
}
],
"shadow": [
{
"action": "ADD",
"value": {
"id": "shadow_lg",
"name": "Large Shadow",
"value": { "offsetX": 0, "offsetY": 10, "blur": 25, "spread": -5, "color": { "hex": "#00000020" } }
}
}
],
"border": [
{
"action": "ADD",
"value": {
"id": "border_default",
"name": "Default Border",
"value": {
"width": { "top": 1, "right": 1, "bottom": 1, "left": 1 },
"style": "solid",
"color": { "hex": "#E5E7EB" }
}
}
}
],
"gap": [
{
"action": "ADD",
"value": {
"id": "gap_lg",
"name": "Large Gap",
"value": { "desktop": { "columnGap": 32, "rowGap": 32 } }
}
}
]
}
```
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the operation was successful.
- **data** (object) - Contains the updated global settings.
#### Response Example
(Response structure mirrors the request body with updated values and status.)
```
--------------------------------
### Import to Gutenberg API
Source: https://context7.com/posimyth/uichemy/llms.txt
Creates or updates Gutenberg pages and patterns with block content from Figma exports.
```APIDOC
## POST /wp-json/uichemy/v2/gutenberg/import
### Description
Creates or updates Gutenberg pages and patterns with block content from Figma exports.
### Method
POST
### Endpoint
/wp-json/uichemy/v2/gutenberg/import
### Parameters
#### Query Parameters
- **newImport** (boolean) - Required - Set to `true` to create a new import.
- **postType** (string) - Required - The type of post to create or update (e.g., `page`, `gutenberg_pattern`).
- **postTitle** (string) - Optional - The title for the new post.
#### Headers
- **UiChemy-Security-Token** (string) - Required - Your security token.
- **Content-Type** (string) - Required - `text/html` for block content.
#### Request Body
- **HTML Content** (string) - Required - The Gutenberg block content in HTML format.
### Request Example
```bash
# Create new Gutenberg page
curl -X POST "https://your-site.com/wp-json/uichemy/v2/gutenberg/import?newImport=true&postType=page&postTitle=New%20Page%20From%20Figma" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: text/html" \
-d '
Welcome Section
This content was imported from Figma.
'
# Create reusable block pattern
curl -X POST "https://your-site.com/wp-json/uichemy/v2/gutenberg/import?newImport=true&postType=gutenberg_pattern&postTitle=Hero%20Pattern" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: text/html" \
-d '...'
```
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the import was successful.
- **id** (integer) - The ID of the created or updated post.
- **title** (string) - The title of the created or updated post.
#### Response Example
```json
{
"success": true,
"id": 250,
"title": "New Page From Figma"
}
```
```
--------------------------------
### Sync Bricks Globals
Source: https://context7.com/posimyth/uichemy/llms.txt
Updates Bricks Builder global styles by synchronizing design tokens from Figma. Supports adding or setting colors, typography, shadows, borders, and gaps.
```bash
curl -X POST "https://your-site.com/wp-json/uichemy/v1/bricks/globals/sync" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: application/json" \
-d '{
"width": { "desktop": "1200px", "tablet_portrait": "90%", "mobile_portrait": "95%" },
"colors": [
{ "action": "ADD", "id": "newcolor1", "hex": "#10B981", "name": "Success Green" },
{ "action": "SET", "id": "existingcolor", "hex": "#EF4444", "name": "Error Red" }
],
"typography": [
{
"action": "ADD",
"value": {
"id": "typo_heading",
"name": "H1 Heading",
"value": {
"_typography": { "font-family": "Poppins", "font-size": "48px", "font-weight": "700" }
}
}
}
],
"shadow": [
{
"action": "ADD",
"value": {
"id": "shadow_lg",
"name": "Large Shadow",
"value": { "offsetX": 0, "offsetY": 10, "blur": 25, "spread": -5, "color": { "hex": "#00000020" } }
}
}
],
"border": [
{
"action": "ADD",
"value": {
"id": "border_default",
"name": "Default Border",
"value": {
"width": { "top": 1, "right": 1, "bottom": 1, "left": 1 },
"style": "solid",
"color": { "hex": "#E5E7EB" }
}
}
}
],
"gap": [
{
"action": "ADD",
"value": {
"id": "gap_lg",
"name": "Large Gap",
"value": { "desktop": { "columnGap": 32, "rowGap": 32 } }
}
}
]
}'
```
--------------------------------
### Import Content to Bricks Builder
Source: https://context7.com/posimyth/uichemy/llms.txt
Imports Figma-exported design structures into Bricks Builder as pages or templates. The content is sent as a JSON payload defining the brick hierarchy and settings.
```bash
curl -X POST "https://your-site.com/wp-json/uichemy/v2/bricks/import?newImport=true&postType=page" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Bricks Page from Figma",
"content": [
{
"id": "brick1",
"name": "section",
"settings": {
"_background": { "color": { "hex": "#ffffff" } }
},
"children": ["brick2"]
},
{
"id": "brick2",
"name": "heading",
"parent": "brick1",
"settings": {
"text": "Hello from Figma",
"tag": "h1"
}
}
],
"pageSettings": {
"_bodyFont": { "family": "Inter" }
}
}'
```
--------------------------------
### Import Design to Elementor (New Post - REST API)
Source: https://context7.com/posimyth/uichemy/llms.txt
Creates a new WordPress post or template using Figma-exported data and renders it with Elementor. This endpoint supports specifying the post type and allows for the import of complex design structures.
```bash
curl -X POST "https://your-site.com/wp-json/uichemy/v2/elementor/import?newImport=true&postType=page" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Landing Page from Figma",
"content": [
{
"id": "abc123",
"elType": "container",
"settings": {
"content_width": "boxed"
},
"elements": [
{
"id": "def456",
"elType": "widget",
"widgetType": "heading",
"settings": {
"title": "Welcome to Our Site",
"header_size": "h1"
}
}
]
}
],
"page_settings": {
"template": "elementor_header_footer"
}
}'
# Expected response
{
"success": true,
"result": {
"title": "Landing Page from Figma",
"edit_link": "https://your-site.com/wp-admin/post.php?post=123&action=elementor",
"view": "https://your-site.com/landing-page-from-figma/"
}
}
```
--------------------------------
### AJAX Endpoints
Source: https://context7.com/posimyth/uichemy/llms.txt
Provides AJAX endpoints for common UiChemy operations within WordPress.
```APIDOC
## AJAX Endpoints
### Regenerate Security Token
#### Description
Regenerates the security token used for API authentication. Requires admin privileges.
#### Method
POST
#### Endpoint
`ajaxurl` (WordPress AJAX URL)
#### Request Body
```json
{
"action": "uich_regenerate_token",
"nonce": "[UIchemy NONCE]"
}
```
#### Response Example (Success)
```json
{
"success": true,
"data": {
"token": "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX"
}
}
```
### Select Import User
#### Description
Sets the user context for imports, determining which user account owns imported content.
#### Method
POST
#### Endpoint
`ajaxurl` (WordPress AJAX URL)
#### Request Body
```json
{
"action": "uich_select_user",
"nonce": "[UIchemy NONCE]",
"new_user": "[USERNAME]"
}
```
#### Response Example (Success)
```json
{
"success": true,
"data": {
"new_user": "[USERNAME]"
}
}
```
### Install and Configure Plugins
#### Description
Installs and activates required plugins like Elementor or The Plus Blocks directly from the UiChemy dashboard.
#### Method
POST
#### Endpoint
`ajaxurl` (WordPress AJAX URL)
#### Request Body Examples
**Install Elementor:**
```json
{
"action": "uich_uichemy",
"nonce": "[UIchemy NONCE]",
"type": "install_elementor"
}
```
**Enable Flexbox Container:**
```json
{
"action": "uich_uichemy",
"nonce": "[UIchemy NONCE]",
"type": "flexbox_container"
}
```
**Enable unfiltered file uploads for Elementor:**
```json
{
"action": "uich_uichemy",
"nonce": "[UIchemy NONCE]",
"type": "elementor_file_uploads"
}
```
**Install The Plus Blocks or other plugins:**
```json
{
"action": "uich_uichemy",
"nonce": "[UIchemy NONCE]",
"type": "install_tpgb",
"pluginName": "[PLUGIN_SLUG]"
}
```
#### Response Example (Success)
```json
{
"message": "Successfully Activated!"
}
```
```
--------------------------------
### Import Design to Elementor (Existing Post - REST API)
Source: https://context7.com/posimyth/uichemy/llms.txt
Updates an existing WordPress post or template with new Figma-exported design data. You can choose to append the new content or replace the existing content entirely.
```bash
# Update existing Elementor post (append mode)
curl -X POST "https://your-site.com/wp-json/uichemy/v2/elementor/import?newImport=false&postType=page&importToPost=123&importByReplacing=false" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": [
{
"id": "new123",
"elType": "container",
"settings": {},
"elements": []
}
]
}'
# Replace mode (importByReplacing=true)
curl -X POST "https://your-site.com/wp-json/uichemy/v2/elementor/import?newImport=false&postType=page&importToPost=123&importByReplacing=true" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: application/json" \
-d '{"content": [...]}'
```
--------------------------------
### Manage Security Token via WordPress Filters
Source: https://context7.com/posimyth/uichemy/llms.txt
Handle the security token lifecycle programmatically using the uich_manage_token filter. Supports creation, reset, deletion, and status checks.
```php
$token = apply_filters('uich_manage_token', 'get_token');
apply_filters('uich_manage_token', 'create_token');
apply_filters('uich_manage_token', 'reset_token');
apply_filters('uich_manage_token', 'delete_token');
$is_set = apply_filters('uich_manage_token', 'is_token_set');
```
--------------------------------
### Retrieve Elementor Global Settings
Source: https://context7.com/posimyth/uichemy/llms.txt
Fetches Elementor's global configuration, including typography settings, color palettes, and container width definitions for various breakpoints.
```bash
curl -X GET "https://your-site.com/wp-json/uichemy/v1/elementor/globals" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN"
```
--------------------------------
### POST /uichemy/v2/elementor/import
Source: https://context7.com/posimyth/uichemy/llms.txt
Creates or updates an Elementor page or template from Figma-exported JSON data.
```APIDOC
## POST /uichemy/v2/elementor/import
### Description
Creates a new Elementor page or updates an existing one using Figma-exported JSON content.
### Method
POST
### Endpoint
/wp-json/uichemy/v2/elementor/import
### Parameters
#### Query Parameters
- **newImport** (boolean) - Required - Set to true for new posts.
- **postType** (string) - Required - e.g., 'page', 'template'.
- **importToPost** (integer) - Optional - ID of existing post to update.
- **importByReplacing** (boolean) - Optional - Whether to replace existing content.
#### Request Body
- **title** (string) - Required - Page title.
- **content** (array) - Required - Figma design JSON structure.
### Response
#### Success Response (200)
- **edit_link** (string) - Link to edit in Elementor.
- **view** (string) - URL to view the page.
#### Response Example
{
"success": true,
"result": {
"edit_link": "https://your-site.com/wp-admin/post.php?post=123&action=elementor",
"view": "https://your-site.com/landing-page-from-figma/"
}
}
```
--------------------------------
### POST /wp-json/uichemy/v1/elementor/classes_variables/sync
Source: https://context7.com/posimyth/uichemy/llms.txt
Syncs Elementor classes and variables with UiChemy.
```APIDOC
## POST /wp-json/uichemy/v1/elementor/classes_variables/sync
### Description
Syncs Elementor classes and variables.
### Method
POST
### Endpoint
https://your-site.com/wp-json/uichemy/v1/elementor/classes_variables/sync
### Parameters
#### Headers
- **UiChemy-Security-Token** (string) - Required - Your security token for authentication.
- **Content-Type** (string) - Required - application/json
#### Request Body
- **classes** (array) - Required - An array of Elementor classes to sync.
- **variables** (array) - Required - An array of Elementor variables to sync.
### Request Example
```json
{
"classes": [...],
"variables": [...]
}
```
### Response
#### Success Response (200)
- **message** (string) - Confirmation message.
#### Response Example
```json
{
"message": "Sync successful"
}
```
```
--------------------------------
### Sync Elementor Globals
Source: https://context7.com/posimyth/uichemy/llms.txt
Synchronizes global design settings including colors, typography, and container width for Elementor. Requires a valid UiChemy security token.
```bash
curl -X POST "https://your-site.com/wp-json/uichemy/v1/elementor/globals/sync" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: application/json" \
-d '{
"colors": [
{ "action": "ADD", "value": { "id": "brand1", "title": "Brand Primary", "value": "#3B82F6" } },
{ "action": "SET", "value": { "id": "primary", "title": "Primary", "value": "#2563EB" } },
{ "action": "DEL", "value": { "id": "oldcolor" } }
],
"typography": [
{
"action": "ADD",
"value": {
"id": "heading1",
"title": "Heading 1",
"value": {
"typography_font_family": "Inter",
"typography_font_size": { "unit": "px", "size": 48 },
"typography_font_weight": "700"
}
}
}
],
"container_width": {
"desktop": { "unit": "px", "size": 1200, "sizes": [] },
"tablet": { "unit": "%", "size": 90, "sizes": [] },
"mobile": { "unit": "%", "size": 95, "sizes": [] }
}
}'
```
--------------------------------
### Set Import User via AJAX
Source: https://context7.com/posimyth/uichemy/llms.txt
Define the WordPress user account that will own imported content. This ensures proper attribution and permission handling during imports.
```javascript
jQuery.ajax({
url: ajaxurl,
type: 'POST',
data: {
action: 'uich_select_user',
nonce: uichemy_vars.nonce,
new_user: 'admin'
},
success: function(response) {
if (response.success) {
console.log('User set to:', response.data.new_user);
}
}
});
```
--------------------------------
### Sync Elementor Globals API
Source: https://context7.com/posimyth/uichemy/llms.txt
Synchronizes global colors, typography, and container widths from Figma to Elementor's global settings.
```APIDOC
## POST /wp-json/uichemy/v1/elementor/sync_globals
### Description
Synchronizes global colors, typography, and container widths from Figma to Elementor's global settings.
### Method
POST
### Endpoint
/wp-json/uichemy/v1/elementor/sync_globals
### Parameters
#### Query Parameters
None
#### Headers
- **UiChemy-Security-Token** (string) - Required - Your security token.
- **Content-Type** (string) - Required - `application/json` for the request body.
#### Request Body
- **colors** (array) - Optional - An array of color objects to sync.
- **id** (string) - Required - The ID of the color.
- **value** (string) - Required - The hex value of the color.
- **typography** (array) - Optional - An array of typography objects to sync.
- **id** (string) - Required - The ID of the typography setting.
- **value** (object) - Required - The typography values.
- **container_width** (object) - Optional - Container width settings to sync.
- **desktop** (object) - Desktop container width settings.
- **tablet** (object) - Tablet container width settings.
- **mobile** (object) - Mobile container width settings.
### Request Example
```bash
curl -X POST "https://your-site.com/wp-json/uichemy/v1/elementor/sync_globals" \
-H "UiChemy-Security-Token: YOUR-SECURITY-TOKEN" \
-H "Content-Type: application/json" \
-d '{
"colors": [
{ "id": "primary", "value": "#FF5733" },
{ "id": "secondary", "value": "#33FF57" }
],
"typography": [
{
"id": "body",
"value": {
"typography_font_family": "Roboto",
"typography_font_size": { "unit": "px", "size": 14 },
"typography_font_weight": "normal"
}
}
],
"container_width": {
"desktop": { "unit": "px", "size": 1200 },
"tablet": { "unit": "px", "size": 900 },
"mobile": { "unit": "px", "size": 600 }
}
}'
```
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the synchronization was successful.
#### Response Example
```json
{
"success": true
}
```
```