/v1/workspaces/{workspace_id}/notification-types/{type_id}/previewAuthPreview a notification type
Renders every routed channel with sample `data`, or as a real `recipient` (its locale: exact, then language, then the type default; its fields as `recipient.*`). Reports missing variables per channel and variables some channels use but others do not. Sends nothing.
Path parameters
workspace_id*string · uuidId of the workspace.
type_id*string · uuidId of the type.
Request body
dataobjectSample `data`, as a send would pass it (keys kept as sent). At most 16 KB.
Example: {"amount":"12.00","invoice_id":"inv_123"}
recipientstringRender as this recipient (its locale chain and fields under `recipient.*`). Nothing is sent.
Example: "user_123"
localestringLocale to render when no recipient is given (or to override it).
Example: "pt-PT"
Response · 200 The rendered channels.
channels*arrayOne entry per routed channel.
cross_channel_mismatches*objectVariables used by some channels but not others: variable → the channels missing it.
Example
Request
POST https://api.notify.productcraft.co/v1/workspaces/{workspace_id}/notification-types/{type_id}/preview
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"data": {
"amount": "12.00",
"invoice_id": "inv_123"
},
"recipient": "user_123",
"locale": "pt-PT"
}Response
{
"channels": [
{
"channel": {},
"locale": "string",
"rendered": {},
"missing_variables": [
"string"
],
"warnings": [
"string"
]
}
],
"cross_channel_mismatches": {}
}