API
템플릿 생성
게시를 요청하지 않으면 초안으로 남습니다. 초안은 미리보기는 되지만 발송할 수 없습니다.
POSTapi.openemail.uk/templates
본인 키로 워크스페이스에 실제 호출을 실행합니다.
POST /templates
게시를 요청하지 않으면 초안으로 남습니다. 초안은 미리보기는 되지만 발송할 수 없습니다.
예시
templates:write가 필요합니다. 201을 반환합니다. slug는 생략하면 이름에서 만들어지며, 코드에 고정해 둘 핸들은 이쪽입니다. 이름은 누군가 바꾸기 마련이기 때문입니다.
curl -X POST "$OE/templates" -H "$AUTH" -H "Content-Type: application/json" \ -d '{ "name": "Order shipped", "engine": "html", "subject": "Order {{orderId}} is on its way", "html": "<p>Hello {{customer}}, {{orderId}} left the warehouse.</p>", "props": [ { "key": "orderId", "kind": "text", "required": true }, { "key": "customer", "kind": "text", "default": "there" } ], "publish": true }'{ "object": "template", "id": "tpl_9c1f0a4b7e05d3862c1f0a44", "name": "Order shipped", "slug": "order-shipped", "description": null, "status": "active", "publishedVersion": 1, "latestVersion": 1, "subject": "Order {{orderId}} is on its way", "engine": "html", "slots": [], "props": [ { "key": "orderId", "kind": "text", "required": true, "default": null }, { "key": "customer", "kind": "text", "required": false, "default": "there" } ], "createdAt": "2026-08-30T10:41:02.000Z", "updatedAt": "2026-08-30T10:41:02.000Z"}배포 스크립트에서는 publish: true를 설정하세요. 없으면 버전 1이 초안으로 만들어지는데, 사람이 문구를 먼저 검토할 때는 맞지만 자동화된 곳에서는 틀린 동작입니다.
이름이 중복되면 template_name_taken, slug가 중복되면 template_slug_taken이며, 둘 다 계정이 아니라 connection 단위로 판정되는 409입니다.
하나의 connection은 템플릿 200개를 보관합니다. 201번째는 template_limit_reached이며, 이는 요금제 한도가 아니라 폭주하는 스크립트를 막는 안전장치입니다.