# 자동응답 메시지 등록

## Request

## 브랜드에 자동응답메시지를 등록합니다.<br>

> 브랜드에 자동응답메시지를 등록합니다.  \
> \
> &#x20; \+ \*\*계정 권한: 마스터, 매니저, 대행사\*\*  \
> &#x20; \+ \*\*브랜드 권한: 브랜드 대표운영자, 운영자\*\*  \
> \
> 자동응답메시지에 등록 가능한 액션이 추가 되었습니다.  \
> \
> &#x20; \+ 전화걸기\
> &#x20; \+ 웹사이트(내부브라우져)\
> &#x20; \+ 웹사이트(외부브라우져)\
> &#x20; \+ 대화방연결(메시지작성)\
> &#x20; \+ 캘린더(일정)\
> &#x20; \+ 지도(좌표)\
> &#x20; \+ 지도(키워드)\
> &#x20; \+ 지도(현재위치)\
> &#x20; \+ <신규>자동응답메시지연결\
> &#x20; \+ <신규>챗봇연결\
> \
> 제공되는 productcode = chat 해당 messagebaseId를 지정하여 사용하며 다음과 같이 처리 됩니다.  \
> &#x20;   \
> &#x20; \+ 기본 말풍선(SCS00000), 텍스트 카드(SCL00000)는 기본 말풍선(SCS00000)으로 처리  \
> &#x20; \+ 세로형\_Meduim(SCwThM00), 세로형\_Tall(SCwThT00)은 세로형\_Meduim(SCwThM00)으로 처리\
> &#x20; \+ 슬라이드형\_Medium, 슬라이드형\_Small은 슬라이드형\_Medium으로 처리  \
> &#x20;   \- 슬라이드형 Medium ID: CCwMhM0200 \~ CCwMhM0600  \
> &#x20;   \
> \*\*따라서 지정된 messagebaseId에만 존재하는 필드가 전환되는 messagebaseId에 존재하지 않는 경우\
> 무시됩니다.\*\*   \
> \
> 예를 들어, 텍스트 카드로 등록 시 title을 입력하더라도 기본 말풍선은 title을 지원하지 않으므로 title이 적용되지\
> 않습니다.<br>

