consent/update-cookie changes a declared cookie: its name, its category, its description, its duration, the domain.
Only the fields you send are touched — and, within a field, only the languages you send.
At a glance
| Ability | consent/update-cookie |
| Toolset | CookieYes — toolset/cookieyes |
| Group | CookieYes › Declared Cookies |
| Requires | CookieYes, 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 |
Per-language, per-field
Descriptions and durations are stored per language. Sending a map keyed by language code updates exactly those languages and leaves the rest as they were, which is what you want when you are correcting one translation.
Sending a plain string is the other behaviour: it applies to every language at once. Both are useful and they are very different, so the shape of what you send is the instruction.
The banner a visitor receives is not assembled on the fly. It is cached HTML, built from the declared cookies, the consent categories and the settings, and rebuilt only when the consent plugin’s own save hooks fire. Write the consent tables any other way — through the database abilities, through another plugin — and the row reads back correctly while every visitor still sees the previous banner, with no error anywhere to say so.
After the write the banner is refreshed and the result is checked against what the banner now holds. The response carries that check, rather than reporting success on the strength of the row having been written.
Moving a cookie between categories is a category change, not a text change, and it takes effect for every visitor on the next banner — including those who already consented under the old arrangement.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
id | integer | Yes | Cookie ID, from consent/list-cookies. |
name | string | No | New cookie name. |
category_id | integer | No | Move it to this consent category. |
description | string | object | No | A plain string is applied to every language. A map keyed by language code sets them individually, and languages you leave out keep the text they already had. |
duration | string | object | No | A plain string is applied to every language. A map keyed by language code sets them individually, and languages you leave out keep the text they already had. |
domain | string | No | The domain that sets it. |
type | integer | No | The consent plugin’s own numeric cookie type. |
url_pattern | string | No | Restrict to pages matching this pattern. |
What comes back
| Name | Type | What it is |
|---|---|---|
cookie | object | The cookie after the write. |
banner_refreshed | boolean | Whether the cached banner was rebuilt after the write. This is the field that says the change actually reached visitors. |
languages | array | The languages the banner is built for. |
rendered | object | The size of the built banner, per language. |
pending_rebuild | boolean | Whether the banner is still waiting to be rebuilt. True after a write means the change is stored but not yet being served. |
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:
Fix the German description for cookie 41.
It resolves to one call:
{
"ability": "consent/update-cookie",
"parameters": {
"id": 41,
"description": {
"de": "Unterscheidet Besucher, damit wir sie zählen können, ohne sie zu identifizieren."
}
}
}Worth knowing
- A string overwrites every language. A map touches only the languages in it.
- Read the cookie first when you are editing one language — the admin shows one at a time and the gaps are easy to miss.
- Check
banner_refreshed. Stored is not the same as served.
Related abilities
- Get Declared Cookie — see the existing text per language
- Rebuild the Banner — if the refresh did not take
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category