Templates

Create a template

Creates an email template project from Samva's canonical TSX starter and returns its template entry with status 201.

post/v1/templates

Request

  • Base URL: https://api.samva.dev
  • URL: https://api.samva.dev/v1/templates
  • Auth: API key in header x-api-key

Request body

namestring required
projectNamestring nullable
slugstring nullable
galleryTemplateIdstring nullable
useBrandboolean nullable

With galleryTemplateId: whether the new project's theme.css imports the organization's default brand (@import "samva:brand";) over the starter's look. Defaults to false.

descriptionstring nullable
category'transactional' | 'marketing' | 'support' | 'notification' | 'verification' | 'reminder' | 'alert' nullable
isActiveboolean nullable
namespaceIdstring
sharedboolean nullable

Share the new organization-level project with every namespace: namespace-scoped keys read and send its entries but cannot change them. Defaults to false. Not with namespaceId, and not from a namespace-scoped key.

idempotencyKeystring required

Response

Success

idstring required
slugstring required
namestring required
channel'email' required
projectIdstring required
namespaceIdstring required
sharedboolean required

Whether the template's project is shared with every namespace. Every entry in a project shares it. A namespace-scoped key reads and sends a shared template in its own namespace but cannot change it. Only an organization-level project is shared.

entryPathstring required
status'draft' | 'pending' | 'approved' | 'published' | 'rejected' | 'archived' required
isActiveboolean required
publishedAtstring nullable required
usageCountinteger required
lastUsedAtstring nullable required
createdAtstring required
updatedAtstring required
familyIdstring required
descriptionstring nullable required
category'transactional' | 'marketing' | 'support' | 'notification' | 'verification' | 'reminder' | 'alert' nullable required
replyToDefaultstring[] nullable required
publicationIdstring required
inputContractIdstring required
inputSchemaobject nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.