Skip to main content

Get Template

Retrieve a single template by ID, including its full content.


Endpoint

GET https://api.campaignlark.com/v1/templates/:id

Path Parameters

ParameterTypeRequiredDescription
idintegerrequiredThe template ID.

Sample Request

GET https://api.campaignlark.com/v1/templates/1

Response

Success — 200 OK

{
"error": null,
"data": {
"id": 1,
"name": "Welcome Email",
"type": "editor",
"json_content": "{...}",
"html_content": "<html>...</html>",
"preview_url": "https://usercontent.campaignlark.com/image/abc123.png",
"processed": true
}
}

Template Object (Detail)

Includes all list fields plus:

FieldTypeDescription
json_contentstring or nullEditor JSON content (only for editor templates).
html_contentstringRendered HTML content.
preview_urlstringURL to the template preview image (empty if not yet generated).

Errors

StatusMessageCause
400Please provide a valid template ID.id path param is missing or not a number.
404We were unable to find the template.Template does not exist in the workspace.