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

# アリムトークのテンプレートを更新する（旧バージョン）

> 登録済みのカカオアリムトークテンプレートを更新します。

> [!WARNING]
>
> * テンプレートの更新時は、メッセージタイプと強調表示タイプに応じた必須フィールドを指定します。
> * ボタンタイプごとに必須フィールドを確認してください。


## OpenAPI

````yaml /ja/api-reference/openapi.yaml put /projects/{projectId}/messages/kakao-alimtalk/templates/{templateCode}
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サーバー
security: []
tags:
  - name: catalog
    x-group: カタログ
paths:
  /projects/{projectId}/messages/kakao-alimtalk/templates/{templateCode}:
    put:
      summary: update-kakao-alimtalk-template
      operationId: updateKakaoAlimtalkTemplate
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: プロジェクトIDです。
        - name: templateCode
          in: path
          required: true
          schema:
            type: string
          description: 更新するテンプレートのコードです。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KakaoTemplateInput'
      responses:
        '200':
          description: テンプレートを更新しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KakaoTemplateResponse'
        '400':
          description: リクエスト本文の形式が不正です。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '401':
          description: トークンが無効か期限切れのため、認証に失敗しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
        '500':
          description: サーバー内部エラーです。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    KakaoTemplateInput:
      type: object
      required:
        - templateCode
        - templateName
        - templateContent
      properties:
        channelId:
          type: string
          description: アリムトークのチャネルIDです。
        templateCode:
          type: string
          description: テンプレートコードです。一意である必要があり、最大20文字です。
        templateName:
          type: string
          description: テンプレート名です。最大150文字です。
        templateContent:
          type: string
          description: テンプレート本文です。最大1000文字です。
        templateMessageType:
          type: string
          enum:
            - BA
            - EX
            - AD
            - MI
          description: テンプレートのメッセージタイプです。`BA`は基本型、`EX`は付加情報型、`AD`はチャネル追加型、`MI`は複合型です。
        templateEmphasizeType:
          type: string
          enum:
            - NONE
            - TEXT
            - IMAGE
            - ITEM_LIST
          description: テンプレートの強調表示タイプです。
        templateExtra:
          type: string
          description: テンプレートの付加情報です。`EX`または`MI`の場合は必須です。
        templateTitle:
          type: string
          description: テンプレートのタイトルです。最大50文字です。
        templateSubtitle:
          type: string
          description: テンプレートの補助テキストです。最大50文字です。
        templateHeader:
          type: string
          description: テンプレートのヘッダーです。最大16文字です。
        templateItem:
          type: object
          description: アイテム情報です。
          properties:
            list:
              type: array
              items:
                type: object
                required:
                  - title
                  - description
                properties:
                  title:
                    type: string
                    description: アイテムのタイトルです。最大6文字です。
                  description:
                    type: string
                    description: アイテムの説明です。最大23文字です。
              description: アイテムのリストです。最小2件、最大10件です。
            summary:
              type: object
              required:
                - title
                - description
              properties:
                title:
                  type: string
                  description: 要約のタイトルです。最大6文字です。
                description:
                  type: string
                  description: 要約の説明です。変数、通貨単位、数字、カンマ、ピリオドのみ使用できます。最大14文字です。
              description: アイテムの要約情報です。
        templateItemHighlight:
          type: object
          description: アイテムのハイライトです。
          properties:
            title:
              type: string
              description: ハイライトのタイトルです。最大30文字で、サムネイル画像がある場合は最大21文字です。
            description:
              type: string
              description: ハイライトの説明です。最大19文字で、サムネイル画像がある場合は最大13文字です。
            imageUrl:
              type: string
              description: サムネイル画像のURLです。
        templateRepresentLink:
          type: object
          description: メインリンクです。
          properties:
            linkMo:
              type: string
              description: モバイルWebリンクです。最大500文字です。
            linkPc:
              type: string
              description: PC用のWebリンクです。最大500文字です。
            schemeIos:
              type: string
              description: iOSアプリのリンクです。最大500文字です。
            schemeAndroid:
              type: string
              description: Androidアプリのリンクです。最大500文字です。
        templateImageName:
          type: string
          description: 画像名です。
        templateImageUrl:
          type: string
          description: 画像のURLです。
        securityFlag:
          type: boolean
          description: セキュリティテンプレートかどうかを示します。
        categoryCode:
          type: string
          description: テンプレートのカテゴリーコードです。デフォルトは`999999`です。
        buttons:
          type: array
          items:
            type: object
            required:
              - ordering
              - type
              - name
            properties:
              ordering:
                type: integer
                description: ボタンの順序です。1から5まで指定できます。
              type:
                type: string
                enum:
                  - WL
                  - AL
                  - DS
                  - BK
                  - MD
                  - BC
                  - BT
                  - AC
                  - BF
                  - P1
                  - P2
                  - P3
                description: >-
                  ボタンのタイプです。`WL`はWebリンク、`AL`はアプリリンク、`DS`は配送状況の確認、`BK`はボットキーワード、`MD`はメッセージ転送、`BC`は相談チャットへの切り替え、`BT`はボットへの切り替え、`AC`はチャネル追加、`BF`はビジネスフォーム、`P1`、`P2`、`P3`はプラグインです。
              name:
                type: string
                description: ボタン名です。最大14文字です。
              linkMo:
                type: string
                description: モバイルWebリンクです。`WL`タイプの場合は必須です。最大500文字です。
              linkPc:
                type: string
                description: PC用のWebリンクです。`WL`タイプの場合は任意です。最大500文字です。
              schemeIos:
                type: string
                description: iOSアプリのリンクです。`AL`タイプの場合は必須です。最大500文字です。
              schemeAndroid:
                type: string
                description: Androidアプリのリンクです。`AL`タイプの場合は必須です。最大500文字です。
              bizFormId:
                type: integer
                description: ビジネスフォームIDです。`BF`タイプの場合は必須です。
              pluginId:
                type: string
                description: プラグインIDです。最大24文字です。
          description: ボタンのリストです。最大5件です。
        quickReplies:
          type: array
          items:
            type: object
            required:
              - ordering
              - type
              - name
            properties:
              ordering:
                type: integer
                description: クイック返信の順序です。
              type:
                type: string
                enum:
                  - WL
                  - AL
                  - BK
                  - BC
                  - BT
                  - BF
                description: >-
                  クイック返信のタイプです。`WL`はWebリンク、`AL`はアプリリンク、`BK`はボットキーワード、`BC`は相談チャットへの切り替え、`BT`はボットへの切り替え、`BF`はビジネスフォームです。
              name:
                type: string
                description: クイック返信の名前です。最大14文字です。
              linkMo:
                type: string
                description: モバイルWebリンクです。`WL`タイプの場合は必須です。最大500文字です。
              linkPc:
                type: string
                description: PC用のWebリンクです。`WL`タイプの場合は任意です。最大500文字です。
              schemeIos:
                type: string
                description: iOSアプリのリンクです。`AL`タイプの場合は必須です。最大500文字です。
              schemeAndroid:
                type: string
                description: Androidアプリのリンクです。`AL`タイプの場合は必須です。最大500文字です。
              bizFormId:
                type: integer
                description: ビジネスフォームIDです。`BF`タイプの場合は必須です。
          description: クイック返信のリストです。最大5件です。
    KakaoTemplateResponse:
      type: object
      properties:
        resultCode:
          type: integer
          description: 結果コードです。
        resultMessage:
          type: string
          description: 結果メッセージです。
      example:
        resultCode: 0
        resultMessage: Success
    SimpleErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: エラーメッセージ
      example:
        error: some-error-message
  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.