```json
{"openapi":"3.0.0","info":{"title":"RCS Biz Center API 규격","version":"1.1.12"},"servers":[{"description":"RCS Biz Center API for Staging","url":"https://api-qa.rcsbizcenter.com/api/1.1"},{"description":"RCS Biz Center API for Production","url":"https://api.rcsbizcenter.com/api/1.1"}],"security":[{"jwtAuth":[]}],"components":{"securitySchemes":{"jwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"인증방식은 JWT인증을 사용합니다. 토큰의 갱신은 없으며 토큰 만료 시 항상 재발급 받아야 합니다.\n"}},"parameters":{"BrandKey":{"name":"X-RCS-Brandkey","in":"header","schema":{"type":"string","maxLength":18},"description":"maxLength: 18 - RCS Biz Center에서 브랜드 등록 시 자동 생성되는 Key 입니다.  \n\n대행사가 해당 브랜드에 대한 권한 여부를 판단하는데 사용됩니다.\n따라서, 대행사 계정으로 브랜드 내 정보를 조회/등록/수정 API 연동 시 Header에 설정되어야 합니다.\n"},"BrandId":{"name":"brandId","in":"path","schema":{"type":"string","maxLength":13},"required":true,"description":"maxLength: 13 - 브랜드 내 정보 접근시 사용되는 브랜드ID Path Parameter 입니다.\n"}},"schemas":{"RegAutoReplyMsgInfo":{"required":["autoReplyMsgName","messagebaseId","body"],"description":"자동응답메시지 등록 정보입니다.\n","type":"object","properties":{"autoReplyMsgName":{"type":"string","maxLength":100,"description":"maxLength: 100 - 자동응답메시지 명을 지정합니다.\n"},"messagebaseId":{"type":"string","maxLength":40,"description":"maxLength: 40 - 메시지 상품코드 chat에 속하는 messagebase ID를 지정합니다.  \n\n제공되는 productcode = chat 해당 messagebaseId를 지정하여 사용 가능하나 다음과 같이 처리됩니다.  \n\n  + 기본 말풍선(SCS00000), 텍스트 카드(SCL00000)는 기본 말풍선(SCS00000)으로 처리  \n  + 세로형_Meduim(SCwThM00), 세로형_Tall(SCwThT00)은 세로형_Meduim(SCwThM00)으로 처리\n  + 슬라이드형_Medium, 슬라이드형_Small은 슬라이드형_Medium으로 처리  \n    - 슬라이드형 Medium ID: CCwMhM0200 ~ CCwMhM0600  \n    \n지정된 ID에만 존재하는 필드가 전환되는 ID에 존재하지 않는 경우 무시됩니다.  \n\n예를 들어, 텍스트 카드로 등록시 title을 입력하더라도 기본 말풍선은 title을 지원하지 않으므로 title이 적용되지 않습니다.\n"},"copyAllowed":{"type":"boolean","default":true,"description":"단말에서 메시지 복사 가능 여부를 지정합니다.  \n\n  + true : 복사 가능\n  + false : 복사 불가\n"},"body":{"type":"object","description":"이통 발송규격 중 /message API의 body object와 동일한 방식으로 값을 지정합니다.  \n"},"buttons":{"description":"자동응답메시지에 버튼을 등록합니다.\n\n지원하는 action 유형은 다음과 같습니다.  \n\n  + urlAction : 기본 브라우저에서 웹페이지 링크  \n  + localBrowserAction : 채팅+ 내부 브라우저에서 웹페이지 표시\n  + mapAction : 지도 상의 특정 위치 표시 또는 현재 위치 공유 \n  + calendarAction : 캘린더에 일정 공유  \n  + clipboardAction : 클립보드로 복사  \n  + composeAction : 지정 대화방에 메시지 작성  \n  + dialerAction : 전화걸기  \n  + reply : 다른 자동응답메시지 연결, 챗봇응답\n\n다른 자동응답메시지 연결 시에는 reply JSON object 내에 autoReplyMsgId 필드에 자동응답메시지ID를 지정하며, postback.data는 자동할당 됩니다.  \n","type":"array","items":{"type":"object","properties":{"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/AutoReplyMsgActions"}}}}},"chipList":{"description":"자동응답메시지에 칩리스트를 지정합니다. 지원하는 action 유형은 다음과 같습니다.  \n\n  + urlAction : 기본 브라우저에서 웹페이지 링크  \n  + localBrowserAction : 채팅+ 내부 브라우저에서 웹페이지 표시\n  + mapAction : 지도 상의 특정 위치 표시 또는 현재 위치 공유 \n  + calendarAction : 캘린더에 일정 공유  \n  + clipboardAction : 클립보드로 복사  \n  + composeAction : 지정 대화방에 메시지 작성  \n  + dialerAction : 전화걸기  \n  + reply : 다른 자동응답메시지 연결, 챗봇응답\n\n다른 자동응답메시지 연결 시에는 reply JSON object 내에 autoReplyMsgId 필드에 자동응답메시지ID를 지정하며, postback.data는 자동할당 됩니다.  \n","type":"array","items":{"$ref":"#/components/schemas/AutoReplyMsgActions"}}}},"AutoReplyMsgActions":{"oneOf":[{"$ref":"#/components/schemas/action"},{"$ref":"#/components/schemas/CustomReply"}]},"action":{"description":"Common base definition of a suggested action.","type":"object","properties":{"action":{"type":"object","allOf":[{"$ref":"#/components/schemas/suggestion"},{"oneOf":[{"$ref":"#/components/schemas/urlAction"},{"$ref":"#/components/schemas/dialerAction"},{"$ref":"#/components/schemas/mapAction"},{"$ref":"#/components/schemas/calendarAction"},{"$ref":"#/components/schemas/composeAction"},{"$ref":"#/components/schemas/clipboardAction"},{"$ref":"#/components/schemas/localBrowserAction"}]}]}},"required":["action"]},"suggestion":{"description":"Common base definition for suggested replies and suggested actions.","type":"object","properties":{"displayText":{"type":"string","minLength":1,"maxLength":25,"description":"maxLength: 25, minLength: 1\n"},"postback":{"description":"Definition of data to be posted back from UE to chatbot.\n","type":"object","properties":{"data":{"type":"string","maxLength":2048,"description":"maxLength: 2048\n"}},"required":["data"]}},"required":["displayText","postback"]},"urlAction":{"description":"Suggested actions to interact a website or deep app link.","properties":{"urlAction":{"type":"object","oneOf":[{"properties":{"openUrl":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}},"required":["openUrl"]}]}},"required":["urlAction"]},"dialerAction":{"description":"Suggested actions for interacting with a phone number.","properties":{"dialerAction":{"type":"object","oneOf":[{"properties":{"dialPhoneNumber":{"type":"object","properties":{"phoneNumber":{"type":"string"},"fallbackUrl":{"type":"string","format":"uri"}},"required":["phoneNumber"]}},"required":["dialPhoneNumber"]}]}},"required":["dialerAction"]},"mapAction":{"description":"Suggested actions for interacting with a location on a map.","properties":{"mapAction":{"type":"object","oneOf":[{"properties":{"showLocation":{"description":"Shows a given location on a map.","type":"object","properties":{"location":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"label":{"type":"string","minLength":1,"maxLength":100,"description":"maxLength: 100, minLength: 1\n"}},"required":["latitude","longitude"]},"fallbackUrl":{"type":"string","format":"uri"}},"required":["location"]}},"required":["showLocation"]},{"properties":{"requestLocationPush":{"description":"One-time request to send a geo location push from UE to\nchatbot","type":"object","properties":{"currentLocation":{"description":"set true to send current location without location\nselection","type":"boolean"}}}},"required":["requestLocationPush"]}]}},"required":["mapAction"]},"calendarAction":{"description":"Suggested actions for interacting with a calendar event.","properties":{"calendarAction":{"type":"object","oneOf":[{"properties":{"createCalendarEvent":{"type":"object","properties":{"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":1,"maxLength":100,"description":"maxLength: 100, minLength: 1\n"},"description":{"type":"string","minLength":1,"maxLength":500,"description":"maxLength: 500, minLength: 1\n"},"fallbackUrl":{"type":"string","format":"uri"}},"required":["startTime","endTime","title"]}},"required":["createCalendarEvent"]}]}},"required":["calendarAction"]},"composeAction":{"description":"Suggested actions for composing draft messages.","properties":{"composeAction":{"type":"object","oneOf":[{"properties":{"composeTextMessage":{"description":"Compose a draft text message.","type":"object","properties":{"phoneNumber":{"type":"string"},"text":{"type":"string","maxLength":100,"description":"maxLength: 100\n"}},"required":["phoneNumber","text"]}},"required":["composeTextMessage"]},{"properties":{"composeRecordingMessage":{"description":"Compose a draft message with a media recording.","type":"object","properties":{"phoneNumber":{"type":"string"},"type":{"type":"string","enum":["AUDIO","VIDEO"]}}}},"required":["composeRecordingMessage"]}]}},"required":["composeAction"]},"clipboardAction":{"description":"Text to be copied to clipboard.","properties":{"clipboardAction":{"type":"object","oneOf":[{"properties":{"copyToClipboard":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]}},"required":["copyToClipboard"]}]}},"required":["clipboardAction"]},"localBrowserAction":{"description":"(템플릿 버튼 등록 불가)Suggested actions using Internal Web browser to interact a\nwebsite or deep app link.","properties":{"localBrowserAction":{"type":"object","oneOf":[{"properties":{"openUrl":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"isHalfView":{"description":"set true to show Internal Web browser in vertical half\nsize of screen","type":"boolean","default":false},"postParameter":{"description":"parameters to be sent as POST method when open url","type":"object"}},"required":["url"]}},"required":["openUrl"]}]}},"required":["localBrowserAction"]},"CustomReply":{"description":"자동응답메시지 reply 지정 필드 추가","type":"object","properties":{"reply":{"type":"object","properties":{"autoReplyMsgId":{"type":"string","maxLength":40,"description":"maxLength: 40 - 자동응답메시지ID 입니다.\n"},"displayText":{"type":"string","minLength":1,"maxLength":25,"description":"maxLength: 25, minLength: 1 - 버튼명(표시문자열)으로 표시되는 항목입니다.\n"},"postback":{"description":"Definition of data to be posted back from UE to chatbot.\n","type":"object","properties":{"data":{"type":"string","maxLength":2048,"description":"maxLength: 2048\n"}},"required":["data"]}},"required":["autoReplyMsgId"]}},"required":["reply"]}}},"paths":{"/brand/{brandId}/autoreplymsg":{"post":{"summary":"브랜드에 자동응답메시지를 등록합니다.\n","description":"브랜드에 자동응답메시지를 등록합니다.  \n\n  + **계정 권한: 마스터, 매니저, 대행사**  \n  + **브랜드 권한: 브랜드 대표운영자, 운영자**  \n\n자동응답메시지에 등록 가능한 액션이 추가 되었습니다.  \n\n  + 전화걸기\n  + 웹사이트(내부브라우져)\n  + 웹사이트(외부브라우져)\n  + 대화방연결(메시지작성)\n  + 캘린더(일정)\n  + 지도(좌표)\n  + 지도(키워드)\n  + 지도(현재위치)\n  + <신규>자동응답메시지연결\n  + <신규>챗봇연결\n\n제공되는 productcode = chat 해당 messagebaseId를 지정하여 사용하며 다음과 같이 처리 됩니다.  \n    \n  + 기본 말풍선(SCS00000), 텍스트 카드(SCL00000)는 기본 말풍선(SCS00000)으로 처리  \n  + 세로형_Meduim(SCwThM00), 세로형_Tall(SCwThT00)은 세로형_Meduim(SCwThM00)으로 처리\n  + 슬라이드형_Medium, 슬라이드형_Small은 슬라이드형_Medium으로 처리  \n    - 슬라이드형 Medium ID: CCwMhM0200 ~ CCwMhM0600  \n    \n**따라서 지정된 messagebaseId에만 존재하는 필드가 전환되는 messagebaseId에 존재하지 않는 경우\n무시됩니다.**   \n\n예를 들어, 텍스트 카드로 등록 시 title을 입력하더라도 기본 말풍선은 title을 지원하지 않으므로 title이 적용되지\n않습니다.\n","parameters":[{"$ref":"#/components/parameters/BrandKey"},{"$ref":"#/components/parameters/BrandId"}],"requestBody":{"description":"자동응답메시지 등록 정보를 전송합니다.\n","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegAutoReplyMsgInfo"}}}},"responses":{"200":{"description":"페이지 내 Response 섹션 참조"}}}}}}
```

