API
テンプレートを取得する
id でも slug でも指定できます。最新バージョンが本文込みで丸ごと返ります。
GETapi.openemail.uk/templates/{id}
実際の呼び出しを、ご自身のキーで自分のワークスペースに対して実行します。
GET /templates/{id}
id でも slug でも指定できます。最新バージョンが本文込みで丸ごと返ります。
例
templates:read が必要です。id には tpl_ の接頭辞が付き、slug には付けられないので、このパス上で 2 つの語彙が衝突することはありません。
curl "$OE/templates/order-shipped" -H "$AUTH"{ "object": "template", "id": "tpl_9c1f0a4b7e05d3862c1f0a44", "name": "Order shipped", "slug": "order-shipped", "status": "active", "publishedVersion": 3, "latestVersion": 4, "subject": "Order {{orderId}} is on its way", "engine": "html", "slots": [], "props": [{ "key": "orderId", "kind": "text", "required": true, "default": null }], "latest": { "object": "template_version", "id": "tplv_5d31c2a8…", "templateId": "tpl_9c1f0a4b7e05d3862c1f0a44", "version": 4, "state": "draft", "engine": "html", "subject": "Order {{orderId}} is on its way", "slots": [], "props": [{ "key": "orderId", "kind": "text", "required": true, "default": null }], "document": null, "html": "<p>Hello {{customer}}, {{orderId}} left the warehouse.</p>", "createdAt": "2026-08-28T16:03:10.000Z", "publishedAt": null }, "createdAt": "2026-08-01T09:12:44.000Z", "updatedAt": "2026-08-28T16:03:10.000Z"}latest は最新のバージョンであり、未公開の編集があるときは下書きを指します。その隣にあるフィールド(subject、engine、slots、props)は公開済みのバージョンを表します。送信が解決するのはそちらだからです。
document はブロックツリーで、engine: "html" のときは null です。html は投入されたままのマークアップで、engine: "blocks" のときは null です。どちらも単体取得のときだけ返ります。各バージョンが完全なツリーを抱えたバージョン一覧は、誰も求めていないペイロードです。