Skip to content

Save notification template

PUT/admin/v1/stores/{store_id}/notifications/messages/{message}/templates/{channel}/{locale}
  • notifications:manage

Save the store's version of a template (one channel, one language). It must render with the message's sample data; syntax and rendering errors come back per field with their line.

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

  • channelstringrequired

    email, sms or whatsapp

  • localestringrequired

    en or ar

Headers

  • shop-api-versionYYYY-MM

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

Body

  • subjectstring · or null
  • bodystring · or null
  • textstring · or null
  • templatestring · or null

    The approved WhatsApp template's name.

  • languagestring · or null

    The WhatsApp template's language code.

  • parametersarray of strings · or null

    The WhatsApp body variables {{1}}, {{2}}… in order.

  • button_parameterstring · or null

    The variable of a WhatsApp URL or copy-code button.

Returns

200 The saved template.

Errors

  • 403forbiddenMissing notifications:manage.
  • 404not_foundNo such message, or not on this channel.
  • 422validation_failedMissing fields or a template that does not render.