## Response

{% tabs %}
{% tab title="말풍선" %}

```
{
    "autoReplyMsgName": "복권기금 안내",
    "messagebaseId": "SCS00000",
    "copyAllowed": true,
    "body": {
        "description": "이 복권은 복권 및 복권기금법 제4조에 의거 발행되며 조성된 자금은 동법 제23조에 따라 소외계층 지원사업등에 사용됩니다."
    }
}
```

{% endtab %}

{% tab title="카드" %}

```
{
    "autoReplyMsgName": "카드",
    "messagebaseId": "SCwThM00",
    "copyAllowed": true,
    "body": {
        "title": "카드제목",
        "description": "카드내용",
        "media": "BR.61hBmMP164-ARME1M6dN9c3l"
    },
    "buttons": [
        {
            "suggestions": [
                {
                    "action": {
                        "displayText": "RCS비즈센터",
                        "urlAction": {
                            "openUrl": {
                                "url": "https://www-qa.rcsbizcenter.com"
                            }
                        }
                    }
                }
            ]
        }
    ],
    "chipList": [
        {
            "action": {
                "dialerAction": {
                    "dialPhoneNumber": {
                        "phoneNumber": "07082245288"
                    }
                },
                "displayText": "고객센터"
            }
        }
    ]
}
```

