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
/v1/newsletters/{id}/issues/save

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.

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
expectedRevision*string
Length1 <= length <= 1024
expectedHead*string
Match^[a-f0-9]{40}$
message*string
Length1 <= length <= 512

Response Body

Success

application/json
  1. response
commit*string
Match^[a-f0-9]{40}$
parentCommit*string
Match^[a-f0-9]{40}$
tree*string
Match^[a-f0-9]{40}$
revision*string
changedPaths*array<>
sourceDigest*string
Match^[a-f0-9]{64}$
buildDigest*string
Match^[a-f0-9]{64}$
warnings*array<>
incompatibilities*array<>
Example Request
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"      }    }  ]}