GuideLab API

Create Email Template

Create a new email template with design JSON and HTML content. Supports categorization (general, order, invoice, shipment, notification, marketing).

POST
/email-templates

Create a new email template with design JSON and HTML content. Supports categorization (general, order, invoice, shipment, notification, marketing).

Authorization

__Secure-guidelab-prod.session_token<token>

Production session cookie set for the guidelab.co domain by Better Auth

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/email-templates" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "subject": "string",    "designJson": {      "body": {        "rows": [          null        ],        "property1": null,        "property2": null      },      "property1": null,      "property2": null    },    "htmlContent": "string"  }'
{  "template": {    "id": "string",    "labId": "string",    "name": "string",    "subject": "string",    "description": "string",    "designJson": {      "body": {        "rows": [          null        ],        "property1": null,        "property2": null      },      "counters": {        "property1": 0,        "property2": 0      },      "property1": null,      "property2": null    },    "htmlContent": "string",    "category": "string",    "sortOrder": 0,    "isActive": true,    "createdAt": "string",    "updatedAt": "string"  }}
Empty
Empty