{% endtab %}

{% tab title="슬라이드" %}

```
{
    "autoReplyMsgName": "슬라이드",
    "messagebaseId": "CCwMhM0200",
    "copyAllowed": true,
    "body": {
        "title1": "슬라이드1",
        "description1": "슬라이드1",
        "media1": "BR.61hBmMP164-ARM6tE1T7nzwf",
        "title2": "슬라이드2",
        "description2": "슬라이드2",
        "media2": "BR.61hBmMP164-ARMsYgo2O538B"
    },
    "buttons": [
        {
            "suggestions": [
                {
                    "action": {
                        "dialerAction": {
                            "dialPhoneNumber": {
                                "phoneNumber": "119"
                            }
                        },
                        "displayText": "긴급연락119"
                    }
                }
            ]
        },
        {
            "suggestions": [
                {
                    "action": {
                        "displayText": "유튜브연결",
                        "urlAction": {
                            "openUrl": {
                                "url": "https://utube.com"
                            }
                        }
                    }
                }
            ]
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Response

<table data-full-width="true"><thead><tr><th width="147">필드명</th><th width="141">타입</th><th width="68" align="center">길이</th><th width="108" align="center">필수여부</th><th width="117">기본값</th><th>설명</th></tr></thead><tbody><tr><td><a href="#result-array-less-than-object-greater-than"><mark style="color:blue;"><strong><code>result</code></strong></mark></a></td><td>array&#x3C;object></td><td align="center"></td><td align="center">O</td><td></td><td>자동응답메시지 ID</td></tr><tr><td><strong><code>code</code></strong></td><td>string</td><td align="center">5</td><td align="center">O</td><td>20000000</td><td></td></tr><tr><td><strong><code>status</code></strong></td><td>integer</td><td align="center">3</td><td align="center">O</td><td>200</td><td></td></tr><tr><td><strong><code>desc</code></strong></td><td>string</td><td align="center"></td><td align="center">O</td><td></td><td></td></tr></tbody></table>

### <mark style="color:blue;">result</mark> - array\<object>

<table data-full-width="true"><thead><tr><th width="147">필드명</th><th width="141">타입</th><th width="68" align="center">길이</th><th width="108" align="center">필수여부</th><th width="117">기본값</th><th>설명</th></tr></thead><tbody><tr><td><strong><code>result</code></strong></td><td>array&#x3C;object></td><td align="center"></td><td align="center"></td><td></td><td>자동응답메시지 ID</td></tr></tbody></table>

### ❖ response body sample

{% tabs %}
{% tab title="200" %}

```
{
    "code": "20000000",
    "desc": null,
    "result": [
        {
            "autoReplyMsgId": "ARMKlU2bCGpsV37"
        }
    ],
    "status": 200
}
```

{% endtab %}

{% tab title="400" %}

```
{
    "error": {
        "code": "64336",
        "message": "required value: [autoReplyMsgName]"
    },
    "status": 400
}

{
    "error": {
        "code": "64002",
        "message": "Invalid Brand Key"
    },
    "status": 400
}
```

{% endtab %}

{% tab title="401" %}

```
{
    "error": {
        "code": "61003",
        "message": "Invalid token"
    },
    "status": 401
}
```

{% endtab %}

{% tab title="403" %}

```
{
    "error": {
        "code": "63001",
        "message": "No Brand Permission"
    },
    "status": 403
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
error code는 [RCS Biz Center - Response body error code](https://apidocs.rcsbizcenter.com/error_code#rcs-biz-center-response-body-error-code) 참조
{% endhint %}
