Version: 202601
Create AI card
POST/openapi/2026-01/themes/edit-sessions/:oseid/gen-blocks
Create an AI card from liquid code (must contain a {% schema %} tag) within an edit session.
The response settings is the card's full default config and can be used directly to place the
card on a page.
Request
Path Parameters
oseid stringrequired
Edit session ID
- application/json
- Body
- Example
Bodyrequired
contentstringrequired
Card liquid source; must contain a schema tag. schema.name inside is the
merchant-visible display name (no uniqueness requirement)
json
{
"content": "string"
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
codestring
error code
messagestring
error message
data object
revert_idstring
Token to revert this creation (see gen-blocks/revert)
settingsobject
The card's full default config — the schema's whole content, with type set to the
card_type used for page arrangement
json
{
"code": "string",
"message": "string",
"data": {
"revert_id": "string",
"settings": {}
}
}