10 operations. Guide: Build emails from templates. Requests and responses are JSON with snake_case fields; authenticate with Authorization: Bearer <api key>. The examples assume a client built as in SDKs and the command line.

Create a hosted template

POST /v1/templates

Block documents are rendered by the platform; html accepts pre-rendered markup (React Email compiled by the CLI) with {{variables}}. The platform never executes caller code.

Operation createTemplate, SDK minket.templates.create. Keys: full access. Live keys only: test keys get 403 test_mode_only.

Request body

FieldTypeRequiredDescription
namestringyes1 to 100 characters.
aliasstring or nullnoAt most 100 characters.
subjectstring or nullnoAt most 998 characters.
fromstring or nullnoAn email address, optionally with a display name as Name <address>. 3 to 998 characters.
reply_tostring or array of stringnoOne address, or an array of up to 50.
documentobjectno
document.version1yes
document.settingsobjectnoDefault {"width":600,"background":"#f4f4f5","font":"system"}.
document.settings.widthintegerno320 to 800. Default 600.
document.settings.backgroundstringnoDefault "#f4f4f5".
document.settings.fontone of "system", "serif", "mono"noDefault "system".
document.settings.footerstringnoAt most 2000 characters.
document.blocksarray of objectyesAt most 200 items.
document.blocks[] (shape 1).type"heading"yes
document.blocks[] (shape 1).levelone of "1", "2", "3"noDefault "1".
document.blocks[] (shape 1).textstringyesAt most 20000 characters.
document.blocks[] (shape 1).styleobjectno
document.blocks[] (shape 1).style.colorstringno
document.blocks[] (shape 1).style.backgroundstringno
document.blocks[] (shape 1).style.alignone of "left", "center", "right"no
document.blocks[] (shape 1).style.paddingintegerno0 to 80.
document.blocks[] (shape 2).type"paragraph"yes
document.blocks[] (shape 2).textstringyesAt most 20000 characters.
document.blocks[] (shape 2).styleobjectno
document.blocks[] (shape 2).style.colorstringno
document.blocks[] (shape 2).style.backgroundstringno
document.blocks[] (shape 2).style.alignone of "left", "center", "right"no
document.blocks[] (shape 2).style.paddingintegerno0 to 80.
document.blocks[] (shape 3).type"image"yes
document.blocks[] (shape 3).srcstringyes
document.blocks[] (shape 3).altstringyesAt most 500 characters.
document.blocks[] (shape 3).hrefstringno
document.blocks[] (shape 3).widthintegerno16 to 1200.
document.blocks[] (shape 3).styleobjectno
document.blocks[] (shape 3).style.colorstringno
document.blocks[] (shape 3).style.backgroundstringno
document.blocks[] (shape 3).style.alignone of "left", "center", "right"no
document.blocks[] (shape 3).style.paddingintegerno0 to 80.
document.blocks[] (shape 4).type"button"yes
document.blocks[] (shape 4).labelstringyes1 to 200 characters.
document.blocks[] (shape 4).hrefstringyes
document.blocks[] (shape 4).styleobjectno
document.blocks[] (shape 4).style.colorstringno
document.blocks[] (shape 4).style.backgroundstringno
document.blocks[] (shape 4).style.alignone of "left", "center", "right"no
document.blocks[] (shape 4).style.paddingintegerno0 to 80.
document.blocks[] (shape 5).type"divider"yes
document.blocks[] (shape 5).styleobjectno
document.blocks[] (shape 5).style.colorstringno
document.blocks[] (shape 5).style.backgroundstringno
document.blocks[] (shape 5).style.alignone of "left", "center", "right"no
document.blocks[] (shape 5).style.paddingintegerno0 to 80.
document.blocks[] (shape 6).type"spacer"yes
document.blocks[] (shape 6).heightintegeryes4 to 200.
document.blocks[] (shape 7).type"html"yes
document.blocks[] (shape 7).htmlstringyesAt most 200000 characters.
document.blocks[] (shape 8).type"columns"yes
document.blocks[] (shape 8).columnsarray of objectyesAt most 3 items.
document.blocks[] (shape 8).columns[].blocksarray of objectyesAt most 20 items.
document.blocks[] (shape 8).styleobjectno
document.blocks[] (shape 8).style.colorstringno
document.blocks[] (shape 8).style.backgroundstringno
document.blocks[] (shape 8).style.alignone of "left", "center", "right"no
document.blocks[] (shape 8).style.paddingintegerno0 to 80.
htmlstringnoAt most 1048576 characters.
textstringno
variablesarray of objectnoAt most 100 items.
variables[].keystringyes1 to 64 characters.
variables[].typeone of "string", "number", "boolean"yes
variables[].fallback_valuestring or number or boolean or nullyes
variables[].requiredbooleanno
publishbooleannoDefault false.

