Notify API reference

Notify API · Notification-Types

post/v1/workspaces/{workspace_id}/notification-types/{type_id}/previewAuth

Preview 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 · uuid

Id of the workspace.

type_id*string · uuid

Id of the type.

Request body

dataobject

Sample `data`, as a send would pass it (keys kept as sent). At most 16 KB.

Example: {"amount":"12.00","invoice_id":"inv_123"}

recipientstring

Render as this recipient (its locale chain and fields under `recipient.*`). Nothing is sent.

Example: "user_123"

localestring

Locale to render when no recipient is given (or to override it).

Example: "pt-PT"

Response · 200 The rendered channels.

channels*array

One entry per routed channel.

cross_channel_mismatches*object

Variables 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": {}
}