rank-math/update-post-schemas adds or replaces schema markup on a post, term or user in a single call.
The key you use decides whether a schema is appended or replaced, and getting that wrong produces duplicates rather than an error.
At a glance
| Ability | rank-math/update-post-schemas |
| Toolset | Rank Math — toolset/rank-math |
| Group | Rank Math › Schema |
| Requires | Rank Math SEO, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
The key is the instruction
Key a schema new-1, new-2 and so on to append it. Key it schema-<meta_id> to replace an existing one.
Which means repeating a payload of new-* keys appends duplicates rather than overwriting. Retrying a call whose result you did not see is the standard way to end up with two identical Article schemas on one post — and duplicate structured data is worse than none, because it is ambiguous rather than absent.
So read the existing meta IDs first. Rank Math’s own rank-math/get-post-schema ability lists them, and also lists which schema types this install supports — which varies, because some types are PRO-only and some depend on other plugins being present.
Rank Math ships abilities of its own, and this suite deliberately does not duplicate them. Where one already answers a question well, these pages point at it rather than offering a second version that behaves slightly differently.
Not idempotent, by construction. That is a property of the append semantics rather than an oversight, and it is why the read comes first.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
object_id | integer | Yes | The post, term or user ID. |
object_type | string | No — defaults to post | post, term or user. |
schemas | object | Yes | A map of key to schema. new-1 appends; schema-<meta_id> replaces. |
What comes back
| Name | Type | What it is |
|---|---|---|
object_id | integer | The object written. |
schemas | array | The schemas attached afterwards, with their meta IDs. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Add FAQ schema to post 412.
It resolves to one call:
{
"ability": "rank-math/update-post-schemas",
"parameters": {
"object_id": 412,
"schemas": {
"new-1": { "@type": "FAQPage" }
}
}
}Worth knowing
- Repeating a
new-*payload appends duplicates. Read the meta IDs first. - Duplicate structured data is worse than missing structured data.
- Supported schema types vary by install. Rank Math’s own read lists them.
- Works on terms and users, not only posts.
Related abilities
- Delete Rank Math Post Schemas — remove them all and start over
- Get Rank Math Schema Status — the publisher entity these attach to
- Get Rank Math Rendered Head — verify what is emitted
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category