Response

201 Created: Template.

FieldTypeRequiredDescription
idstringyesA UUID.
object"template"yes
project_idstringyesA UUID.
namestringyes
aliasstring or nullyes
statusone of "draft", "published"yes
engineone of "blocks", "html"yes
current_versionintegeryes
published_versioninteger or nullyes
subjectstring or nullyes
fromstring or nullyes
reply_toarray of stringyes
documentobject or nullyes
document.version1yes
document.settingsobjectnoDefault {"width":600,"background":"#f4f4f5","font":"system"}.
document.settings.widthintegerno320 to 800. Default 600.
document.settings.backgroundstringnoDefault "#f4f4f5".
document.settings.fontone of "system", "serif", "mono"noDefault "system".
document.settings.footerstringnoAt most 2000 characters.
document.blocksarray of objectyesAt most 200 items.
document.blocks[] (shape 1).type"heading"yes
document.blocks[] (shape 1).levelone of "1", "2", "3"noDefault "1".
document.blocks[] (shape 1).textstringyesAt most 20000 characters.
document.blocks[] (shape 1).styleobjectno
document.blocks[] (shape 1).style.colorstringno
document.blocks[] (shape 1).style.backgroundstringno
document.blocks[] (shape 1).style.alignone of "left", "center", "right"no
document.blocks[] (shape 1).style.paddingintegerno0 to 80.
document.blocks[] (shape 2).type"paragraph"yes
document.blocks[] (shape 2).textstringyesAt most 20000 characters.
document.blocks[] (shape 2).styleobjectno
document.blocks[] (shape 2).style.colorstringno
document.blocks[] (shape 2).style.backgroundstringno
document.blocks[] (shape 2).style.alignone of "left", "center", "right"no
document.blocks[] (shape 2).style.paddingintegerno0 to 80.
document.blocks[] (shape 3).type"image"yes
document.blocks[] (shape 3).srcstringyes
document.blocks[] (shape 3).altstringyesAt most 500 characters.
document.blocks[] (shape 3).hrefstringno
document.blocks[] (shape 3).widthintegerno16 to 1200.
document.blocks[] (shape 3).styleobjectno
document.blocks[] (shape 3).style.colorstringno
document.blocks[] (shape 3).style.backgroundstringno
document.blocks[] (shape 3).style.alignone of "left", "center", "right"no
document.blocks[] (shape 3).style.paddingintegerno0 to 80.
document.blocks[] (shape 4).type"button"yes
document.blocks[] (shape 4).labelstringyes1 to 200 characters.
document.blocks[] (shape 4).hrefstringyes
document.blocks[] (shape 4).styleobjectno
document.blocks[] (shape 4).style.colorstringno
document.blocks[] (shape 4).style.backgroundstringno
document.blocks[] (shape 4).style.alignone of "left", "center", "right"no
document.blocks[] (shape 4).style.paddingintegerno0 to 80.
document.blocks[] (shape 5).type"divider"yes
document.blocks[] (shape 5).styleobjectno
document.blocks[] (shape 5).style.colorstringno
document.blocks[] (shape 5).style.backgroundstringno
document.blocks[] (shape 5).style.alignone of "left", "center", "right"no
document.blocks[] (shape 5).style.paddingintegerno0 to 80.
document.blocks[] (shape 6).type"spacer"yes
document.blocks[] (shape 6).heightintegeryes4 to 200.
document.blocks[] (shape 7).type"html"yes
document.blocks[] (shape 7).htmlstringyesAt most 200000 characters.
document.blocks[] (shape 8).type"columns"yes
document.blocks[] (shape 8).columnsarray of objectyesAt most 3 items.
document.blocks[] (shape 8).columns[].blocksarray of objectyesAt most 20 items.
document.blocks[] (shape 8).styleobjectno
document.blocks[] (shape 8).style.colorstringno
document.blocks[] (shape 8).style.backgroundstringno
document.blocks[] (shape 8).style.alignone of "left", "center", "right"no
document.blocks[] (shape 8).style.paddingintegerno0 to 80.
htmlstring or nullyes
textstring or nullyes
variablesarray of objectyes
variables[].keystringyes1 to 64 characters.
variables[].typeone of "string", "number", "boolean"yes
variables[].fallback_valuestring or number or boolean or nullyes
variables[].requiredbooleanyes
created_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
updated_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
published_atstring (date-time) or nullyesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl -X POST https://api.minket.com/v1/templates \
  -H "Authorization: Bearer $MINKET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Receipt","alias":"receipt","subject":"Your receipt for order {{order}}","html":"<p>Thanks for order {{order}}.</p>","publish":true}'

