Skip to content

Preview notification

POST/admin/v1/stores/{store_id}/notifications/messages/{message}/preview
  • notifications:manage
  • Idempotency-Key supported

Render a message with its sample data: the saved template, or unsaved edits (draft) for a live preview. Nothing is sent.

Path parameters

  • store_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

  • messagestringrequired

    Message key

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • channelenumrequired

    How a message reaches its recipient.

    • email
    • sms
    • whatsapp
  • localeenumrequired

    The languages notification templates come in. Recipients in other languages get English.

    • en
    • ar
  • draftobject · or null

    Unsaved edits to render; the saved template when absent.

Returns

200 The rendered message.

Errors

  • 403forbiddenMissing notifications:manage.
  • 404not_foundNo such message, or not on this channel.
  • 409No WhatsApp template chosen yet.
  • 422validation_failedThe draft does not render.