List email components
`folder` is a folder’s id (what’s directly in it), `top` (the top level) or `all`; without it, a search looks everywhere and a plain list shows the top level. Archived ones only when the status filter asks for them.
folder is a folder’s id (what’s directly in it), top (the top level) or all; without it, a search looks everywhere and a plain list shows the top level. Archived ones only when the status filter asks for them.
apiKey readAuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: read
page?integerStarts at 1
1 <= value1pageSize?numberOne of 10, 25, 50, 100
25q?stringSearch
1 <= length <= 200status?stringComma-separated, any of: draft, published, archived
sort?stringOne of name, createdAt, updatedAt; prefix with - for descending
"-updatedAt""name""-name""createdAt""-createdAt""updatedAt""-updatedAt"folder?|OK
application/json- response
items*array<>total*integerpage*integerpageSize*integercurl -X GET 'https://api.postforge.dev/v1/email-components'{ "items": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "string", "name": "string", "folder": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "status": "draft", "draftVersionId": "e7fc80a1-b65e-482e-8fcd-f6c647b4104b", "publishedVersionId": "9786f1b1-ef7e-4f6a-94c4-c8eb67e924eb", "hasUnpublishedChanges": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "archivedAt": "2019-08-24T14:15:22Z", "level": "block", "locales": [ "string" ], "thumbnailUrl": "http://example.com" } ], "total": 0, "page": 0, "pageSize": 0}Render a template POST
The template as a recipient would get it, in one locale: its HTML and plain text, with the published brand kit and components, and what an email sending it would be refused for there. A version (the latest when absent), a profile to fill it in for and an event to fill `event` with (its profile when no profile is given; an event of another profile is a 422), strictly (a variable they don’t have is a 422); without them, empty values show their fallbacks, and a template that reads `event` without one gets the `event_missing` warning.
Create a email component POST
Its first version is the draft; publish it to use it.