Storefront themes

AI Editor: apply a request to the draft on screen (nothing is saved)

POST
/v1/stores/{storeId}/storefront/themes/{themeId}/ai-edit

Authorization

AuthorizationBearer <token>

API key from Settings → API keys

In: header

Path Parameters

storeId*string
themeId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/stores/string/storefront/themes/string/ai-edit" \  -H "Content-Type: application/json" \  -d '{    "page": {      "key": "string",      "template": "string",      "label": "string"    },    "settings": {      "property1": null,      "property2": null    },    "messages": [      {        "role": "user",        "content": "string"      }    ]  }'
{  "message": "string",  "settings": {    "property1": null,    "property2": null  },  "applied": [    {      "op": "string",      "label": "string"    }  ],  "skipped": [    {      "op": "string",      "reason": "string"    }  ],  "model": "string",  "costUsd": 0}