Skip to content

Render a saved mailing

On this page
POST/v1/mailings/{mailing_id}/renderrender_mailing
Riskread
AuthenticationAPI key or OAuth access token
Scopesmailings:read
Idempotencynatural: repeating the call gives the same result
Dry runnot applicable
Success status200
Response typeapplication/json

What it does#

  • Use when: You want the HTML, plain text, byte size and problems of a saved mailing, with a fix for each problem.
  • Do not use when: you have not saved the content yet (call render_design).
  • Side effects: None.
  • Reversible: Not applicable, nothing changes.
  • Required scope: mailings:read.
  • Idempotency: safe to repeat.
  • Typical next step: call update_mailing_draft to fix problems, or preview_send when sendable is true.

Scopes#

  • mailings:read: Read mailings and preview what a send would do.

Request#

Path parameters#

FieldTypeDescription
mailing_idstring

Query parameters#

None.

Response#

FieldTypeRequiredDescription
htmlstringyes
textstringyes
bytesinteger, min -9007199254740991, max 9007199254740991yes
max_bytesinteger, min -9007199254740991, max 9007199254740991yes
sendablebooleanyesFalse while any error-severity problem remains
problemsarray of objectyes
problems[].severityone of "error", "warning"yes
problems[].codestringyes
problems[].messagestringyes
problems[].block_idstringno
problems[].fieldstringnoThe request field to change, for example simple.facts.author_name, when the problem comes from something you sent
problems[].fixstringyesOne imperative sentence: what to change

Examples#

clean#

Request:

curl -X POST 'https://api.seemly.com/v1/mailings/cmp_2c4e6g8j0m2p4r6t8w0y2a4c/render' \
  -H "Authorization: Bearer $SEEMLY_API_KEY"

Response: 200:

JSON
{
  "html": "<!doctype html><html><body><p>Hello</p></body></html>",
  "text": "Hello",
  "bytes": 52,
  "max_bytes": 92160,
  "sendable": true,
  "problems": []
}

Errors#

Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.

Typical next steps#

View this page as MarkdownReport a problem with this page

Type to search. Try a method and path, an operation name or an error code.