{
  "Status": true,
  "Message": "",
  "Response": {
    "post": {
      "postuid": "630ffe2f-9aa4-498d-b3d0-ae8485456707",
      "tenantuid": "d8b744fc-2e70-4089-bb80-dd1d08f6c7b2",
      "projectuid": "239698c5-f7eb-4574-8cc8-c6568f08b3a0",
      "title": "Creating and sending your first transactional email",
      "slug": "article/creating-and-sending-your-first-transactional-email",
      "html": "\u003Cp\u003EThe DailyStory marketing automation platform includes support for \u003Ca href=\u0022https://www.dailystory.com/blog/transactional-email/\u0022\u003Etransactional email\u003C/a\u003E. In this tutorial we\u0027re going to create a transactional email and send it using the DailyStory APIs.\u003C/p\u003E\u003Cp\u003EDailyStory supports 2 ways to send transactional email:\u003C/p\u003E\u003Col\u003E\u003Cli\u003ESend the \u003Ca href=\u0022https://dev.dailystory.com/reference/send-to-single-contact\u0022\u003Efull email to the API\u003C/a\u003E\u003C/li\u003E\u003Cli\u003EUse an \u003Ca href=\u0022https://dev.dailystory.com/reference/sends-email-to-lead\u0022\u003Eemail template and send tokens to the API\u003C/a\u003E\u003C/li\u003E\u003C/ol\u003E\u003Cp\u003EIn most cases, and for the purpose of this tutorial, use option 2 as this is the simplest way to send emails.\u003C/p\u003E\u003Ch2 id=\u0022create_your_transactional_email\u0022\u003ECreate your transactional email\u003C/h2\u003E\u003Cp\u003EThe first step is to create your transactional email in DailyStory. If you don\u0027t have a DailyStory account, you can \u003Ca href=\u0022https://app.dailystory.com/free\u0022\u003Ecreate one for free\u003C/a\u003E.\u003C/p\u003E\u003Cp\u003EThere are several options for creating your transactional email:\u003C/p\u003E\u003Cul\u003E\u003Cli\u003EImport your own HTML;\u003C/li\u003E\u003Cli\u003EDesign your own email with our drag-and-drop designer;\u003C/li\u003E\u003Cli\u003EUse one of our built-in templates;\u003C/li\u003E\u003Cli\u003EOr use the \u003Ca href=\u0022https://dev.dailystory.com/reference/create-or-update-email\u0022\u003EAPI to create an email\u003C/a\u003E.\u003C/li\u003E\u003C/ul\u003E\u003Ccite class=\u0022recommended\u0022\u003E\u003Cspan class=\u0022title\u0022\u003ERecommended\u003C/span\u003E\u003Cp\u003EWe recommend using a built-in template because it\u0027s already designed to be mobile friendly.\u003C/p\u003E\u003C/cite\u003E\u003Ch3 id=\u0022using_a_builtin_template\u0022\u003EUsing a built-in template\u003C/h3\u003E\u003Cp\u003ELogin to your DailyStory account and \u003Ca href=\u0022https://docs.dailystory.com/article/x284lgm51p-create-a-campaign\u0022\u003Ecreate a new campaign\u003C/a\u003E, \u0022Transactional Email Example\u0022. In the campaign navigate to Assets, click \u002B Add Asset, and from the popup click Add an Email:\u003C/p\u003E\u003Cimg class=\u0022lazy-load\u0022 data-width=\u00221311\u0022 data-height=\u0022823\u0022 data-src=\u0022https://graffiti-auf7e6dwhxhcbwek.z03.azurefd.net/d8b744fc-2e70-4089-bb80-dd1d08f6c7b2/239698c5-f7eb-4574-8cc8-c6568f08b3a0/17b4775a-7c24-4eba-8994-ae51c9abc501.png?v=1508830735\u0022 style=\u0022\u0022 alt=\u0022\u0022/\u003E\u003Cp\u003EThis will open the email templates. Select the Pre-built Email Templates tab, the Transactional category and click the first template in the list:\u003C/p\u003E\u003Cimg class=\u0022lazy-load\u0022 data-width=\u00221311\u0022 data-height=\u0022465\u0022 data-src=\u0022https://graffiti-auf7e6dwhxhcbwek.z03.azurefd.net/d8b744fc-2e70-4089-bb80-dd1d08f6c7b2/239698c5-f7eb-4574-8cc8-c6568f08b3a0/6eadcf99-e174-48dd-9fda-7e228d7a0fb2.png?v=1810504959\u0022 style=\u0022\u0022 alt=\u0022\u0022/\u003E\u003Cp\u003E\u003C/p\u003E\u003Cp\u003EThis will take you to the email settings screen. These options are \u003Ca href=\u0022https://docs.dailystory.com/article/g5d6kyabxb-create-an-email\u0022\u003Edetailed here\u003C/a\u003E. You can name the email whatever you like, for example Transactional Template.\u003C/p\u003E\u003Ch2 id=\u0022insert_personalization_tokens\u0022\u003EInsert personalization tokens\u003C/h2\u003E\u003Cp\u003EUsing a template for your transactional emails enables you to use all the power of the DailyStory drag-and-drop email designer. But, it requires that you add \u003Ca href=\u0022https://docs.dailystory.com/article/qzdfgegk5z-personalization\u0022\u003Epersonalization\u003C/a\u003E tokens where you want replacements to take place.\u003C/p\u003E\u003Cp\u003EFor example, you may have several transactional emails to send using this template. Each, will use a distinct subject, preheader, logo and body. To accomplish this we\u0027ll need to insert personalization tokens.\u003C/p\u003E\u003Ch3 id=\u0022subject_and_preheader_tokens\u0022\u003ESubject and preheader tokens\u003C/h3\u003E\u003Cp\u003EThe first token we\u0027ll set up is the subject line: {{@ profile.email_subject}}. and next we\u0027ll set another token for the preheader: {{@ profile.email_preheader}}.\u003C/p\u003E\u003Ccite class=\u0022important\u0022\u003E\u003Cspan class=\u0022title\u0022\u003EImportant\u003C/span\u003E\u003Cp\u003EWe\u0027ve used the names email_subject and email_preheader, but you can use any value you would like.\u003C/p\u003E\u003C/cite\u003E\u003Cimg class=\u0022lazy-load\u0022 data-width=\u00221311\u0022 data-height=\u0022782\u0022 data-src=\u0022https://graffiti-auf7e6dwhxhcbwek.z03.azurefd.net/d8b744fc-2e70-4089-bb80-dd1d08f6c7b2/239698c5-f7eb-4574-8cc8-c6568f08b3a0/23c3c89a-d2d8-41d9-ac20-176274970b49.png?v=-2118474570\u0022 style=\u0022\u0022 alt=\u0022\u0022/\u003E\u003Ch3 id=\u0022logo_and_body_tokens\u0022\u003ELogo and body tokens\u003C/h3\u003E\u003Cp\u003ENext, Click Save Changes and click Design Email. In this step you\u0027ll need to edit your email and replace or remove content with your personalization tokens. For example, we\u0027ve set a personalization token for the body as well as the CTA button\u0027s text and URL:\u003C/p\u003E\u003Cimg class=\u0022lazy-load\u0022 data-width=\u00221311\u0022 data-height=\u0022578\u0022 data-src=\u0022https://graffiti-auf7e6dwhxhcbwek.z03.azurefd.net/d8b744fc-2e70-4089-bb80-dd1d08f6c7b2/239698c5-f7eb-4574-8cc8-c6568f08b3a0/e95165ad-94ab-4df4-8c34-3c3ed9f0671f.png?v=-1645070996\u0022 style=\u0022\u0022 alt=\u0022\u0022/\u003E\u003Cp\u003EFinally, Save \u0026amp; Close the designer - you can always update/change this template later. This should take you back to the campaign.\u003C/p\u003E\u003Ch2 id=\u0022sending_your_email_with_the_api\u0022\u003ESending your email with the API\u003C/h2\u003E\u003Cp\u003ENow that you\u0027ve created the email with the personalization tokens, let\u0027s send the email using the \u003Ca href=\u0022https://dev.dailystory.com/\u0022\u003EDailyStory API\u003C/a\u003E.\u003C/p\u003E\u003Ccite class=\u0022recommended\u0022\u003E\u003Cspan class=\u0022title\u0022\u003ERecommended\u003C/span\u003E\u003Cp\u003EYou may want to open a text editor to keep track of the details needed in the next few steps.\u003C/p\u003E\u003C/cite\u003E\u003Ch3 id=\u0022mark_as_transactional_and_get_the_email_id\u0022\u003EMark as Transactional and get the Email ID\u003C/h3\u003E\u003Cp\u003ENavigate to the transaction email you created above and expand the email\u0027s Advanced Options. Mark Is Transactional\u0026nbsp;to on and copy the Email API ID:\u003C/p\u003E\u003Cimg class=\u0022lazy-load\u0022 data-width=\u00221219\u0022 data-height=\u0022474\u0022 data-src=\u0022https://graffiti-auf7e6dwhxhcbwek.z03.azurefd.net/d8b744fc-2e70-4089-bb80-dd1d08f6c7b2/239698c5-f7eb-4574-8cc8-c6568f08b3a0/ed884bae-cf11-4dae-8ada-c97edc7caae1.png?v=-1481391987\u0022 style=\u0022\u0022 alt=\u0022\u0022/\u003E\u003Ch3 id=\u0022get_your_site_url\u0022\u003EGet your Site URL\u003C/h3\u003E\u003Cp\u003EYour Site URL is unique to your account. This is the URL you will send API requests to.\u003C/p\u003E\u003Cp\u003ENavigate to Account Settings \u0026gt; Website. Copy the Site URL.\u003C/p\u003E\u003Cp\u003EYour site URL looks like: https://us-1.dailystory.com/.\u003C/p\u003E\u003Ch3 id=\u0022get_an_api_token\u0022\u003EGet an API Token\u003C/h3\u003E\u003Cp\u003EYour API Token authorizes your access to your DailyStory account.\u003C/p\u003E\u003Cp\u003ENavigate to Account Settings \u0026gt; API Tokens. \u003Ca href=\u0022https://dev.dailystory.com/docs/create-and-use-an-api-token\u0022\u003ECopy or create an API token\u003C/a\u003E.\u003C/p\u003E\u003Ch3 id=\u0022send_the_email_with_the_email_api\u0022\u003ESend the email with the email API\u003C/h3\u003E\u003Cp\u003ENow that you have the email ID and the API token, we\u0027re ready to send the email.\u0026nbsp; We\u0027ll use the \u003Ca href=\u0022https://dev.dailystory.com/reference/sends-email-to-lead\u0022\u003ESend Email API\u003C/a\u003E to send our transactional email.\u003C/p\u003E\u003Cp\u003EFor the purpose of this example, we\u0027ll use \u003Ca href=\u0022https://www.postman.com/\u0022\u003EPostman\u003C/a\u003E. It\u0027s a great tool for testing out APIs.\u003C/p\u003E\u003Cp\u003EFirst we\u0027ll set the URL. This should look something like:\u003C/p\u003E\u003Cp\u003Ehttps://us-1.dailystory.com/api/v1/email/send/[email id]?email=[email address]\u003C/p\u003E\u003Cul\u003E\u003Cli\u003E[email id] - the DailyStory Email API ID.\u003C/li\u003E\u003Cli\u003E[email address] - the person you are sending the email to\u003C/li\u003E\u003C/ul\u003E\u003Cp\u003ENext, you\u0027ll want to set the Authorization to \u0022Bearer\u0022 and past the API Token into it:\u003C/p\u003E\u003Cimg class=\u0022lazy-load\u0022 data-width=\u0022905\u0022 data-height=\u0022254\u0022 data-src=\u0022https://graffiti-auf7e6dwhxhcbwek.z03.azurefd.net/d8b744fc-2e70-4089-bb80-dd1d08f6c7b2/239698c5-f7eb-4574-8cc8-c6568f08b3a0/3cf683ee-6958-45c9-b840-f3381956cba1.png?v=-1249554091\u0022 style=\u0022\u0022 alt=\u0022\u0022/\u003E\u003Cp\u003ENext, set the body of the email to the personalization parameters and send the message.\u003C/p\u003E\u003Cimg class=\u0022lazy-load\u0022 data-width=\u0022909\u0022 data-height=\u0022446\u0022 data-src=\u0022https://graffiti-auf7e6dwhxhcbwek.z03.azurefd.net/d8b744fc-2e70-4089-bb80-dd1d08f6c7b2/239698c5-f7eb-4574-8cc8-c6568f08b3a0/cdad3c7f-7ddc-496c-bede-3f5d40d15900.png?v=-858803954\u0022 style=\u0022\u0022 alt=\u0022\u0022/\u003E\u003Cp\u003EYou should receive an email in your inbox, here is the one from this example:\u003C/p\u003E\u003Cimg class=\u0022lazy-load\u0022 data-width=\u0022752\u0022 data-height=\u0022564\u0022 data-src=\u0022https://graffiti-auf7e6dwhxhcbwek.z03.azurefd.net/d8b744fc-2e70-4089-bb80-dd1d08f6c7b2/239698c5-f7eb-4574-8cc8-c6568f08b3a0/157b5520-4477-4557-b56f-dddc963d1433.png?v=-1036619599\u0022 style=\u0022\u0022 alt=\u0022\u0022/\u003E\u003Cp\u003E\u003C/p\u003E",
      "publish_status": 0,
      "post_type": "Article",
      "featured_image_updating": false,
      "meta_description": "Learn how to create and send personalized transactional emails using DailyStory\u0027s API with built-in templates, tokens, and step-by-step instructions.",
      "display_toc": true,
      "has_workingcopy": false,
      "allow_indexing": true,
      "sort_order": 4,
      "total_views": 177,
      "date_published": "2026-03-11T17:16:02.02",
      "date_updated": "2026-03-11T17:16:05.09",
      "date_created": "2026-03-11T17:10:13.203"
    }
  }
}