Get a template publication
Returns one immutable publication and its exact build receipt. Request: GET /v1/templates/{id}/publications/{publicationId}. Scope: templates:read.
GET
Returns one immutable publication and its exact build receipt.
apiKeyheader
x-api-key<token>id*stringMatch
^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$publicationId*stringMatch
^tpub_[0-9a-hjkmnp-tv-z]{16,24}$Success
application/json- response
id*TemplatePublicationIdMatch
^tpub_[0-9a-hjkmnp-tv-z]{16,24}$organizationId*OrganizationIdMatch
^org_[0-9a-hjkmnp-tv-z]{16,24}$projectId*TemplateProjectIdMatch
^tproj_[0-9a-hjkmnp-tv-z]{16,24}$templateId*TemplateIdMatch
^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$inputContractId*TemplateInputContractIdMatch
^tcon_[0-9a-hjkmnp-tv-z]{16,24}$commitSha*stringMatch
^[a-f0-9]{40}$treeSha*stringMatch
^[a-f0-9]{40}$entryPath*stringA relative .tsx file under templates or emails/, at most 1024 characters, with no backslash, . or .., or .git segments.
Length
length <= 1024buildIdentity*stringMatch
^[a-f0-9]{64}$manifest*compiled*assets*array<>warnings*array<>incompatibilities*array<>status*stringpublishedAt*stringpublishedBy*string|nullcreatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.templates.getPublication({
"id": "example",
"publicationId": "example"
});Example Response
{
"id": "string",
"organizationId": "string",
"projectId": "string",
"templateId": "string",
"inputContractId": "string",
"commitSha": "string",
"treeSha": "string",
"entryPath": "string",
"buildIdentity": "string",
"manifest": {
"templateKey": "string",
"compiled": {
"version": 1,
"digest": "string",
"bytes": 0
},
"compiler": "string",
"input": {
"schemaDigest": "string",
"contractDigest": "string"
},
"assets": {
"base": "string",
"entries": [
{
"path": "string",
"fileName": "string",
"digest": "string",
"bytes": 0,
"contentType": "string",
"url": "string"
}
]
},
"source": {
"commitSha": "string",
"treeSha": "string",
"entryPath": "string",
"treeDigest": "string"
},
"brand": {
"id": "string",
"binding": "default",
"slug": "string",
"css": "string",
"assets": {
"logoUrl": "string",
"logoDarkUrl": "string",
"iconUrl": "string"
},
"footer": {
"companyName": "string",
"websiteUrl": "string",
"address": {
"street1": "string",
"street2": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string"
},
"socialLinks": [
{
"label": "string",
"url": "string"
}
]
},
"renderedFooter": {
"html": "string",
"text": "string",
"headCss": "string"
},
"digest": "string",
"rendersFooter": "every"
}
},
"compiled": {
"key": "string",
"digest": "string"
},
"assets": [
{
"path": "string",
"fileName": "string",
"digest": "string",
"bytes": 0,
"contentType": "string",
"url": "string"
}
],
"warnings": [
{
"code": "string",
"severity": "error",
"message": "string",
"origins": [
{
"fileName": "string",
"lineNumber": 1,
"columnNumber": 1
}
],
"clients": [
"string"
],
"notes": "string",
"provenance": "string",
"fixtures": [
"string"
],
"occurrences": [
[
{
"fileName": "string",
"lineNumber": 1,
"columnNumber": 1
}
]
],
"compatibility": {
"assessment": "risk",
"title": "string"
}
}
],
"incompatibilities": [
{
"code": "string",
"severity": "error",
"message": "string",
"origins": [
{
"fileName": "string",
"lineNumber": 1,
"columnNumber": 1
}
],
"clients": [
"string"
],
"notes": "string",
"provenance": "string",
"fixtures": [
"string"
],
"occurrences": [
[
{
"fileName": "string",
"lineNumber": 1,
"columnNumber": 1
}
]
],
"compatibility": {
"assessment": "risk",
"title": "string"
}
}
],
"status": "string",
"publishedAt": "string",
"publishedBy": "string",
"createdAt": "string"
}