ドキュメント本文へスキップ
API

テンプレートのデザインを変更する

デザイナーが指示どおりに変更し、それ以外はそのまま残す。

POST/templates/{id}/redesign

実際の呼び出しをワークスペースに対して実行します。

POST /templates/{id}/redesign

デザイナーが指示どおりに変更し、それ以外はそのまま残す。

例

templates:write が必要。instructions に変更内容を書く。変更は下書きに入り、公開するまで送信には公開済みのバージョンが使われる。

curl
curl -X POST "$OE/templates/spring-launch/redesign" -H "$AUTH" -H "Content-Type: application/json" \  -d '{ "instructions": "Make the button orange and translate the copy into Spanish." }'
レスポンス
{  "object": "template",  "id": "tpl_8f3a1c2e9b7d4a60",  "name": "Spring launch",  "latestVersion": 2,  "design": {    "subject": "La primavera ya está aquí",    "notes": [],    "imageProblems": [],    "changes": { "edited": 5, "added": 0, "removed": 0 },    "draftVersion": 2  }}

生の HTML で書かれたテンプレートは作り直せず、422 invalid_template になる。

リファレンス