Skip to content

This page is available as Markdown at https://developers.klaviyo.com/en/v2025-01-15/reference/create_universal_content.md. An index of every page is at https://developers.klaviyo.com/llms.txt.

KlaviyoKlaviyoDevelopers
v2025-01-15

You're reading the reference for API revision 2025-01-15. The latest revision is 2026-10-15. See this page in the latest revision.

Create Universal Content

POSThttps://a.klaviyo.com/api/template-universal-content

Create universal content. Only text blocks, which can include text or HTML, are supported at this time.

Revision header
revision: 2025-01-15required
Scopes
templates:write
Rate limits
Burst: 10/sSteady: 150/m

Headers

  • revision#stringrequired

    API endpoint revision (format: YYYY-MM-DD[.suffix])

    2025-01-15

Request body

Content type: application/vnd.api+jsonrequired

  • data#objectrequired
    Show 2 fields
    • type#stringrequired
      Allowed values:
      • template-universal-content
    • attributes#objectrequired
      Show 2 fields
      • name#stringrequired

        The name for this universal content

      • definition#oneOfrequired

        One of:

        1. Option 1: HTMLBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • html
          • data#objectrequired
            Show 2 fields
            • content#stringrequired
            • display_options#objectrequired
              Show 3 fields
              • show_on#stringnullable

                Show on.

                Allowed values:
                • all
                • desktop
                • mobile
              • visible_check#stringnullable
              • content_repeat#object
                Show 2 fields
                • repeat_for#stringrequired
                • item_alias#stringrequired
        2. Option 2: TextBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • text
          • data#objectrequired
            Show 3 fields
            • content#stringrequired
            • display_options#BlockDisplayOptionsrequired

              Same fields as the first BlockDisplayOptions above.

            • styles#objectrequired
              Show 25 fields
              • background_color#stringnullable
              • block_background_color#stringnullable
              • block_border_color#stringnullable
              • block_border_style#stringnullable

                Border style.

                Allowed values:
                • dashed
                • dotted
                • groove
                • inset
                • none
                • outset
                • ridge
                • solid
              • block_border_width#integernullable
              • block_padding_bottom#integernullable
              • block_padding_left#integernullable
              • block_padding_right#integernullable
              • block_padding_top#integernullable
              • color#stringnullable
              • extra_css_class#stringnullable
              • font_family#stringnullable
              • font_size#integernullable
              • font_style#stringnullable

                Font style.

                Allowed values:
                • italic
                • normal
              • font_weight#stringnullable
              • inner_padding_bottom#integernullable
              • inner_padding_left#integernullable
              • inner_padding_right#integernullable
              • inner_padding_top#integernullable
              • letter_spacing#integernullable
              • line_height#numbernullable
              • mobile_stretch_content#booleannullable
              • text_align#stringnullable

                Text Alignment.

                Allowed values:
                • center
                • left
                • right
              • text_decoration#stringnullable
              • text_table_layout#stringnullable

                Text table layout.

                Allowed values:
                • auto
                • fixed
                • inherit
                • initial

Responses

201Success

Content type: application/vnd.api+json

  • data#objectrequired
    Show 4 fields
    • type#stringrequired
      Allowed values:
      • template-universal-content
    • id#stringrequired

      The ID of the universal content

      Example: 01HWWWKAW4RHXQJCMW4R2KRYR4

    • attributes#objectrequired
      Show 6 fields
      • name#stringrequired

        The name for this universal content

      • definition#oneOfnullable

        One of:

        1. Option 1: ButtonBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • button
          • data#anyrequirednullable
        2. Option 2: DropShadowBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • drop_shadow
          • data#anyrequirednullable
        3. Option 3: HeaderBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • header
          • data#stringrequirednullable
        4. Option 4: HorizontalRuleBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • horizontal_rule
          • data#anyrequirednullable
        5. Option 5: HTMLBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • html
          • data#objectrequired
            Show 2 fields
            • content#stringrequired
            • display_options#objectrequired
              Show 3 fields
              • show_on#stringnullable

                Show on.

                Allowed values:
                • all
                • desktop
                • mobile
              • visible_check#stringnullable
              • content_repeat#object
                Show 2 fields
                • repeat_for#stringrequired
                • item_alias#stringrequired
        6. Option 6: ImageBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • image
          • data#anyrequirednullable
        7. Option 7: ProductBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • product
          • data#stringrequirednullable
        8. Option 8: ReviewBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • review
          • data#stringrequirednullable
        9. Option 9: SocialBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • social
          • data#stringrequirednullable
        10. Option 10: SpacerBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • spacer
          • data#anyrequirednullable
        11. Option 11: SplitBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • split
          • data#stringrequirednullable
        12. Option 12: TableBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • table
          • data#stringrequirednullable
        13. Option 13: TextBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • text
          • data#objectrequired
            Show 3 fields
            • content#stringrequired
            • display_options#BlockDisplayOptionsrequired

              Same fields as the first BlockDisplayOptions above.

            • styles#objectrequired
              Show 25 fields
              • background_color#stringnullable
              • block_background_color#stringnullable
              • block_border_color#stringnullable
              • block_border_style#stringnullable

                Border style.

                Allowed values:
                • dashed
                • dotted
                • groove
                • inset
                • none
                • outset
                • ridge
                • solid
              • block_border_width#integernullable
              • block_padding_bottom#integernullable
              • block_padding_left#integernullable
              • block_padding_right#integernullable
              • block_padding_top#integernullable
              • color#stringnullable
              • extra_css_class#stringnullable
              • font_family#stringnullable
              • font_size#integernullable
              • font_style#stringnullable

                Font style.

                Allowed values:
                • italic
                • normal
              • font_weight#stringnullable
              • inner_padding_bottom#integernullable
              • inner_padding_left#integernullable
              • inner_padding_right#integernullable
              • inner_padding_top#integernullable
              • letter_spacing#integernullable
              • line_height#numbernullable
              • mobile_stretch_content#booleannullable
              • text_align#stringnullable

                Text Alignment.

                Allowed values:
                • center
                • left
                • right
              • text_decoration#stringnullable
              • text_table_layout#stringnullable

                Text table layout.

                Allowed values:
                • auto
                • fixed
                • inherit
                • initial
        14. Option 14: UnsupportedBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • unsupported
          • data#stringrequirednullable
        15. Option 15: VideoBlock
          • content_type#stringrequired
            Allowed values:
            • block
          • type#stringrequired
            Allowed values:
            • video
          • data#stringrequirednullable
        16. Option 16: Section
          • content_type#stringrequired
            Allowed values:
            • section
          • type#stringrequired
            Allowed values:
            • section
          • data#stringrequirednullable
      • created#string<date-time>required

        The datetime when this universal content was created

        Example: 2022-11-08T00:00:00+00:00

      • updated#string<date-time>required

        The datetime when this universal content was updated

        Example: 2022-11-08T00:00:00+00:00

      • screenshot_status#stringrequired

        The status of a universal content screenshot.

        Allowed values:
        • completed
        • failed
        • generating
        • never_generated
        • not_renderable
        • stale
      • screenshot_url#stringrequired

4XXClient Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string

5XXServer Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string