Builder Toolswordpress_update_module

wordpress_update_module

Update a specific module within a page builder page by admin label, path, or type—preserving all other content.

wordpress_update_module

Update a specific module within a page builder page. Find modules by admin_label, path, or type. Only updates the targeted module - all other content is preserved.

Parameters

ParameterTypeRequiredDescription
builderstringYesBuilder name: divi, elementor, bricks, breakdance, etc.
pageIdnumberYesPage ID
moduleIdentifierobjectYesHow to find the module (see below)
updatesobjectYesChanges to apply

moduleIdentifier Options

By admin_label (recommended):

{
  "admin_label": "Hero CTA Button"
}

By path:

{
  "path": "sections[0].rows[0].modules[2]"
}

By type:

{
  "type": "et_pb_button",
  "match_content": "Get Started"
}

updates Object

{
  "content": "New content for the module",
  "attributes": {
    "button_text": "Click Here",
    "button_url": "/contact"
  }
}

Example call

The smallest valid call, with the required parameters only:

{
  "name": "wordpress_update_module",
  "arguments": {
    "builder": "value",
    "page_id": 123,
    "module_identifier": {},
    "updates": {}
  }
}

Response

{
  "success": true,
  "message": "Module updated successfully",
  "module_found": true,
  "module_type": "et_pb_button",
  "changes_applied": {
    "button_text": "Click Here"
  }
}

What it changes

It writes to the site. Respira takes a snapshot before the write, and the change can be undone from that snapshot for 90 days. It supports a dry run, which reports what would change without changing it. Calling it twice with the same arguments leaves the site in the same state as calling it once. On a connection set to read-only it is refused with respira_scope_denied.

When it fails

The failures seen most often on real sites in the last 30 days, most common first:

  • respira_direct_edit_disabled: The site only allows edits on a copy, never on the original page. Create a duplicate with wordpress_create_page_duplicate and edit that. A person approves it in wp-admin.

How long it takes

A typical call takes about 4.5 seconds. 19 in 20 finish within 6.8 seconds. Measured on real sites over the last week, so it includes the site's own hosting.

Availability

Works with Gutenberg, Elementor, Divi, Bricks, Oxygen, Beaver Builder, Breakdance, Flatsome, Brizy, Visual Composer, WPBakery, Thrive Architect, Spectra, Kadence Blocks, GenerateBlocks, GreenShift. Available since Respira 1.0.0.

Full Example

Prompt: "Change the hero button text to 'Start Free Trial'"

Request:

{
  "builder": "divi",
  "pageId": 42,
  "moduleIdentifier": {
    "admin_label": "Hero CTA"
  },
  "updates": {
    "attributes": {
      "button_text": "Start Free Trial"
    }
  }
}

Response:

{
  "success": true,
  "message": "Module 'Hero CTA' updated successfully",
  "module_found": true,
  "module_type": "et_pb_button",
  "module_path": "sections[0].rows[0].columns[0].modules[1]",
  "changes_applied": {
    "button_text": "Start Free Trial"
  },
  "duplicate_created": true,
  "duplicate_id": 156,
  "approval_url": "https://yoursite.com/wp-admin/admin.php?page=respira-approvals"
}

Setting Admin Labels

For reliable targeting, set admin labels in your page builder:

Divi: Advanced tab → Admin Label
Elementor: Advanced tab → CSS ID or Navigator name
Bricks: Settings → Admin Label
Oxygen: Structure panel → Label

Supported Builders

BuilderModule Identifier Support
Diviadmin_label, path, type ✓
Elementoradmin_label, path, type ✓
Bricksadmin_label, path, type ✓
Oxygenadmin_label, path, type ✓
WPBakerypath, type ✓
Beaver Builderadmin_label, path, type ✓
Brizypath, type ✓
Visual Composerpath, type ✓
Thrivepath, type ✓
Gutenbergpath, type ✓
Breakdancepath, type ✓

Notes

  • Automatically creates duplicate for safety (same as wordpress_update_page)
  • Preserves all other modules, sections, and styling
  • If module not found, returns error with available modules list

Example Prompts

  • "Update the Hero CTA Button text to 'Contact Us'"
  • "Change the button in the first section to link to /pricing"
  • "Find all buttons that say 'Learn More' and change them to 'Get Started'"
  • "Update the module labeled 'Footer Email' with our new address"