deleteUserMeta
Permanently delete a specific users_meta row by meta_id, requiring database and database_id to avoid destroying unrelated metadata on other tables.
Instructions
Delete a metadata record - Permanently delete a users_meta record by meta_id. DESTRUCTIVE - cannot be undone via API.
HARD RULE - (database, database_id) is ONE atomic compound identity. Verify BOTH of the row BEFORE deleting. Destructive mistakes on users_meta are unrecoverable. A users_meta row's identity is (database, database_id, key). The same numeric database_id routinely belongs to UNRELATED rows on different parent tables - an integer ID may simultaneously be a WebPage's seo_id, a member's user_id, a post's post_id, and a plan's subscription_id. BEFORE calling this endpoint: (1) call getUserMeta(meta_id) or retain the row's full object from a prior listUserMeta response; (2) confirm the row's database value matches the table you intend to clean up. For batch orphan-cleanup after a parent delete: list by the parent's database_id, then CLIENT-SIDE filter to ONLY rows where database equals the parent table's name BEFORE deleting any meta_id. NEVER loop-delete by database_id alone - you WILL destroy unrelated resource metadata (member data, plan metadata, page settings) that happen to share the same numeric ID on other tables.
Use when: removing a specific metadata row, OR cleaning up orphan meta rows after a parent record is deleted (BD does not cascade-delete users_meta when a parent is removed - it's the agent's job to find and delete the orphan rows surgically).
Required: meta_id, database, database_id. All three - always. The identity pair (database, database_id) is enforced at the schema level to prevent cross-table destruction.
Post-parent-delete cleanup workflow (safe pattern):
listUserMetawith filterdatabase_id=<deleted parent's id>In the returned array, filter CLIENT-SIDE to ONLY rows where
databaseequals the parent table's name (e.g.list_seofor a deleted WebPage)For each filtered
meta_id, calldeleteUserMeta(meta_id, database=<parent table>, database_id=<parent id>)- all three requiredNever skip step 2 - the same
database_idcan belong to unrelated rows on other tables
See also: updateUserMeta (modify without removing), listUserMeta (enumerate with filter).
Returns: { status: "success", message: "users_meta record was deleted" }. No body beyond the confirmation string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta_id | Yes | ||
| database | Yes | REQUIRED - parent table name (e.g. `list_seo`, `users_data`). Must match the row's stored `database` field. Prevents accidental cross-table deletion since the same `database_id` can exist in multiple parent tables. | |
| database_id | Yes | REQUIRED - parent record PK. Must match the row's stored `database_id` field. Agents MUST verify both `database` and `database_id` before calling delete to prevent destroying unrelated metadata on other tables with the same ID number. |