List templates

GET /v1/templates

Operation listTemplates, SDK minket.templates.list. Keys: full access. Test keys work on test-mode data.

Parameters

NameInTypeRequiredDescription
limitqueryintegerno Default 20.
afterquerystringnoA UUID.
beforequerystringnoA UUID.

Response

200 Success: object.

FieldTypeRequiredDescription
object"list"yes
dataarray of objectyes
data[].idstringyesA UUID.
data[].object"template"yes
data[].project_idstringyesA UUID.
data[].namestringyes
data[].aliasstring or nullyes
data[].statusone of "draft", "published"yes
data[].engineone of "blocks", "html"yes
data[].current_versionintegeryes
data[].published_versioninteger or nullyes
data[].subjectstring or nullyes
data[].fromstring or nullyes
data[].reply_toarray of stringyes
data[].variablesarray of objectyes
data[].variables[].keystringyes1 to 64 characters.
data[].variables[].typeone of "string", "number", "boolean"yes
data[].variables[].fallback_valuestring or number or boolean or nullyes
data[].variables[].requiredbooleanyes
data[].created_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
data[].updated_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
data[].published_atstring (date-time) or nullyesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
has_morebooleanyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl https://api.minket.com/v1/templates \
  -H "Authorization: Bearer $MINKET_API_KEY"

Get a template (by id or alias)

GET /v1/templates/{id}

Operation getTemplate, SDK minket.templates.get. Keys: full access. Test keys work on test-mode data.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Response

200 Success: Template.

