Update AI card
PATCH/openapi/2026-01/themes/edit-sessions/:oseid/gen-blocks
Update an AI card with new source code and its full settings. If the card is unused or used in
only one place, it is changed in place (branched=false); if it is used in several places, a
new card is created to carry this change (branched=true), and you need to replace the card at
the target position with the returned settings.
Request
Path Parameters
Edit session ID
- application/json
- Body
- Example
Bodyrequired
New liquid source; must contain a schema tag
The card's full config, same shape as the create response's settings. Its type
(blocks/gen_ prefixed) names the card to change; the field values are the merchant's
current config
{
"content": "string",
"settings": {}
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
error code
error message
data object
Token to revert this update (see gen-blocks/revert)
false = overwritten in place (ref count 0/1), instances untouched, nothing else to do;
true = a new card was created to carry the change (ref count >= 2) — rewrite the target
instance with the returned settings
The card's full config after the change; on a branch its type is the new card's card_type
{
"code": "string",
"message": "string",
"data": {
"revert_id": "string",
"branched": true,
"settings": {}
}
}