# 템플릿 수정\_V2

## Request

## 이미 등록된 템플릿의 내용을 수정합니다.<br>

> 이미 등록된 템플릿의 내용을 수정합니다. messagebase의 ID를 유지하면서 내용을 변경하고자 하는 경우 사용이 가능합니다.\
> \
> 수정 등록된 템플릿은 RCS Biz Center 운영자의 승인이 필요합니다.  \
> \
> &#x20; \+ \*\*계정 권한: 마스터, 매니저, 대행사\*\*\
> &#x20; \+ \*\*브랜드 권한: 브랜드 대표운영자, 운영자\*\*\
> &#x20; \+ \*\*지원 범위: 텍스트 템플릿(타이틀 선택형 / 타이틀 자유형), 이미지 템플릿, LMS 템플릿\*\*<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"},"MessagebaseId":{"name":"messagebaseId","in":"path","schema":{"type":"string"},"required":true,"description":"messagebase ID Path parameter 입니다."}},"schemas":{"ModTemplateInfo":{"description":"템플릿 수정 시 사용되는 Object 입니다.\n","type":"object","required":["brandId","tmpltName","body"],"properties":{"brandId":{"description":"maxLength: 13 - 브랜드ID\n","type":"string","maxLength":13},"messagebaseformId":{"description":"maxLength: 10 - 템플릿 양식 ID\n","type":"string","maxLength":10},"tmpltName":{"description":"maxLength: 40 - 템플릿명\n","type":"string","maxLength":40},"agencyId":{"description":"maxLength: 20 - 대행사ID\n","type":"string","maxLength":20},"body":{"description":"messagebaseform JSON의 ROOT.params[n-1] object의 type 이 file, string 인 경우, 각 속성에 맞는 데이터 Object를 사용하여 템플릿을 구성합니다.\n\nmessageabseform JSON의 ROOT.params[n-1].isMandatory 가 true 이면 템플릿 등록을 위해 필수로 등록해야 하는 요소이므로 반드시 데이터를 설정해야 템플릿 등록이 가능합니다.\n","type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/StringObject"},{"$ref":"#/components/schemas/FileObject"},{"$ref":"#/components/schemas/LineObject"}]}},"buttons":{"description":"템플릿에 버튼을 설정하는 경우 지정합니다.  \n\n이통사 발송규격에서 제공되는 buttons와 동일한 사용 방식으로 템플릿에 표시되는 버튼을 지정할수 있습니다.\n\n이미지 템플릿 슬라이드형의 경우 buttons 배열 내 object가 각 카드에 해당하며, object 하위 suggestions 배열 내에 messagebaseform의 policyInfo.maxButtonCount 지정 숫자 만큼 버튼을 등록할 수 있습니다.\n\n지정 가능한 RCS 버튼 액션은 아래 링크의 파일을 확인해 주세요.\n\n**[버튼 Action 목록 Link](https://file.rcsbizcenter.com/231214143124234/TS-231214143124234-fVDQnA_1.xlsx)**\n\naction의 displayText, postback을 제외한 action 하위 항목에 다음과 같이 변수부를 지정할 수 있습니다.\n\n  - urlAction: openUrl 하위 url 설정 값 중 URL 하위 경로만 변수 지정 가능 (예, https://www.rcsbizcenter.com/{{변수}})\n  - mapAction(좌표, 쿼리 방식): location 하위 속성의 값\n  - calendarAction: createCalendarEvent 하위 속성의 값\n  - clipboardAction: copyToClipboard 하위 속성의 값\n  - composeAction: composeTextMessage 하위 속성 값\n  - dialerAction: dialPhoneNumber 하위 속성의 값\n","type":"array","items":{"type":"object","properties":{"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/action"}}}}}}},"StringObject":{"description":"messagebaseform JSON의 ROOT.params[n-1].type이 string 인 경우, 템플릿에 등록할 Text 입력에 사용되는 Object 입니다.\n\ntype 하위 속성인 contentType의 값에 따라 입력 가능 형식에 차이가 있습니다.\n","type":"object","properties":{"param":{"type":"string","description":"maxLength: 20 \n\n  - messagebaseform JSON의 ROOT.params[n-1].param 과 동일한 값으로 템플릿 구성 Text의 표시 위치에 해당\n","maxLength":20},"value":{"type":"string","description":"param 에 지정할 Text를 입력합니다.\n\n  - messagebaseform의 ROOT.params[n-1].type이 string인 경우: 고정부와 변수부로 이루어진 문장\n  - messagebaseform의 ROOT.params[n-1].type이 string이고 ROOT.params[n-1].contentType이 url인 경우: http(s)://로 시작하는 URL 입력\n"},"setViewAll":{"type":"boolean","description":"viewAll(모두보기) 활성화 여부를 지정합니다. \n\nmessagebaseform.params의 각 Object 내 setViewAll이 포함된 Object에서만 사용 가능하며, 사용될 수 없는 Object에서 사용 시 무시됩니다. \n\n활성화 여부만 선택 가능하며, 활성화 시 viewAll의 글자수는 RBC 내부 로직에 의해 지정됩니다. \n\n* true: 메시지 내 대상 파라미터 viewAll(모두보기) 활성화 \n* false: 메시지 내 대상 파라미터 viewAll(모두보기) 비활성화\n\n> ※ viewAll은 메시지 내 문자열이 표시되는 영역에 설정된 글자수 이상이 입력된 경우, 대상 영역을 '모두보기 >' 표시와 함께 접힌 상태로 표시하는 메시지 규격입니다.  \n","default":true},"viewAll":{"type":"integer","default":150,"description":"viewAll(모두보기) 접힘 글자수 기준값을 지정합니다. \n\nmessagebaseform.params의 각 Object 내 viewAll이 포함된 Object에서만 사용 가능하며, 사용될 수 없는 Object에서 사용 시 무시됩니다. \n\n* 유효값: 150(default), 300\n* 유효값 이외 수치가 입력되는 경우 default로 처리됩니다.\n"},"decoration":{"$ref":"#/components/schemas/TextDecoration"}},"required":["param","value"]},"TextDecoration":{"description":"StringObject에서 사용되는 text 서식입니다.  \n\n서식을 지원하는 템플릿 상품인 경우 설정이 적용되며, 서식을 지원하지 않는 템플릿 상품에 설정하면 무시됩니다.\n","type":"object","properties":{"textSize":{"description":"maxLength: 6 - 글자 크기 지정시 사용합니다. \n숫자 뒤에 단위 dp를 반드시 붙여서 입력하여야 합니다.\n","type":"string","maxLength":6},"textAlignment":{"description":"문장 정렬 지정시 사용합니다. 지원하는 정렬의 종류는 다음과 같습니다.  \n\n  - textStart: 왼쪽 정렬\n  - center: 중앙 정렬\n  - textEnd: 오른쪽 정렬\n","type":"string","enum":["textStart","center","textEnd"]},"textStyle":{"description":"문장의 글자를 굵게 표현할 때 사용합니다.","type":"string","enum":["bold"]},"textColor":{"description":"maxLength: 7, minLength: 7 - 문장의 글자 색상을 지정한 색상 값으로 설정합니다.(색상코드 Hex 표현식)\n","type":"string","minLength":7,"maxLength":7}}},"FileObject":{"description":"messagebaseform JSON의 ROOT.params[n-1].type이 file 인 경우, 템플릿에 등록할 File 입력에 사용되는 Object 입니다.(현재는 이미지만 지원)\n","type":"object","properties":{"param":{"type":"string","description":"maxLength: 20 - messagebaseform JSON의 ROOT.params[n-1].param 과 동일한 값으로 템플릿 구성 File(이미지)의 표시 위치에 해당합니다.\n","maxLength":20},"value":{"type":"string","description":"maxLength: 20 - 템플릿에 지정할 File(이미지) - maapfile://{fileId} 형식으로 입력합니다.\n","maxLength":20}},"required":["param","value"]},"LineObject":{"type":"object","description":"Line을 표현할 수 있는 템플릿 상품인 경우 설정 시 적용되며 지원하지 않는 상품은 무시됩니다.  \n\n스타일 유형의 텍스트 템플릿이나 LMS 템플릿 중 테이블이 포함된 경우 Line을 지원합니다.  \n\nLineIndex는 테이블에 종속적이므로 테이블 내 행 번호 규칙을 따릅니다.  \n\n첫번째 테이블의 10개 행 사이의 lineIndex는 1 ~ 9까지 유효합니다.(마지막 행은 Line을 설정할 수 없습니다.)  \n\n두번째 테이블은 11 ~ 19, 세번째 테이블은 21 ~ 29 와 같은 방식으로 Index를 부여합니다. \n \n현재는 decoration은 지원하지 않습니다.\n","properties":{"lineIndex":{"description":"템플릿에 Line을 행별로 표시합니다. \n\n현재는 스타일(Cell) 템플릿에서 Text 행 아래 삽입되며 총 9개까지 지원합니다.  \n\nlineIndex 값은 템플릿 내의 지정 위치 값을 의미 합니다. 예를 들어 lineIndex 2는 두번째 Text 행 아래 입니다.\n","type":"integer","enum":[1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19]},"decoration":{"$ref":"#/components/schemas/LineDecoration"}},"required":["lineIndex"]},"LineDecoration":{"description":"LineObject에서 사용되는 서식입니다.  \n\n서식을 지원하는 템플릿 상품인 경우 설정이 적용되며, 서식을 지원하지 않는 템플릿 상품에 설정하면 무시됩니다.\n","type":"object","properties":{"height":{"description":"maxLength: 6 - Line의 굵기 지정시 사용합니다.  \n\n숫자 뒤에 단위 dp를 반드시 붙여서 입력하여야 합니다.\n","type":"string","maxLength":6},"background":{"description":"maxLength: 7, minLength: 7 - Line 색상을 지정한 색상 값으로 설정합니다. - 색상코드 Hex 표현식\n","type":"string","minLength":7,"maxLength":7}}},"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"]}}},"paths":{"/brand/{brandId}/v2/messagebase/{messagebaseId}":{"put":{"summary":"이미 등록된 템플릿의 내용을 수정합니다.\n","description":"이미 등록된 템플릿의 내용을 수정합니다. messagebase의 ID를 유지하면서 내용을 변경하고자 하는 경우 사용이 가능합니다.\n\n수정 등록된 템플릿은 RCS Biz Center 운영자의 승인이 필요합니다.  \n\n  + **계정 권한: 마스터, 매니저, 대행사**\n  + **브랜드 권한: 브랜드 대표운영자, 운영자**\n  + **지원 범위: 텍스트 템플릿(타이틀 선택형 / 타이틀 자유형), 이미지 템플릿, LMS 템플릿**\n","parameters":[{"$ref":"#/components/parameters/BrandKey"},{"$ref":"#/components/parameters/BrandId"},{"$ref":"#/components/parameters/MessagebaseId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModTemplateInfo"}}}},"responses":{"200":{"description":"페이지 내 Response 섹션 참조"}}}}}}
```

### ❖ request body sample

{% tabs %}
{% tab title="타이틀자유형-스타일" %}

```
{
  "brandId": "BR.u720xwadx0",
  "messagebaseformId": "TATA001C",
  "tmpltName": "타이틀자유형-스타일",
  "agencyId": "",
  "body": [
    {
      "param": "title1",
      "value": "제목1",
      "decoration": {
        "textStyle": "bold",
        "textSize": "18dp",
        "textAlignment": "textStart",
        "textColor": "#232329"
      }
    }, 
    {
        "param": "title2",
        "value": "{{2}}",
        "decoration": {
            "textStyle": "bold",
            "textSize": "18dp",
            "textAlignment": "textStart",
            "textColor": "#232329"
        }
    },
    {
      "param": "cell1",
      "value": "{{1}}"
    },
    {
      "param": "cell2",
      "value": "{{2}}"
    },
    {
      "param": "cell3",
      "value": "{{3}}"
    },
    {
      "param": "cell4",
      "value": "{{4}}"
    },      
    {
      "lineIndex": 2
    }
  ],
  "buttons": [
    {
      "click": [
        {
          "action": {
            "dialerAction": {
              "dialPhoneNumber": {
                "phoneNumber": "1522{{지점번호}}"
              }
            },
            "displayText": "고객센터"
          }
        },
        {}
      ]
    }
  ]  
}
```

{% endtab %}

{% tab title="타이틀자유형-서술" %}

```
{
  "brandId": "BR.u720xwadx0",
  "messagebaseformId": "TATA001D",
  "tmpltName": "타이틀자유형-서술",
  "agencyId": "",
  "body": [
    {
      "param": "title1",
      "value": "제목"
    },
    {
      "param": "description",
      "value": "내일 서울 낮 기온은 {{내일기온}}도로 오늘보다 {{온도차이}}도 정도 더 높겠습니다."
    }
  ],
  "buttons": [
    {
      "suggestions": [
        {
          "action": {
            "displayText": "url 연결_수정",
            "postback": {
              "data": "set_by_chatbot_open_url"
            },
            "urlAction": {
              "openUrl": {
                "url": "https://phoneppu.com"
              }
            }
          }
        },
        {
          "action": {
            "dialerAction": {
              "dialPhoneNumber": {
                "phoneNumber": "1522{{지점번호}}"
              }
            },
            "displayText": "고객센터",
            "postback": {
              "data": "set_by_chatbot_dial_phone_number"
            }
          }
        }
      ]
    }
  ]
}
```

{% endtab %}

{% tab title="이미지&타이틀 강조형" %}

```
{
  "brandId": "BR.u720xwadx0",
  "messagebaseformId": "ITHITS",
  "tmpltName": "이미지&타이틀 강조형",
  "agencyId": "",
  "body": [
    {
      "param": "media",
      "value": "maapfile://LT-logo.common-Efehqa"
    },
    {
      "param": "mediaUrl",
      "value": "https://post.naver.com/viewer/postView.naver?memberNo=49797427&volumeNo=34609427&abvc={{abvc}}"
    },
    {
      "param": "title",
      "value": "메리어트 창립 95주년을 맞아 한국을 찾았다."
    },
    {
      "param": "subTitle1",
      "value": "이벤트"
    },
    {
      "param": "subDesc1",
      "value": "최근 여행업계에는 다시 ‘봄’이 찾아온 모습이다."
    },
    {
      "param": "subTitle2",
      "value": "여행업계"
    },
    {
      "param": "subDesc2",
      "value": "제주도는 내국인 관광객 1000만 명을 돌파했다."
    },
    {
      "param": "subTitle3",
      "value": "가을여행"
    },
    {
      "param": "subDesc3",
      "value": "{{이것}}의 긍정적인 부분은 이 숫자 역시 빠르게 회복 중이라는 것"
    }
  ]
}{
```

{% endtab %}

{% tab title="이미지강조형" %}

```
{
  "brandId": "BR.u720xwadx0",
  "messagebaseformId": "ITHIMS",
  "tmpltName": "이미지강조형",
  "agencyId": "",
  "body": [
    {
      "param": "media",
      "value": "maapfile://LT-logo.common-Efehqa"
    },
    {
      "param": "mediaUrl",
      "value": "https://www.kurly.com/{{shop}}/event/kurlyEvent.php?htmid=event%2Fjoin%2Fjoin&%243p=a_custom_741527000799871056&%24deeplink_path=home&%24android_passive_deepview=false&%24ios_passive_deepview=false&~tags=3004&~stage=2210&~campaign=1000072629&~keyword=non_time_B_101412&utm_source=3004&utm_medium=2210&utm_campaign=1000072629&utm_content=non_time_B_101412&_branch_match_id=1037612873204479401&_branch_referrer=H4sIAAAAAAAAA32P3W6EIBSEnwYvFdCV2oQ0bXb3oi9BWKQLVX4iKNm3L2h71aYJyeGbM0wGFaMPz00zrcv8qLn39azt1Kj3KBLp57O4vQDctZ5yJtYQnWGkQydMIIRkGJ4Igqe%2Byo5RSl9eMs%2BjosoZWVRux8XpMYsh6E2y4tq0TPSDz2F3aBf%2B2ebLfONiYrkdVaUqaF8BvuaTUqqP0sKZzEE5n4fcpI157qtLgdorD9qrikaPoD3%2FGD6dtt%2BjAuQS%2BT3QFsKuQMgkKcYIFhLceK7vliJYfo17PBR5ko%2FklpFaZ1nURrI3hiDqEK7WaFhw6yLkkVjYyFGv5sgs%2FFforjsbc8HfqV%2BPT9huqQEAAA%3D%3D"
    },
    {
      "param": "title",
      "value": "한국 시장의 2022년 3분기 예측"
    },
    {
      "param": "description",
      "value": "코로나19 사태 이전의 수요를 회복한 것을 넘어 더욱 성장했다는 점에서 큰 의미가 있다. 앞으로의 전망도 밝다. 최근의 상황을 봤을 때 4분기에는 코로나19 사태 이후 처음으로 객실 예약률이 {{퍼센트}}%가 넘을 것으로 예측된다.",
      "decoration": {}
    },
    {
      "param": "subTitle1",
      "value": "이벤트"
    },
    {
      "param": "subDesc1",
      "value": "최근 여행업계에는 다시 ‘봄’이 찾아온 모습이다."
    }
  ],
  "buttons": [
    {
      "suggestions": [
        {
          "action": {
            "mapAction": {
              "showLocation": {
                "location": {
                  "latitude": "14133843.9742104",
                  "longitude": "4516756.2469226",
                  "label": "서울역"
                },
                "fallbackUrl": "https://info.korail.com/info/index.do"
              }
            },
            "displayText": "서울역",
            "postback": {
              "data": "set_by_chatbot_show_location"
            }
          }
        },
        {
          "action": {
            "clipboardAction": {
              "copyToClipboard": {
                "text": "{{복사텍스트}} 되었습니다."
              }
            },
            "displayText": "복사하기",
            "postback": {
              "data": "set_by_chatbot_copy_to_clipboard"
            }
          }
        }
      ]
    }
  ]
}
```

{% endtab %}

{% tab title="썸네일형" %}

```
{
  "brandId": "BR.u720xwadx0",
  "messagebaseformId": "ITTBNH",
  "tmpltName": "썸네일형",
  "agencyId": "",
    "body": [
        {
            "param": "media",
            "value": "maapfile://LT-BR.kpxN0UgshA-6eyF"
        },
        {
            "param": "mediaUrl",
            "value": "https://www.paris.co.kr/{{URL1}}/{{URL2}}"
        },
        {
            "param": "title1",
            "value": "오픈호텔"
        },
        {
            "param": "description",
            "value": "2018년부터 오픈한 호텔이 {{오픈개수}}개에 달한다. 그리고 내년 초까지 {{신규도시}} 등에 총 5개의 신규 호텔이 문을 연다. 이렇게 되면 총 18개의 호텔을 한국에서 운영하게 된다."
        },
        {
            "param": "subMedia1",
            "value": "maapfile://LT-BR.kpxN0UgshA-rCLj"
        },
        {
            "param": "subMediaUrl1",
            "value": "https://n.news.naver.com/article/016/{{articleId1}}"
        },
        {
            "param": "subMedia2",
            "value": "maapfile://LT-BR.kpxN0UgshA-F8C5"
        },
        {
            "param": "subMediaUrl2",
            "value": "https://n.news.naver.com/article/050/{{articleId2}}"
        },
        {
            "param": "subMedia3",
            "value": "maapfile://LT-BR.kpxN0UgshA-HOCI"
        }
    ],
    "buttons": []
}
```

{% endtab %}

{% tab title="SNS형" %}

```
{
  "brandId": "BR.u720xwadx0",
  "messagebaseformId": "ITSNSH",
  "tmpltName": "SNS형",
  "agencyId": "",
  "body": [
    {
      "param": "media",
      "value": "maapfile://LT-logo.common-34FDUE"
    },
    {
      "param": "mediaUrl",
      "value": "http://rcsbizcenter.com"
    },
    {
      "param": "title",
      "value": "상품명에 '마약' 이름 못쓴다.",
      "decoration": {}
    },
    {
      "param": "description",
      "value": "앞으로 '{{금지단어}}김밥', '{{금지단어}}떡볶이'등 '{{금지단어}}'이라는 단어를 상품명 앞에 붙일 수 없을 것으로 보인다.",
      "decoration": {}
    }
  ],
  "buttons": [
    {
      "suggestions": [
        {
          "action": {
            "calendarAction": {
              "createCalendarEvent": {
                "startTime": "2022-09-01T00:00:00+09",
                "endTime": "2022-09-30T00:00:00+09",
                "title": "호텔 숙박 이벤트를 실시합니다!",
                "description": "{{이벤트설명}}"
              }
            },
            "displayText": "호텔 숙박 이벤트를 실시합니다",
            "postback": {
              "data": "set_by_chatbot_create_calendar_event"
            }
          }
        },
        {
          "action": {
            "mapAction": {
              "requestLocationPush": {}
            },
            "displayText": "현재위치를 보내드립니다",
            "postback": {
              "data": "set_by_chatbot_request_location_push"
            }
          }
        }
      ]
    }
  ]
}
```

{% endtab %}

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

```
{
  "brandId": "BR.u720xwadx0",
  "messagebaseformId": "ITCRM3",
  "tmpltName": "슬라이드형",
  "agencyId": "",
  "body": [
    {
      "param": "media1",
      "value": "maapfile://LT-logo.common-34FDUE"
    },
    {
      "param": "description1",
      "value": "내용 1번이 들어갑니다."
    },
    {
      "param": "media2",
      "value": "maapfile://LT-logo.common-34FDUE"
    },
    {
      "param": "title2",
      "value": "제 2장, {{ttl2}}"
    },
    {
      "param": "description2",
      "value": "제 2장, 설명: {{desc2}}"
    },
    {
      "param": "media3",
      "value": "maapfile://LT-logo.common-34FDUE"
    },
    {
      "param": "description3",
      "value": "제 3장, 설명"
    }
  ],
  "buttons": [
    {
      "suggestions": [
        {},
        {
          "action": {
            "dialerAction": {
              "dialPhoneNumber": {
                "phoneNumber": "15221601"
              }
            },
            "displayText": "고객센터1",
            "postback": {
              "data": "set_by_chatbot_dial_phone_number"
            }
          }
        }
      ]
    }
  ]
}
```

{% endtab %}

{% tab title="LMS형-기본" %}

```
{
  "brandId": "BR.u720xwadx0",
  "messagebaseformId": "CLL00004",
  "tmpltName": "LMS형-기본",
  "agencyId": "",
  "body": [
    {
      "param": "mTitle",
      "value": "움직이는 아이콘!:수박:"
    },
    {
      "param": "description",
      "value": "내용만 입력합니다.\n{{1}}님 안녕하세요.\n동해물과 백두산이 {{2}} 하느님이 보우하사 우리 나라 만세!!\n{{2}}\n동일한 변수를 반복해서 써 봅니다.\n{{2}}"
    }
  ],
  "buttons": [
    {
      "suggestions": [
        {
          "action": {
            "urlAction": {
              "openUrl": {
                "url": "https://www.rcsbizcenter.com"
              }
            },
            "displayText": "URL 버튼 입니다.",
            "postback": {
              "data": "set_by_chatbot_open_url"
            }
          }
        }
      ]
    }
  ]
}
```

{% endtab %}

{% tab title="LMS형-명세서" %}

```
{
  "brandId": "BR.u720xwadx0",
  "messagebaseformId": "CLL00001",
  "tmpltName": "LMS형-명세서",
  "agencyId": "",
  "body": [
    {
      "param": "cellLeft1",
      "value": "납부정보"
    },
    {
      "param": "cellLeft2",
      "value": "자동납부"
    },
    {
      "param": "cellLeft3",
      "value": "승인예정일"
    },
    {
      "param": "cellLeft4",
      "value": "통신요금"
    },
    {
      "param": "cellLeft5",
      "value": "부가사용금액"
    },
    {
      "param": "cellLeft6",
      "value": "납부하실금액"
    },
    {
      "param": "cellRight2",
      "value": "{{place}}}}"
    },
    {
      "param": "cellRight3",
      "value": "{{Month}}월{{day}}일"
    },
    {
      "param": "cellRight4",
      "value": "{{amount1}}"
    },
    {
      "param": "cellRight5",
      "value": "{{amount2}}"
    },
    {
      "param": "cellRight6",
      "value": "{{vat}}"
    },
    {
      "param": "mTitle",
      "value": "청구서함"
    },
    {
      "lineIndex": 1
    }
  ],
  "buttons": [
    {
      "suggestions": [
        {
          "action": {
            "urlAction": {
              "openUrl": {
                "url": "https://www-qa.rcsbizcenter.com/"
              }
            },
            "displayText": "청구서함바로가기",
            "postback": {
              "data": "set_by_chatbot_open_url"
            }
          }
        }
      ]
    }
  ]
}
```

{% endtab %}

{% tab title="테이블아이템 강조형" %}

```
{
  "brandId": "BR.u720xwadx0",
  "messagebaseformId": "CLT00001",
  "tmpltName": "테이블아이템 강조형",
  "agencyId": "",
  "body": [
    {
      "param": "itemTitle",
      "value": "명세서"
    },
    {
      "param": "itemMedia",
      "value": "LT-messagebase.common-2k8ydI"
    },
    {
      "param": "cellLeft1",
      "value": "누적"
    },
    {
      "param": "cellLeft2",
      "value": "일시불"
    },
    {
      "param": "cellLeft3",
      "value": "할부"
    },
    {
      "param": "cellLeft4",
      "value": "합계"
    },
    {
      "param": "cellRight1",
      "value": "{{누적금액}}"
    },
    {
      "param": "cellRight2",
      "value": "{{일시불금액}}"
    },
    {
      "param": "cellRight3",
      "value": "{{할부금}}"
    },
    {
      "param": "cellRight4",
      "value": "{{합계총액}}"
    },
    {
      "lineIndex": 1
    },
    {
      "lineIndex": 3
    }
  ],
  "buttons": []
}
```

{% 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(= messagebaseId)</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="200">필드명</th><th width="82">타입</th><th width="68" align="center">길이</th><th width="108" align="center">필수여부</th><th width="89">기본값</th><th>설명</th></tr></thead><tbody><tr><td><strong><code>messagebaseId</code></strong></td><td>string</td><td align="center"></td><td align="center">O</td><td></td><td>등록된 템플릿ID(= messagebaseId)</td></tr></tbody></table>

### ❖ response body sample

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

```
{
    "code": "20000000",
    "desc": null,
    "result": [
        {
            "messagebaseId": "UBR.u720xwadx0-test202406182"
        }
    ],
    "status": 200
}
```

{% endtab %}

{% tab title="400" %}

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

{
    "error": {
        "code": "64106",
        "message": "Invalid messagebaseId on path parameter"
    },
    "status": 400
}

{
    "error": {
        "code": "64318",
        "message": "Invalid formattedString format - [media's value] file not logo type or not registered"
    },
    "status": 400
}

{
    "error": {
        "code": "64400",
        "message": "required 900x900,  image resolution is 280x103 (param:media, fileId:LT-messagebase.common-Zno7xg)"
    },
    "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 %}