FieldTypeRequiredDescription
idstringyesA UUID.
object"template"yes
project_idstringyesA UUID.
namestringyes
aliasstring or nullyes
statusone of "draft", "published"yes
engineone of "blocks", "html"yes
current_versionintegeryes
published_versioninteger or nullyes
subjectstring or nullyes
fromstring or nullyes
reply_toarray of stringyes
documentobject or nullyes
document.version1yes
document.settingsobjectnoDefault {"width":600,"background":"#f4f4f5","font":"system"}.
document.settings.widthintegerno320 to 800. Default 600.
document.settings.backgroundstringnoDefault "#f4f4f5".
document.settings.fontone of "system", "serif", "mono"noDefault "system".
document.settings.footerstringnoAt most 2000 characters.
document.blocksarray of objectyesAt most 200 items.
document.blocks[] (shape 1).type"heading"yes
document.blocks[] (shape 1).levelone of "1", "2", "3"noDefault "1".
document.blocks[] (shape 1).textstringyesAt most 20000 characters.
document.blocks[] (shape 1).styleobjectno
document.blocks[] (shape 1).style.colorstringno
document.blocks[] (shape 1).style.backgroundstringno
document.blocks[] (shape 1).style.alignone of "left", "center", "right"no
document.blocks[] (shape 1).style.paddingintegerno0 to 80.
document.blocks[] (shape 2).type"paragraph"yes
document.blocks[] (shape 2).textstringyesAt most 20000 characters.
document.blocks[] (shape 2).styleobjectno
document.blocks[] (shape 2).style.colorstringno
document.blocks[] (shape 2).style.backgroundstringno
document.blocks[] (shape 2).style.alignone of "left", "center", "right"no
document.blocks[] (shape 2).style.paddingintegerno0 to 80.
document.blocks[] (shape 3).type"image"yes
document.blocks[] (shape 3).srcstringyes
document.blocks[] (shape 3).altstringyesAt most 500 characters.
document.blocks[] (shape 3).hrefstringno
document.blocks[] (shape 3).widthintegerno16 to 1200.
document.blocks[] (shape 3).styleobjectno
document.blocks[] (shape 3).style.colorstringno
document.blocks[] (shape 3).style.backgroundstringno
document.blocks[] (shape 3).style.alignone of "left", "center", "right"no
document.blocks[] (shape 3).style.paddingintegerno0 to 80.
document.blocks[] (shape 4).type"button"yes
document.blocks[] (shape 4).labelstringyes1 to 200 characters.
document.blocks[] (shape 4).hrefstringyes
document.blocks[] (shape 4).styleobjectno
document.blocks[] (shape 4).style.colorstringno
document.blocks[] (shape 4).style.backgroundstringno
document.blocks[] (shape 4).style.alignone of "left", "center", "right"no
document.blocks[] (shape 4).style.paddingintegerno0 to 80.
document.blocks[] (shape 5).type"divider"yes
document.blocks[] (shape 5).styleobjectno
document.blocks[] (shape 5).style.colorstringno
document.blocks[] (shape 5).style.backgroundstringno
document.blocks[] (shape 5).style.alignone of "left", "center", "right"no
document.blocks[] (shape 5).style.paddingintegerno0 to 80.
document.blocks[] (shape 6).type"spacer"yes
document.blocks[] (shape 6).heightintegeryes4 to 200.
document.blocks[] (shape 7).type"html"yes
document.blocks[] (shape 7).htmlstringyesAt most 200000 characters.
document.blocks[] (shape 8).type"columns"yes
document.blocks[] (shape 8).columnsarray of objectyesAt most 3 items.
document.blocks[] (shape 8).columns[].blocksarray of objectyesAt most 20 items.
document.blocks[] (shape 8).styleobjectno
document.blocks[] (shape 8).style.colorstringno
document.blocks[] (shape 8).style.backgroundstringno
document.blocks[] (shape 8).style.alignone of "left", "center", "right"no
document.blocks[] (shape 8).style.paddingintegerno0 to 80.
htmlstring or nullyes
textstring or nullyes
variablesarray of objectyes
variables[].keystringyes1 to 64 characters.
variables[].typeone of "string", "number", "boolean"yes
variables[].fallback_valuestring or number or boolean or nullyes
variables[].requiredbooleanyes
created_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
updated_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
published_atstring (date-time) or nullyesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl https://api.minket.com/v1/templates/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
  -H "Authorization: Bearer $MINKET_API_KEY"

Update a template (creates a new draft version)

PATCH /v1/templates/{id}

Operation updateTemplate, SDK minket.templates.update. Keys: full access. Live keys only: test keys get 403 test_mode_only.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Request body

