> ## 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]
>
> API経由の配信統計は専用ページで提供します。利用するには[contact@notifly.tech](mailto:contact@notifly.tech)にお問い合わせください。


## OpenAPI

````yaml /ja/api-reference/openapi.yaml post /messages/kakao-alimtalk
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:
  /messages/kakao-alimtalk:
    post:
      summary: send-kakao-alimtalk
      operationId: sendKakaoAlimtalk
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - projectId
                - templateId
                - recipientList
              properties:
                projectId:
                  type: string
                  description: Notiflyの設定画面で確認できます。
                templateId:
                  type: string
                  description: 登録済みテンプレートのIDです。アリムトークのテンプレート一覧で確認できます。
                channelId:
                  type: string
                  description: 配信元のカカオトークチャンネルIDです。
                resendSendNo:
                  type: string
                  description: >-
                    カカオトークの配信プラットフォームが`Notifly
                    (Legacy)`の場合に、代替のテキストメッセージに使う送信元番号です。Notiflyの自社SMS配信を設定した番号を指定します。
                senderGroupingKey:
                  type: string
                  description: 配信をまとめるためのキーです。最大100文字です。
                recipientList:
                  type: array
                  items:
                    type: object
                    required:
                      - recipientNo
                    properties:
                      recipientNo:
                        type: string
                        description: 送信先の電話番号です。最大15文字です。
                      templateParameter:
                        type: object
                        description: >-
                          アリムトークのテンプレートにある`#{変数}`に入れる値です。たとえば`#{customer_name}`には`{
                          "customer_name": "홍길동" }`を指定します。
                      failoverTextMessageTemplateParameter:
                        type: object
                        description: >-
                          カカオトークの配信プラットフォームが`Notifly`の場合に使う代替SMSテンプレートの変数値です。たとえばテンプレートに`{{
                          event["coupon_name"] }}`があれば、`{ "coupon_name": "8월 할인
                          쿠폰" }`を指定します。
                      resendParameter:
                        type: object
                        description: カカオトークの配信プラットフォームが`Notifly (Legacy)`の場合に使う代替配信の設定です。
                        properties:
                          isResend:
                            type: boolean
                            description: >-
                              配信に失敗した場合に代替のテキストメッセージを送るかどうかを指定します。デフォルトは`false`です。
                          resendType:
                            type: string
                            enum:
                              - SMS
                              - LMS
                            description: 代替メッセージの種類です。`isResend`が`true`の場合に指定します。
                          resendTitle:
                            type: string
                            description: 代替LMSの件名です。デフォルトはカカオのプラスフレンドIDです。
                          resendContent:
                            type: string
                            description: >-
                              代替メッセージの本文です。デフォルトには元の本文と、Webリンクのボタン名およびモバイル用Webリンクが含まれます。
                  description: 送信先のリストです。最大1,000件まで指定できます。
            examples:
              notiflyProfile:
                summary: Notiflyのカカオトーク配信プラットフォーム（テンプレートを使う代替SMS）
                value:
                  projectId: example_project_1234567890abcdef
                  channelId: kakao-channel-id
                  templateId: template-id
                  recipientList:
                    - recipientNo: '01012345678'
                      templateParameter:
                        customer_name: 홍길동
                      failoverTextMessageTemplateParameter:
                        coupon_name: 8월 할인 쿠폰
              legacyProfile:
                summary: Notifly (Legacy)のカカオトーク配信プラットフォーム（代替SMS）
                value:
                  projectId: example_project_1234567890abcdef
                  channelId: legacy-kakao-channel-id
                  templateId: legacy-template-code
                  recipientList:
                    - recipientNo: '01012345678'
                      templateParameter:
                        customer_name: 홍길동
                      resendParameter:
                        isResend: true
                        resendType: SMS
      responses:
        '200':
          description: メッセージを送信しました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              example:
                success: true
        '400':
          description: 発信者情報が登録されていません。
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    nullable: true
                  error:
                    type: string
              example:
                data: null
                error: Sender info is not registered.
        '500':
          description: サーバー内部エラーです。
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
              examples:
                internal_error:
                  value:
                    success: false
                    error: Internal Server Error
                resend_sender_not_registered:
                  value:
                    success: false
                    error: >-
                      The sender information for resending text message has not
                      been registered. Please register it in the Notifly console
                      first.
      security:
        - bearerAuth: []
components:
  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.