Api referenceNewsletterIssues
Save newsletter issues (Preview)
Preview · Available to selected organizations. Validates the project and saves its draft as a Git commit with revision and branch-head fences.
POST
Validates the project and saves its draft as a Git commit with revision and branch-head fences. Issue sends pin the resulting commit and issue path. Requires newsletters and email.
apiKeyheader
x-api-key<token>id*stringMatch
^nl_[0-9a-hjkmnp-tv-z]{16,24}$idempotency-key?|nullapplication/json- body
expectedRevision*stringLength
1 <= length <= 1024expectedHead*stringMatch
^[a-f0-9]{40}$message*stringLength
1 <= length <= 512Success
application/json- response
commit*stringMatch
^[a-f0-9]{40}$parentCommit*stringMatch
^[a-f0-9]{40}$tree*stringMatch
^[a-f0-9]{40}$revision*stringchangedPaths*array<>sourceDigest*stringMatch
^[a-f0-9]{64}$buildDigest*stringMatch
^[a-f0-9]{64}$warnings*array<>incompatibilities*array<>import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.newsletters.issues.save({ "id": "example", "expectedRevision": "example", "expectedHead": "example", "message": "example"});Example Response
{ "commit": "string", "parentCommit": "string", "tree": "string", "revision": "string", "changedPaths": [ "string" ], "sourceDigest": "string", "buildDigest": "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" } } ]}