문서로 건너뛰기
API

브리프로 템플릿 디자인

디자이너가 쓴 내용으로 새 블록 템플릿을 만듭니다.

POST/templates/design

워크스페이스에 실제 호출을 실행합니다.

POST /templates/design

디자이너가 쓴 내용으로 새 블록 템플릿을 만듭니다.

예시

templates:write가 필요합니다. brief에는 디자인이 담을 내용과 모양을 모두 적습니다. starter는 시작 디자인을 바탕으로 하고, imageFileIds는 이미지를 최대 10개까지 넣으며, publish는 바로 게시합니다. 템플릿과 design과 함께 201로 응답합니다.

curl
curl -X POST "$OE/templates/design" -H "$AUTH" -H "Content-Type: application/json" \  -d '{ "name": "Spring launch", "brief": "A launch email for our spring collection: a hero image, three product cards and a button to the shop. Green and cream, friendly tone." }'
응답
{  "object": "template",  "id": "tpl_8f3a1c2e9b7d4a60",  "name": "Spring launch",  "slug": "spring-launch",  "status": "draft",  "publishedVersion": null,  "latestVersion": 1,  "design": {    "subject": "Spring is here",    "notes": [],    "imageProblems": []  }}

AI 작업을 한 번 쓰며 최대 1분 걸릴 수 있습니다. 유효하게 만들 수 없는 디자인은 422 invalid_template, AI 작업을 다 쓴 워크스페이스는 429 ai_quota_exceeded입니다.

일부 주소로 제한된 키가 닿지 않는 이미지는 빠지고 design.imageProblems에 적힙니다.

레퍼런스