FieldTypeRequiredDescription
namestringno1 to 100 characters.
aliasstring or nullnoAt most 100 characters.
subjectstring or nullnoAt most 998 characters.
fromstring or nullnoAn email address, optionally with a display name as Name <address>. 3 to 998 characters.
reply_tostring or array of stringnoOne address, or an array of up to 50.
documentobjectno
document.version1yes
document.settingsobjectnoDefault {"width":600,"background":"#f4f4f5","font":"system"}.
document.settings.widthintegerno320 to 800. Default 600.
document.settings.backgroundstringnoDefault "#f4f4f5".
document.settings.fontone of "system", "serif", "mono"noDefault "system".
document.settings.footerstringnoAt most 2000 characters.
document.blocksarray of objectyesAt most 200 items.
document.blocks[] (shape 1).type"heading"yes
document.blocks[] (shape 1).levelone of "1", "2", "3"noDefault "1".
document.blocks[] (shape 1).textstringyesAt most 20000 characters.
document.blocks[] (shape 1).styleobjectno
document.blocks[] (shape 1).style.colorstringno
document.blocks[] (shape 1).style.backgroundstringno
document.blocks[] (shape 1).style.alignone of "left", "center", "right"no
document.blocks[] (shape 1).style.paddingintegerno0 to 80.
document.blocks[] (shape 2).type"paragraph"yes
document.blocks[] (shape 2).textstringyesAt most 20000 characters.
document.blocks[] (shape 2).styleobjectno
document.blocks[] (shape 2).style.colorstringno
document.blocks[] (shape 2).style.backgroundstringno
document.blocks[] (shape 2).style.alignone of "left", "center", "right"no
document.blocks[] (shape 2).style.paddingintegerno0 to 80.
document.blocks[] (shape 3).type"image"yes
document.blocks[] (shape 3).srcstringyes
document.blocks[] (shape 3).altstringyesAt most 500 characters.
document.blocks[] (shape 3).hrefstringno
document.blocks[] (shape 3).widthintegerno16 to 1200.
document.blocks[] (shape 3).styleobjectno
document.blocks[] (shape 3).style.colorstringno
document.blocks[] (shape 3).style.backgroundstringno
document.blocks[] (shape 3).style.alignone of "left", "center", "right"no
document.blocks[] (shape 3).style.paddingintegerno0 to 80.
document.blocks[] (shape 4).type"button"yes
document.blocks[] (shape 4).labelstringyes1 to 200 characters.
document.blocks[] (shape 4).hrefstringyes
document.blocks[] (shape 4).styleobjectno
document.blocks[] (shape 4).style.colorstringno
document.blocks[] (shape 4).style.backgroundstringno
document.blocks[] (shape 4).style.alignone of "left", "center", "right"no
document.blocks[] (shape 4).style.paddingintegerno0 to 80.
document.blocks[] (shape 5).type"divider"yes
document.blocks[] (shape 5).styleobjectno
document.blocks[] (shape 5).style.colorstringno
document.blocks[] (shape 5).style.backgroundstringno
document.blocks[] (shape 5).style.alignone of "left", "center", "right"no
document.blocks[] (shape 5).style.paddingintegerno0 to 80.
document.blocks[] (shape 6).type"spacer"yes
document.blocks[] (shape 6).heightintegeryes4 to 200.
document.blocks[] (shape 7).type"html"yes
document.blocks[] (shape 7).htmlstringyesAt most 200000 characters.
document.blocks[] (shape 8).type"columns"yes
document.blocks[] (shape 8).columnsarray of objectyesAt most 3 items.
document.blocks[] (shape 8).columns[].blocksarray of objectyesAt most 20 items.
document.blocks[] (shape 8).styleobjectno
document.blocks[] (shape 8).style.colorstringno
document.blocks[] (shape 8).style.backgroundstringno
document.blocks[] (shape 8).style.alignone of "left", "center", "right"no
document.blocks[] (shape 8).style.paddingintegerno0 to 80.
htmlstringnoAt most 1048576 characters.
textstringno
variablesarray of objectnoAt most 100 items.
variables[].keystringyes1 to 64 characters.
variables[].typeone of "string", "number", "boolean"yes
variables[].fallback_valuestring or number or boolean or nullyes
variables[].requiredbooleanno
publishbooleannoDefault false.

Response

200 Success: object.

FieldTypeRequiredDescription
object"template"yes
idstringyesA UUID.
current_versionintegeryes
published_versioninteger or nullyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl -X PATCH https://api.minket.com/v1/templates/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
  -H "Authorization: Bearer $MINKET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subject":"Receipt for order {{order}}"}'

Delete a template

DELETE /v1/templates/{id}

Operation deleteTemplate, SDK minket.templates.delete. Keys: full access. Live keys only: test keys get 403 test_mode_only.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Response

200 Success: object.

FieldTypeRequiredDescription
object"template"yes
idstringyes
deletedtrueyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl -X DELETE https://api.minket.com/v1/templates/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
  -H "Authorization: Bearer $MINKET_API_KEY"

Publish the current draft version

POST /v1/templates/{id}/publish

Operation publishTemplate, SDK minket.templates.publish. Keys: full access. Live keys only: test keys get 403 test_mode_only.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Response

200 Success: object.

FieldTypeRequiredDescription
object"template"yes
idstringyesA UUID.
current_versionintegeryes
published_versioninteger or nullyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl -X POST https://api.minket.com/v1/templates/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/publish \
  -H "Authorization: Bearer $MINKET_API_KEY"

Duplicate a template

POST /v1/templates/{id}/duplicate

Operation duplicateTemplate, SDK minket.templates.duplicate. Keys: full access. Live keys only: test keys get 403 test_mode_only.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Response

