Skip to main content
GET
/
api
/
v1
/
templates
/
key
/
{templateKey}
Get template by key
curl --request GET \
  --url http://localhost:3001/api/v1/templates/key/{templateKey} \
  --header 'x-api-key: <api-key>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "key": "<string>",
  "type": "<string>",
  "resourceType": "<string>",
  "senderProfileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "brandKitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "defaultSegmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "source": "<string>",
  "language": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "definition": {
    "type": "Email",
    "emailContentsType": "Code",
    "codeFormat": "json",
    "from": "",
    "subject": "",
    "body": {
      "specVersion": "email-spec.v1",
      "root": "<string>",
      "elements": {}
    },
    "subType": "<string>",
    "replyTo": "<string>",
    "preheader": "<string>",
    "defaultBody": {
      "type": "doc",
      "content": [
        "<unknown>"
      ]
    },
    "renderVariables": {},
    "sensitiveTransactionalVariablePaths": [
      "<string>"
    ]
  },
  "definitionCompatibility": {
    "expectedVersion": "email-spec.v1",
    "fromVersion": "<string>",
    "issues": [
      {
        "code": "<string>",
        "message": "<string>",
        "path": "<string>"
      }
    ],
    "canAutoRepair": true
  },
  "sourceMetadata": null,
  "currentSnapshotId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

x-api-key
string
header
required

Unified API key for server-side SDK and API integrations

Path Parameters

templateKey
string
required

Stable developer key for the Template.

Required string length: 1 - 120

Response

Default Response

id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
organizationId
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
name
string
required
key
string | null
required
type
string
required
status
enum<string>
required

Lifecycle status of a message template (Active or Archived)

Available options:
Active,
Archived
resourceType
string
required
senderProfileId
string<uuid> | null
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
brandKitId
string<uuid> | null
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
purpose
enum<string>
required
Available options:
General,
Newsletter,
Promotional,
Transactional,
LeadMagnetDelivery
defaultSegmentId
string<uuid> | null
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
source
string | null
required
language
string
required
createdAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
updatedAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
definition
object
definitionCompatibility
object
sourceMetadata
unknown
currentSnapshotId
string<uuid> | null
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$