> ## 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.

# 알림톡 템플릿 등록

> 카카오 비즈메시지 직접연동 채널에 알림톡 템플릿 한 건을 등록하고 검수를 요청합니다. 서버가 영문·숫자 9자리 템플릿 코드를 발급합니다.

`requested`는 카카오가 검수 요청을 접수했다는 뜻입니다. 승인·반려 여부는 응답의 `data.template_code`로 [템플릿 상세 조회](https://docs.notifly.tech/api-reference/get-kakao-bizmessage-alimtalk-template.md)에서 확인할 수 있습니다.

등록 응답을 받지 못했다면 재등록 전에 같은 채널의 [템플릿 목록](https://docs.notifly.tech/api-reference/list-kakao-bizmessage-alimtalk-templates.md)에서 이름을 검색하세요.


## OpenAPI

````yaml /ko/api-reference/openapi.yaml post /v1/projects/{projectId}/messages/kakao-alimtalk/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: 노티플라이 API 서버입니다
security: []
tags:
  - name: catalog
    x-group: 카탈로그
paths:
  /v1/projects/{projectId}/messages/kakao-alimtalk/templates:
    post:
      summary: create-kakao-bizmessage-alimtalk-template
      operationId: createKakaoBizmessageAlimtalkTemplate
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: 프로젝트 ID입니다.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKakaoAlimtalkTemplateRequest'
            example:
              sender_channel_id: '@example'
              template_name: 수강 신청 접수
              template:
                template_content: '#{강의명} 수강 신청이 접수되었습니다.'
      responses:
        '200':
          description: 카카오가 검수 요청을 접수했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateKakaoAlimtalkTemplateResponse'
              example:
                data:
                  sender_channel_id: '@example'
                  template_code: Ab3De6Gh9
                  status: requested
                error: null
        '400':
          description: >-
            잘못된 JSON이나 입력값(INVALID_ARGUMENT) 또는 카카오의 명시적 등록
            거절(TEMPLATE_REGISTRATION_REJECTED)입니다. 아래는 EX 요청에서 필수
            template_extra를 생략한 경우입니다.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/KakaoAlimtalkTemplateRegistrationErrorResponse
              example:
                data: null
                error:
                  code: INVALID_ARGUMENT
                  message: Invalid Kakao Alimtalk template.
                  fields:
                    - template.template_extra
        '401':
          description: 인증이 필요합니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotiflyV1ErrorResponse'
              example:
                data: null
                error:
                  code: UNAUTHENTICATED
                  message: Invalid Authorization Token.
        '403':
          description: 프로젝트 접근 권한이 없습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotiflyV1ErrorResponse'
        '404':
          description: 프로젝트 또는 직접연동 발신 채널을 찾을 수 없습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotiflyV1ErrorResponse'
        '408':
          description: 요청 본문을 읽는 중 시간이 초과되었습니다(REQUEST_TIMEOUT).
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/KakaoAlimtalkTemplateRegistrationErrorResponse
        '413':
          description: 요청 본문이 1 MiB를 초과했습니다(PAYLOAD_TOO_LARGE).
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/KakaoAlimtalkTemplateRegistrationErrorResponse
        '500':
          description: >-
            저장 실패 후 보상 삭제가 확인되면 TEMPLATE_STORAGE_FAILED, 저장·삭제 결과가 불명확하면
            TEMPLATE_STORAGE_UNKNOWN, 검수가 접수되었으나 상태 저장에 실패하면
            TEMPLATE_REVIEW_STATUS_UNKNOWN입니다. 그 밖의 예기치 않은 서버 오류는 INTERNAL을
            반환합니다.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/KakaoAlimtalkTemplateRegistrationErrorResponse
              example:
                data: null
                error:
                  code: INTERNAL
                  message: Internal server error.
        '502':
          description: >-
            검수 요청에 실패하면 `error.template_code`로 상태를 확인하세요. `registered` 상태가 계속되면
            해당 코드와 함께 노티플라이에 문의해 주세요.


            등록 결과가 불명확하면 TEMPLATE_REGISTRATION_UNKNOWN, 카카오가 검수 요청을 거부하면
            TEMPLATE_REVIEW_REQUEST_FAILED, 검수 요청의 접수 여부가 불명확하면
            TEMPLATE_REVIEW_STATUS_UNKNOWN입니다.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/KakaoAlimtalkTemplateRegistrationErrorResponse
              example:
                data: null
                error:
                  code: TEMPLATE_REVIEW_REQUEST_FAILED
                  message: Template registered, but Kakao rejected its review request.
                  template_code: Ab3De6Gh9
      security:
        - bearerAuth: []
components:
  schemas:
    CreateKakaoAlimtalkTemplateRequest:
      type: object
      additionalProperties: false
      required:
        - sender_channel_id
        - template_name
        - template
      properties:
        sender_channel_id:
          type: string
          minLength: 1
          maxLength: 200
          description: 프로젝트에 등록된 카카오 비즈메시지 직접연동 채널의 정확한 ID입니다.
        template_name:
          type: string
          minLength: 1
          maxLength: 200
          description: 템플릿 이름입니다.
        template:
          type: object
          description: 선택한 유형에서 쓰는 값만 등록합니다. 선택 문자열에 보낸 빈 문자열은 생략으로 처리합니다.
          additionalProperties: false
          required:
            - template_content
          properties:
            template_content:
              type: string
              minLength: 1
              description: '#{강의명}과 같은 변수를 포함할 수 있는 템플릿 본문입니다.'
            template_message_type:
              description: EX·MI에서 부가 문구가 필수입니다. BA·AD에서는 입력한 template_extra를 무시합니다.
              type: string
              enum:
                - BA
                - EX
                - AD
                - MI
              default: BA
            template_emphasize_type:
              description: >-
                TEXT는 제목과 부제목, IMAGE는 이미지명과 URL이 필요합니다. ITEM_LIST의 이미지는 선택이며 이름과
                URL을 함께 입력합니다.
              type: string
              enum:
                - NONE
                - TEXT
                - IMAGE
                - ITEM_LIST
              default: NONE
            template_extra:
              type: string
              description: EX와 MI는 부가 문구가 필수입니다. BA와 AD에 보낸 값은 등록할 본문에 포함되지 않습니다.
            template_title:
              type: string
            template_subtitle:
              type: string
            template_header:
              type: string
            template_image_name:
              type: string
            template_image_url:
              type: string
            template_item_highlight:
              type: object
              additionalProperties: false
              properties:
                title:
                  type: string
                description:
                  type: string
                image_url:
                  type: string
            template_item:
              type: object
              description: ITEM_LIST에서는 헤더, 하이라이트, 아이템 목록(2~10개), 이미지 중 하나 이상이 필요합니다.
              additionalProperties: false
              properties:
                list:
                  type: array
                  items:
                    $ref: '#/components/schemas/KakaoAlimtalkTemplateItemUnit'
                summary:
                  $ref: '#/components/schemas/KakaoAlimtalkTemplateItemUnit'
            template_buttons:
              type: array
              description: >-
                AD·MI에서는 채널 추가 버튼이 맨 앞에 자동으로 들어갑니다. 이 버튼을 포함해 최대 5개이며, 바로연결이 있으면
                최대 2개입니다.
              items:
                type: object
                additionalProperties: false
                required:
                  - type
                  - name
                properties:
                  type:
                    type: string
                    enum:
                      - WL
                      - AL
                      - BK
                      - MD
                      - BC
                      - BT
                  name:
                    type: string
                    minLength: 1
                    maxLength: 14
                  link_mo:
                    type: string
                  link_pc:
                    type: string
                  scheme_android:
                    type: string
                  scheme_ios:
                    type: string
                allOf:
                  - $ref: '#/components/schemas/KakaoAlimtalkTemplateActionLinkRules'
                  - anyOf:
                      - properties:
                          type:
                            enum:
                              - BK
                              - MD
                              - BC
                              - BT
                      - properties:
                          link_mo:
                            $ref: >-
                              #/components/schemas/KakaoAlimtalkTemplateButtonWebLink
                          link_pc:
                            anyOf:
                              - type: string
                                maxLength: 0
                              - $ref: >-
                                  #/components/schemas/KakaoAlimtalkTemplateButtonWebLink
              maxItems: 5
              default: []
            template_quick_replies:
              type: array
              description: 최대 5개입니다. BF 바로연결에는 biz_form_id가 필요합니다.
              items:
                type: object
                additionalProperties: false
                required:
                  - type
                  - name
                properties:
                  type:
                    type: string
                    enum:
                      - WL
                      - AL
                      - BK
                      - BC
                      - BT
                      - BF
                  name:
                    type: string
                    minLength: 1
                    maxLength: 14
                  link_mo:
                    type: string
                  link_pc:
                    type: string
                  scheme_android:
                    type: string
                  scheme_ios:
                    type: string
                  biz_form_id:
                    type: integer
                allOf:
                  - $ref: '#/components/schemas/KakaoAlimtalkTemplateActionLinkRules'
                  - anyOf:
                      - properties:
                          type:
                            enum:
                              - WL
                              - AL
                              - BK
                              - BC
                              - BT
                      - required:
                          - biz_form_id
                        properties:
                          biz_form_id:
                            type: integer
                            minimum: 1
                            maximum: 9007199254740991
              maxItems: 5
              default: []
            category_code:
              type: string
              pattern: ^$|\S
            security_flag:
              type: boolean
              default: false
          allOf:
            - anyOf:
                - properties:
                    template_message_type:
                      enum:
                        - BA
                        - AD
                - required:
                    - template_extra
                  properties:
                    template_extra:
                      type: string
                      minLength: 1
                      pattern: \S
            - anyOf:
                - properties:
                    template_emphasize_type:
                      enum:
                        - NONE
                        - IMAGE
                        - ITEM_LIST
                - required:
                    - template_title
                    - template_subtitle
                  properties:
                    template_title:
                      type: string
                      minLength: 1
                      pattern: \S
                    template_subtitle:
                      type: string
                      minLength: 1
                      pattern: \S
            - anyOf:
                - properties:
                    template_emphasize_type:
                      enum:
                        - NONE
                        - TEXT
                        - ITEM_LIST
                - $ref: >-
                    #/components/schemas/KakaoAlimtalkTemplateUploadedImageFields
            - anyOf:
                - properties:
                    template_emphasize_type:
                      enum:
                        - NONE
                        - TEXT
                        - IMAGE
                - allOf:
                    - anyOf:
                        - required:
                            - template_header
                          properties:
                            template_header:
                              type: string
                              minLength: 1
                              pattern: \S
                        - required:
                            - template_item_highlight
                        - required:
                            - template_item
                        - $ref: >-
                            #/components/schemas/KakaoAlimtalkTemplateUploadedImageFields
                    - anyOf:
                        - properties:
                            template_image_name:
                              type: string
                              maxLength: 0
                            template_image_url:
                              type: string
                              maxLength: 0
                        - $ref: >-
                            #/components/schemas/KakaoAlimtalkTemplateUploadedImageFields
                  properties:
                    template_header:
                      type: string
                      pattern: ^$|\S
                    template_item_highlight:
                      required:
                        - title
                        - description
                      properties:
                        title:
                          type: string
                          minLength: 1
                          pattern: \S
                        description:
                          type: string
                          minLength: 1
                          pattern: \S
                        image_url:
                          anyOf:
                            - type: string
                              maxLength: 0
                            - type: string
                              format: uri
                              pattern: ^[Hh][Tt][Tt][Pp][Ss]?://
                    template_item:
                      required:
                        - list
                      properties:
                        list:
                          minItems: 2
                          maxItems: 10
                          items:
                            required:
                              - title
                              - description
                            properties:
                              title:
                                type: string
                                minLength: 1
                                pattern: \S
                              description:
                                type: string
                                minLength: 1
                                pattern: \S
                        summary:
                          required:
                            - title
                            - description
                          properties:
                            title:
                              type: string
                              minLength: 1
                              pattern: \S
                            description:
                              type: string
                              minLength: 1
                              pattern: \S
            - anyOf:
                - properties:
                    template_message_type:
                      enum:
                        - BA
                        - EX
                - properties:
                    template_buttons:
                      maxItems: 4
            - anyOf:
                - properties:
                    template_quick_replies:
                      maxItems: 0
                - properties:
                    template_buttons:
                      maxItems: 1
                - properties:
                    template_message_type:
                      enum:
                        - BA
                        - EX
                    template_buttons:
                      maxItems: 2
    CreateKakaoAlimtalkTemplateResponse:
      type: object
      additionalProperties: false
      required:
        - data
        - error
      properties:
        data:
          type: object
          additionalProperties: false
          required:
            - sender_channel_id
            - template_code
            - status
          properties:
            sender_channel_id:
              type: string
            template_code:
              type: string
              pattern: ^[A-Za-z0-9]{9}$
            status:
              type: string
              enum:
                - requested
        error:
          type: object
          nullable: true
          enum:
            - null
    KakaoAlimtalkTemplateRegistrationErrorResponse:
      type: object
      required:
        - data
        - error
      properties:
        data:
          type: object
          nullable: true
          enum:
            - null
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            fields:
              type: array
              items:
                type: string
              description: 입력 검증에 실패한 필드의 경로입니다.
            template_code:
              type: string
              pattern: ^[A-Za-z0-9]{9}$
    NotiflyV1ErrorResponse:
      type: object
      properties:
        data:
          type: object
          nullable: true
          description: 실패 시 null입니다.
        error:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/NotiflyV1ErrorObject'
          description: >-
            v1 API 실패 응답입니다. 인증/권한 오류는 code/message 객체, 요청 검증 오류는 문자열로 반환될 수
            있습니다.
      example:
        data: null
        error:
          code: UNAUTHORIZED
          message: Invalid Authorization Token
    KakaoAlimtalkTemplateItemUnit:
      type: object
      additionalProperties: false
      properties:
        title:
          type: string
        description:
          type: string
    KakaoAlimtalkTemplateActionLinkRules:
      type: object
      allOf:
        - anyOf:
            - properties:
                type:
                  enum:
                    - BK
                    - MD
                    - BC
                    - BT
                    - BF
            - required:
                - link_mo
              properties:
                link_mo:
                  $ref: '#/components/schemas/KakaoAlimtalkTemplateQuickReplyWebLink'
                link_pc:
                  anyOf:
                    - type: string
                      maxLength: 0
                    - $ref: >-
                        #/components/schemas/KakaoAlimtalkTemplateQuickReplyWebLink
        - anyOf:
            - properties:
                type:
                  enum:
                    - WL
                    - BK
                    - MD
                    - BC
                    - BT
                    - BF
            - required:
                - scheme_android
                - scheme_ios
              properties:
                scheme_android:
                  type: string
                  minLength: 1
                  pattern: \S
                scheme_ios:
                  type: string
                  minLength: 1
                  pattern: \S
    KakaoAlimtalkTemplateButtonWebLink:
      type: string
      anyOf:
        - pattern: >-
            ^[Hh][Tt][Tt][Pp][Ss]?://(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z]{2,}|(?:[0-9]{1,3}\.){3}[0-9]{1,3})(?::[0-9]+)?(?:/[-A-Za-z0-9%_.~+@:/]*)?(?:\?[;&A-Za-z0-9%_.~+=-]*)?(?:#[-A-Za-z0-9%_.~+@:/?\[\]&=]*)?$
        - allOf:
            - pattern: (?:#\{[^}\r\n\u2028\u2029]*\}|\{\{[^{}]*\}\})
            - pattern: >-
                ^(?:(?:#\{[^}\r\n\u2028\u2029]*\}|\{\{[^{}]*\}\})|[-A-Za-z0-9._~:/?#\[\]@!$&'()*+,;=%])*$
    KakaoAlimtalkTemplateUploadedImageFields:
      type: object
      required:
        - template_image_name
        - template_image_url
      properties:
        template_image_name:
          type: string
          minLength: 1
          pattern: \S
        template_image_url:
          type: string
          format: uri
          pattern: ^[Hh][Tt][Tt][Pp][Ss]?://
    NotiflyV1ErrorObject:
      type: object
      properties:
        code:
          type: string
          description: 에러 코드입니다.
        message:
          type: string
          description: 에러 메시지입니다.
    KakaoAlimtalkTemplateQuickReplyWebLink:
      anyOf:
        - $ref: '#/components/schemas/KakaoAlimtalkTemplateButtonWebLink'
        - type: string
          pattern: ^[Hh][Tt][Tt][Pp][Ss]?://[/\\]*[^\s/?#\\]+(?:[/\\?#]|$)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: POST /authenticate로 발급받은 인증 토큰을 Bearer 형식으로 전달합니다.

````

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