201 Created: object.

FieldTypeRequiredDescription
object"template"yes
idstringyesA UUID.
current_versionintegeryes
published_versioninteger or nullyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl -X POST https://api.minket.com/v1/templates/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/duplicate \
  -H "Authorization: Bearer $MINKET_API_KEY"

List a template's versions

GET /v1/templates/{id}/versions

Operation listTemplateVersions, SDK minket.templates.versions. Keys: full access. Test keys work on test-mode data.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Response

200 Success: object.

FieldTypeRequiredDescription
object"list"yes
dataarray of objectyes
data[].versionintegeryes
data[].subjectstring or nullyes
data[].documentobject or nullyes
data[].document.version1yes
data[].document.settingsobjectnoDefault {"width":600,"background":"#f4f4f5","font":"system"}.
data[].document.settings.widthintegerno320 to 800. Default 600.
data[].document.settings.backgroundstringnoDefault "#f4f4f5".
data[].document.settings.fontone of "system", "serif", "mono"noDefault "system".
data[].document.settings.footerstringnoAt most 2000 characters.
data[].document.blocksarray of objectyesAt most 200 items.
data[].document.blocks[] (shape 1).type"heading"yes
data[].document.blocks[] (shape 1).levelone of "1", "2", "3"noDefault "1".
data[].document.blocks[] (shape 1).textstringyesAt most 20000 characters.
data[].document.blocks[] (shape 1).styleobjectno
data[].document.blocks[] (shape 2).type"paragraph"yes
data[].document.blocks[] (shape 2).textstringyesAt most 20000 characters.
data[].document.blocks[] (shape 2).styleobjectno
data[].document.blocks[] (shape 3).type"image"yes
data[].document.blocks[] (shape 3).srcstringyes
data[].document.blocks[] (shape 3).altstringyesAt most 500 characters.
data[].document.blocks[] (shape 3).hrefstringno
data[].document.blocks[] (shape 3).widthintegerno16 to 1200.
data[].document.blocks[] (shape 3).styleobjectno
data[].document.blocks[] (shape 4).type"button"yes
data[].document.blocks[] (shape 4).labelstringyes1 to 200 characters.
data[].document.blocks[] (shape 4).hrefstringyes
data[].document.blocks[] (shape 4).styleobjectno
data[].document.blocks[] (shape 5).type"divider"yes
data[].document.blocks[] (shape 5).styleobjectno
data[].document.blocks[] (shape 6).type"spacer"yes
data[].document.blocks[] (shape 6).heightintegeryes4 to 200.
data[].document.blocks[] (shape 7).type"html"yes
data[].document.blocks[] (shape 7).htmlstringyesAt most 200000 characters.
data[].document.blocks[] (shape 8).type"columns"yes
data[].document.blocks[] (shape 8).columnsarray of objectyesAt most 3 items.
data[].document.blocks[] (shape 8).styleobjectno
data[].htmlstring or nullyes
data[].textstring or nullyes
data[].variablesarray of objectyes
data[].variables[].keystringyes1 to 64 characters.
data[].variables[].typeone of "string", "number", "boolean"yes
data[].variables[].fallback_valuestring or number or boolean or nullyes
data[].variables[].requiredbooleanyes
data[].published_atstring (date-time) or nullyesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
data[].created_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
has_morebooleanyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl https://api.minket.com/v1/templates/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/versions \
  -H "Authorization: Bearer $MINKET_API_KEY"

Get one version

GET /v1/templates/{id}/versions/{version}

Operation getTemplateVersion, SDK minket.templates.version. Keys: full access. Test keys work on test-mode data.

Parameters

NameInTypeRequiredDescription
idpathstringyes
versionpathintegeryes

Response

200 Success: object.

