Api referenceNewsletterIssues

Render a newsletter issue fixture (Preview)

Preview · Available to selected organizations. Renders a fixture declared by the layout to email or web at the requested revision.

POST
/v1/newsletters/{id}/issues/render

Renders a fixture declared by the layout to email or web at the requested revision. The web render is the publication page readers get, with the subscribe wall position marked. Requires newsletters and email.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^nl_[0-9a-hjkmnp-tv-z]{16,24}$

Header Parameters

idempotency-key?|null

Request Body

application/json
  1. body
path*string
Match^(?!.*\\)(?!.*(?:^|\/)\.{1,2}(?:\/|$))(?!.*(?:^|\/)\.git(?:\/|$))(?!.*\p{Cc})issues\/(?:[^/]+\/)*[^/]+\.md$
Lengthlength <= 1024
expectedRevision*string
Length1 <= length <= 1024
fixture*string
Length1 <= length <= 128
target*string
Value in"email""web"

Response Body

Success

application/json
  1. response
projectId*TemplateProjectId
Match^tproj_[0-9a-hjkmnp-tv-z]{16,24}$
revision*string
entryPath*|
declaration*|null
issue?
diagnostics*array<>
incompatibilities*array<>
fixture*string
Length1 <= length <= 128
rendered*|null
page?|null
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.newsletters.issues.render({  "id": "example",  "path": "example",  "expectedRevision": "example",  "fixture": "example",  "target": "email"});
Example Response
{  "projectId": "string",  "revision": "string",  "entryPath": "string",  "declaration": {    "codeDigest": "string",    "templateId": "string",    "input": {      "schema": {        "property1": "string",        "property2": "string"      },      "schemaDigest": "string",      "contractDigest": "string"    },    "fixtures": [      "string"    ]  },  "issue": {    "path": "string",    "frontmatter": {      "title": "string",      "date": "string",      "slug": "string",      "topic": "string",      "preheader": "string",      "seo": {        "title": "string",        "description": "string",        "image": "string"      },      "gate": {        "leadIn": 0      }    }  },  "diagnostics": [    {      "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"      }    }  ],  "fixture": "string",  "rendered": {    "subject": "string",    "preheader": "string",    "html": "string",    "text": "string",    "selections": [      {        "instancePath": "string",        "tag": "string",        "origins": [          {            "fileName": "string",            "lineNumber": 1,            "columnNumber": 1          }        ],        "authored": true,        "occurrence": 1,        "occurrences": 1,        "parentPath": "string",        "start": 0,        "end": 0      }    ],    "sentBytes": -9007199254740991,    "previewBytes": -9007199254740991  },  "page": {    "kind": "page",    "html": "string",    "selections": [      {        "instancePath": "string",        "tag": "string",        "origins": [          {            "fileName": "string",            "lineNumber": 1,            "columnNumber": 1          }        ],        "authored": true,        "occurrence": 1,        "occurrences": 1,        "parentPath": "string",        "start": 0,        "end": 0      }    ]  }}