> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifly.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Brand Message template

> Create a Kakao Brand Message template.

> [!NOTE]
>
> If the template type requires an image, upload it with the image upload API first. Use the returned `data.images[].url` value in the template body.

> [!WARNING]
>
> If you include `failoverTextMessage`, also include `unsubscribeNumber`. Promotional fallback SMS requires a registered 080 opt-out number.


## OpenAPI

````yaml /en/api-reference/openapi.yaml post /v1/projects/{projectId}/messages/kakao-brand-message/templates
openapi: 3.0.3
info:
  title: Notifly API
  version: 1.0.0
  contact:
    email: contact@notifly.tech
servers:
  - url: https://api.notifly.tech
    description: Notifly API server
security: []
tags:
  - name: catalog
    x-group: Catalogs
paths:
  /v1/projects/{projectId}/messages/kakao-brand-message/templates:
    post:
      summary: create-kakao-brand-message-template
      operationId: createKakaoBrandMessageTemplate
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: Project ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KakaoBrandMessageTemplateCreateRequest'
            example:
              senderKey: example_sender_key
              templateName: 신규 회원 쿠폰 안내
              template:
                type: image
                content:
                  text: '#{name}님, 신규 쿠폰이 도착했습니다.'
                  image:
                    url: https://mud-kage.kakao.com/example/img_l.jpg
                    link: https://example.com/coupon
                  buttons:
                    - buttonType: WL
                      buttonName: 쿠폰 확인
                      linkMo: https://example.com/coupon
      responses:
        '200':
          description: The template was created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KakaoBrandMessageTemplateCreateResponse'
        '400':
          description: >-
            The request body is invalid, or the template did not pass Kakao's
            validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotiflyV1ErrorResponse'
        '401':
          description: Authentication failed because the token is invalid or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotiflyV1ErrorResponse'
        '403':
          description: Access to the project is denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotiflyV1ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotiflyV1ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    KakaoBrandMessageTemplateCreateRequest:
      type: object
      required:
        - senderKey
        - templateName
        - template
      properties:
        senderKey:
          type: string
          minLength: 1
          description: The `senderKey` of the Kakao Brand Message sender profile.
        templateName:
          type: string
          minLength: 1
          description: The template name.
        template:
          $ref: '#/components/schemas/KakaoBrandMessageTemplateInput'
        failoverTextMessage:
          $ref: '#/components/schemas/KakaoBrandMessageFailoverTextMessageInput'
        unsubscribeNumber:
          type: string
          minLength: 1
          description: >-
            The 080 opt-out number required when configuring fallback text
            messages.
    KakaoBrandMessageTemplateCreateResponse:
      type: object
      properties:
        data:
          type: object
          required:
            - templateId
          properties:
            templateId:
              type: string
              description: The Kakao Brand Message template ID stored in Notifly.
        error:
          type: string
          nullable: true
          description: null on success.
    NotiflyV1ErrorResponse:
      type: object
      properties:
        data:
          type: object
          nullable: true
          description: null on failure.
        error:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/NotiflyV1ErrorObject'
          description: >-
            Error returned by the v1 API. Authentication and authorization
            errors may be returned as an object with code and message fields.
            Request validation errors may be returned as a string.
      example:
        data: null
        error:
          code: UNAUTHORIZED
          message: Invalid Authorization Token
    KakaoBrandMessageTemplateInput:
      oneOf:
        - type: object
          title: Text
          required:
            - type
            - content
          properties:
            type:
              type: string
              enum:
                - text
            content:
              type: object
              required:
                - text
              description: Text message body.
              properties:
                text:
                  type: string
                  minLength: 1
                  description: >-
                    Message body. Enter variables in the `#{variable_name}`
                    format.
                buttons:
                  $ref: '#/components/schemas/KakaoBrandMessageButtons'
                coupon:
                  $ref: '#/components/schemas/KakaoBrandMessageCoupon'
        - type: object
          title: Image
          required:
            - type
            - content
          properties:
            type:
              type: string
              enum:
                - image
            content:
              type: object
              required:
                - text
                - image
              description: Displays a standard image with body text.
              properties:
                text:
                  type: string
                  minLength: 1
                  description: The message body displayed below the image.
                image:
                  $ref: '#/components/schemas/KakaoBrandMessageImage'
                buttons:
                  $ref: '#/components/schemas/KakaoBrandMessageButtons'
                coupon:
                  $ref: '#/components/schemas/KakaoBrandMessageCoupon'
        - type: object
          title: Wide image
          required:
            - type
            - content
          properties:
            type:
              type: string
              enum:
                - wide-image
            content:
              type: object
              required:
                - text
                - image
              description: Displays a wide image with body text.
              properties:
                text:
                  type: string
                  minLength: 1
                  description: The message body displayed below the image.
                image:
                  $ref: '#/components/schemas/KakaoBrandMessageImage'
                buttons:
                  $ref: '#/components/schemas/KakaoBrandMessageButtons'
                coupon:
                  $ref: '#/components/schemas/KakaoBrandMessageCoupon'
        - type: object
          title: Wide item list
          required:
            - type
            - content
          properties:
            type:
              type: string
              enum:
                - wide-itemlist
            content:
              type: object
              required:
                - header
                - itemlist
              description: >-
                Displays the first item as the main item and the remaining items
                as subitems.
              properties:
                header:
                  type: string
                  minLength: 1
                  description: The title at the top of the item list.
                itemlist:
                  type: array
                  minItems: 1
                  description: The list of the main item and subitems.
                  items:
                    $ref: '#/components/schemas/KakaoBrandMessageWideItem'
                buttons:
                  $ref: '#/components/schemas/KakaoBrandMessageButtons'
                coupon:
                  $ref: '#/components/schemas/KakaoBrandMessageCoupon'
        - type: object
          title: Carousel
          required:
            - type
            - content
          properties:
            type:
              type: string
              enum:
                - carousel
            content:
              type: object
              required:
                - carousel
              description: >-
                Displays multiple feed cards that users can swipe through
                horizontally.
              properties:
                carousel:
                  type: object
                  required:
                    - list
                  properties:
                    list:
                      type: array
                      minItems: 1
                      description: The list of feed cards displayed in the carousel.
                      items:
                        $ref: '#/components/schemas/KakaoBrandMessageCarouselItem'
                    tail:
                      $ref: '#/components/schemas/KakaoBrandMessageLink'
        - type: object
          title: Premium video
          required:
            - type
            - content
          properties:
            type:
              type: string
              enum:
                - premium-video
            content:
              type: object
              required:
                - header
                - content
              description: Displays a video, thumbnail, and description.
              properties:
                header:
                  type: string
                  minLength: 1
                  description: The title above the video.
                content:
                  type: string
                  minLength: 1
                  description: The video description.
                videoUrl:
                  type: string
                  format: uri
                  description: An externally accessible video URL.
                thumbnail:
                  $ref: '#/components/schemas/KakaoBrandMessageImage'
                buttons:
                  $ref: '#/components/schemas/KakaoBrandMessageButtons'
                coupon:
                  $ref: '#/components/schemas/KakaoBrandMessageCoupon'
        - type: object
          title: Commerce
          required:
            - type
            - content
          properties:
            type:
              type: string
              enum:
                - commerce
            content:
              type: object
              required:
                - item
              description: Displays an image and pricing information for a single product.
              properties:
                additionalContent:
                  type: string
                  description: Additional text displayed above the product information.
                item:
                  $ref: '#/components/schemas/KakaoBrandMessageCommerceItem'
                coupon:
                  $ref: '#/components/schemas/KakaoBrandMessageCoupon'
        - type: object
          title: Carousel commerce
          required:
            - type
            - content
          properties:
            type:
              type: string
              enum:
                - carousel-commerce
            content:
              type: object
              required:
                - items
              description: Displays multiple product cards in a carousel.
              properties:
                intro:
                  $ref: '#/components/schemas/KakaoBrandMessageCarouselIntro'
                items:
                  type: array
                  minItems: 1
                  description: The list of product cards displayed in the carousel.
                  items:
                    $ref: '#/components/schemas/KakaoBrandMessageCommerceItem'
                tail:
                  $ref: '#/components/schemas/KakaoBrandMessageLink'
      description: >-
        The structure of `content` depends on `type`. See each type's schema for
        required fields and nested structures.
    KakaoBrandMessageFailoverTextMessageInput:
      oneOf:
        - $ref: '#/components/schemas/KakaoBrandMessageFailoverSmsInput'
        - $ref: '#/components/schemas/KakaoBrandMessageFailoverLmsInput'
      discriminator:
        propertyName: type
      description: >-
        The fallback text message sent if Kakao Brand Message delivery fails.
        LMS requires `title`.
    NotiflyV1ErrorObject:
      type: object
      properties:
        code:
          type: string
          description: Error code.
        message:
          type: string
          description: Error message.
    KakaoBrandMessageButtons:
      type: array
      description: The list of buttons displayed in the message.
      items:
        type: object
        required:
          - buttonType
        properties:
          buttonType:
            type: string
            enum:
              - WL
              - AL
              - BK
              - MD
              - AC
            description: The button type.
          buttonName:
            type: string
            description: The button name. Can be omitted for the `AC` type.
          linkMo:
            type: string
            description: The mobile web link.
          linkPc:
            type: string
            description: The desktop web link.
          linkAnd:
            type: string
            description: The Android app link.
          linkIos:
            type: string
            description: The iOS app link.
    KakaoBrandMessageCoupon:
      type: object
      additionalProperties: true
      description: >-
        Sets the coupon title, description, and links for mobile web, desktop
        web, and apps. You can enter `title` directly or construct the coupon
        title with `titleType` and `titleValue`.
    KakaoBrandMessageImage:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          format: uri
          description: The `data.images[].url` value returned by the image upload API.
        link:
          type: string
          description: The destination URL when the image is clicked.
    KakaoBrandMessageWideItem:
      type: object
      required:
        - image
        - link
      properties:
        title:
          type: string
          description: The item title.
        image:
          $ref: '#/components/schemas/KakaoBrandMessageImage'
        link:
          $ref: '#/components/schemas/KakaoBrandMessageLink'
    KakaoBrandMessageCarouselItem:
      type: object
      required:
        - image
      properties:
        header:
          type: string
          description: The card title.
        message:
          type: string
          description: The card body.
        additionalContent:
          type: string
          description: Additional text displayed on the card.
        image:
          $ref: '#/components/schemas/KakaoBrandMessageImage'
        regularPrice:
          type: integer
          minimum: 0
          maximum: 99999999
          description: The product's regular price.
        discountPrice:
          type: integer
          minimum: 0
          description: The product's discounted price.
        discountType:
          type: string
          enum:
            - amount
            - rate
          description: The discount display format.
        buttons:
          $ref: '#/components/schemas/KakaoBrandMessageButtons'
        coupon:
          $ref: '#/components/schemas/KakaoBrandMessageCoupon'
    KakaoBrandMessageLink:
      type: object
      properties:
        linkMo:
          type: string
          description: The mobile web link.
        linkPc:
          type: string
          description: The desktop web link.
        linkAnd:
          type: string
          description: The Android app link.
        linkIos:
          type: string
          description: The iOS app link.
    KakaoBrandMessageCommerceItem:
      type: object
      required:
        - title
        - regularPrice
      properties:
        title:
          type: string
          minLength: 1
          description: The product name.
        regularPrice:
          type: integer
          minimum: 0
          maximum: 99999999
          description: The product's regular price.
        discountPrice:
          type: integer
          minimum: 0
          description: The product's discounted price.
        discountType:
          type: string
          enum:
            - amount
            - rate
          description: The discount display format.
        additionalContent:
          type: string
          description: Additional text displayed on the product card.
        image:
          $ref: '#/components/schemas/KakaoBrandMessageImage'
        buttons:
          $ref: '#/components/schemas/KakaoBrandMessageButtons'
        coupon:
          $ref: '#/components/schemas/KakaoBrandMessageCoupon'
    KakaoBrandMessageCarouselIntro:
      type: object
      properties:
        header:
          type: string
          description: The intro card title.
        content:
          type: string
          description: The intro card body.
        image:
          $ref: '#/components/schemas/KakaoBrandMessageImage'
        link:
          $ref: '#/components/schemas/KakaoBrandMessageLink'
    KakaoBrandMessageFailoverSmsInput:
      type: object
      required:
        - type
        - body
        - senderPhoneNumber
      properties:
        type:
          type: string
          enum:
            - sms
          description: SMS fallback delivery.
        body:
          type: string
          minLength: 1
          description: The fallback text message body.
        senderPhoneNumber:
          type: string
          minLength: 1
          description: A registered sender phone number for text messages.
    KakaoBrandMessageFailoverLmsInput:
      type: object
      required:
        - type
        - title
        - body
        - senderPhoneNumber
      properties:
        type:
          type: string
          enum:
            - lms
          description: LMS fallback delivery.
        title:
          type: string
          minLength: 1
          description: The LMS title.
        body:
          type: string
          minLength: 1
          description: The fallback text message body.
        senderPhoneNumber:
          type: string
          minLength: 1
          description: A registered sender phone number for text messages.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Pass the token issued by `POST /authenticate` as a bearer token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.