FieldTypeRequiredDescription
versionintegeryes
subjectstring or nullyes
documentobject or nullyes
document.version1yes
document.settingsobjectnoDefault {"width":600,"background":"#f4f4f5","font":"system"}.
document.settings.widthintegerno320 to 800. Default 600.
document.settings.backgroundstringnoDefault "#f4f4f5".
document.settings.fontone of "system", "serif", "mono"noDefault "system".
document.settings.footerstringnoAt most 2000 characters.
document.blocksarray of objectyesAt most 200 items.
document.blocks[] (shape 1).type"heading"yes
document.blocks[] (shape 1).levelone of "1", "2", "3"noDefault "1".
document.blocks[] (shape 1).textstringyesAt most 20000 characters.
document.blocks[] (shape 1).styleobjectno
document.blocks[] (shape 1).style.colorstringno
document.blocks[] (shape 1).style.backgroundstringno
document.blocks[] (shape 1).style.alignone of "left", "center", "right"no
document.blocks[] (shape 1).style.paddingintegerno0 to 80.
document.blocks[] (shape 2).type"paragraph"yes
document.blocks[] (shape 2).textstringyesAt most 20000 characters.
document.blocks[] (shape 2).styleobjectno
document.blocks[] (shape 2).style.colorstringno
document.blocks[] (shape 2).style.backgroundstringno
document.blocks[] (shape 2).style.alignone of "left", "center", "right"no
document.blocks[] (shape 2).style.paddingintegerno0 to 80.
document.blocks[] (shape 3).type"image"yes
document.blocks[] (shape 3).srcstringyes
document.blocks[] (shape 3).altstringyesAt most 500 characters.
document.blocks[] (shape 3).hrefstringno
document.blocks[] (shape 3).widthintegerno16 to 1200.
document.blocks[] (shape 3).styleobjectno
document.blocks[] (shape 3).style.colorstringno
document.blocks[] (shape 3).style.backgroundstringno
document.blocks[] (shape 3).style.alignone of "left", "center", "right"no
document.blocks[] (shape 3).style.paddingintegerno0 to 80.
document.blocks[] (shape 4).type"button"yes
document.blocks[] (shape 4).labelstringyes1 to 200 characters.
document.blocks[] (shape 4).hrefstringyes
document.blocks[] (shape 4).styleobjectno
document.blocks[] (shape 4).style.colorstringno
document.blocks[] (shape 4).style.backgroundstringno
document.blocks[] (shape 4).style.alignone of "left", "center", "right"no
document.blocks[] (shape 4).style.paddingintegerno0 to 80.
document.blocks[] (shape 5).type"divider"yes
document.blocks[] (shape 5).styleobjectno
document.blocks[] (shape 5).style.colorstringno
document.blocks[] (shape 5).style.backgroundstringno
document.blocks[] (shape 5).style.alignone of "left", "center", "right"no
document.blocks[] (shape 5).style.paddingintegerno0 to 80.
document.blocks[] (shape 6).type"spacer"yes
document.blocks[] (shape 6).heightintegeryes4 to 200.
document.blocks[] (shape 7).type"html"yes
document.blocks[] (shape 7).htmlstringyesAt most 200000 characters.
document.blocks[] (shape 8).type"columns"yes
document.blocks[] (shape 8).columnsarray of objectyesAt most 3 items.
document.blocks[] (shape 8).columns[].blocksarray of objectyesAt most 20 items.
document.blocks[] (shape 8).styleobjectno
document.blocks[] (shape 8).style.colorstringno
document.blocks[] (shape 8).style.backgroundstringno
document.blocks[] (shape 8).style.alignone of "left", "center", "right"no
document.blocks[] (shape 8).style.paddingintegerno0 to 80.
htmlstring or nullyes
textstring or nullyes
variablesarray of objectyes
variables[].keystringyes1 to 64 characters.
variables[].typeone of "string", "number", "boolean"yes
variables[].fallback_valuestring or number or boolean or nullyes
variables[].requiredbooleanyes
published_atstring (date-time) or nullyesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
created_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl https://api.minket.com/v1/templates/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/versions/1 \
  -H "Authorization: Bearer $MINKET_API_KEY"

Render a template with variables

POST /v1/templates/{id}/preview

Operation previewTemplate, SDK minket.templates.preview. Keys: full access. Test keys work on test-mode data.

Parameters

NameInTypeRequiredDescription
idpathstringyes

Request body

FieldTypeRequiredDescription
variablesmap of string or number or boolean or nullno
versionintegerno

Response

200 Success: object.

FieldTypeRequiredDescription
subjectstringyes
htmlstringyes
textstringyes
missingarray of stringyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl -X POST https://api.minket.com/v1/templates/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/preview \
  -H "Authorization: Bearer $MINKET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"variables":{"order":"10452"}}'

Updated