템플릿 수정
초기 텍스트 템플릿에서만 제한적으로 사용 가능한 API 이므로 템플릿 수정 v2 API 사용을 권장합니다.
Request
지정 템플릿을 업데이트 합니다.
PUT /brand/{brandId}/v2/messagebase/{messagebaseId} 를 이용하면 모든 유형의 템플릿을 수정할 수 있습니다.
지정 템플릿을 업데이트 합니다. 템플릿의 업데이트는 승인상태에 따라 처리 여부가 결정됩니다.
계정 권한: 마스터, 매니저, 대행사
브랜드 권한: 브랜드 대표운영자, 운영자
지원 범위: 텍스트 템플릿(타이틀 선택형 / 타이틀 자유형)
수정 가능 상태 : 저장, 반려, 반려(수정), 승인
maxLength: 13 - 브랜드 내 정보 접근시 사용되는 브랜드ID Path Parameter 입니다.
messagebase ID Path parameter 입니다.
maxLength: 18 - RCS Biz Center에서 브랜드 등록 시 자동 생성되는 Key 입니다.
대행사가 해당 브랜드에 대한 권한 여부를 판단하는데 사용됩니다. 따라서, 대행사 계정으로 브랜드 내 정보를 조회/등록/수정 API 연동 시 Header에 설정되어야 합니다.
템플릿 등록 정보 객체입니다.
템플릿 등록시 지정된 messagebaseform의 widgetPolicy 의 속성만 수정/삭제가 가능합니다.
formattedString에 템플릿이 정의되며 지정된 형식에 맞게 등록되어야 합니다.
formattedString 내 suggestions에 추가 가능한 버튼 Action은 다음 링크에서 확인 가능합니다.
maxLength: 10 - 템플릿 양식 ID
maxLength: 25 - 사용자 지정 템플릿ID로 영문/숫자 25자 이내만 가능
maxLength: 40 - 템플릿명
maxLength: 13 - 브랜드ID
maxLength: 20 - 대행사ID
PUT /api/1.1/brand/{brandId}/messagebase/{messagebaseId} HTTP/1.1
Host: api-qa.rcsbizcenter.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 854
{
"messagebaseformId": "text",
"custTmpltId": "text",
"tmpltName": "text",
"brandId": "text",
"agencyId": "text",
"formattedString": {
"RCSMessage": {
"trafficType": "advertisment",
"openrichcardMessage": {
"card": "open_rich_card",
"copyAllowed": true,
"zoomAllowed": true,
"scaleAllowed": true,
"layout": {
"weight": 1,
"visibility": "visible",
"background": "text",
"corner_radius": "text",
"padding": "text",
"paddingTop": "text",
"paddingLeft": "text",
"paddingRight": "text",
"paddingBottom": "text",
"margin": "text",
"marginTop": "text",
"marginBottom": "text",
"marginLeft": "text",
"marginRight": "text",
"click": {
"reply": {
"displayText": "text",
"postback": {
"data": "text"
}
}
},
"widget": "View",
"width": "text",
"height": "text",
"widgetPolicy": {
"allowedAttributes": [
"text"
]
}
},
"suggestions": [
{
"action": {
"displayText": "text",
"postback": {
"data": "text"
},
"urlAction": {
"openUrl": {
"url": "https://example.com"
}
}
}
}
]
}
}
}
}
❖ request body sample
지원 범위: 텍스트 템플릿(타이틀 선택형 / 타이틀 자유형) - messagebaseformId 확인하세요.
{
"regMessagebases": [
{
"brandId": "BR.u720xwadx0",
"custTmpltId": "test2024062101",
"messagebaseformId": "TATA001C",
"tmpltName": "타이틀자유형-스타일",
"agencyId": "",
"formattedString": {
"RCSMessage": {
"trafficType": "advertisement",
"openrichcardMessage": {
"card": "open_rich_card",
"version": "1.0.0",
"zoomAllowed": true,
"scaleAllowed": true,
"layout": {
"widget": "LinearLayout",
"width": "match",
"height": "content",
"orientation": "vertical",
"children": [
{
"widget": "LinearLayout",
"width": "match",
"height": "content",
"orientation": "vertical",
"padding": "20dp",
"children": [
{
"widget": "LinearLayout",
"width": "match",
"height": "content",
"orientation": "horizontal",
"visibility": "visible",
"children": [
{
"widgetPolicy": {
"allowedAttributes": [
"text"
]
},
"widget": "TextView",
"width": "match",
"height": "content",
"textStyle": "bold",
"textAlignment": "textStart",
"text": "제목",
"textColor": "#232323",
"textSize": "19dp",
"weight": "1"
},
{
"widgetPolicy": {
"allowedAttributes": [
"text"
]
},
"widget": "TextView",
"width": "match",
"height": "content",
"textStyle": "bold",
"textAlignment": "textEnd",
"text": "{{cell20}}",
"textColor": "#0094ff",
"textSize": "19dp",
"weight": "1",
"visibility": "visible"
}
]
},
{
"width": "match",
"height": "3dp",
"widget": "View",
"background": "#232323",
"visibility": "visible",
"marginTop": "10dp",
"marginBottom": "12dp"
},
{
"width": "match",
"height": "content",
"widget": "LinearLayout",
"orientation": "vertical",
"children": [
{
"width": "match",
"height": "content",
"widget": "LinearLayout",
"visibility": "visible",
"orientation": "horizontal",
"children": [
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell1}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textStart"
},
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell2}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textEnd"
}
]
},
{
"widgetPolicy": {
"allowedAttributes": [
"visibility"
]
},
"width": "match",
"height": "1dp",
"widget": "View",
"background": "#232323",
"visibility": "gone",
"marginTop": "12dp",
"marginBottom": "12dp"
},
{
"width": "match",
"height": "content",
"widget": "LinearLayout",
"visibility": "visible",
"orientation": "horizontal",
"children": [
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell3}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textStart"
},
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell4}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textEnd"
}
]
},
{
"widgetPolicy": {
"allowedAttributes": [
"visibility"
]
},
"width": "match",
"height": "1dp",
"widget": "View",
"background": "#232323",
"visibility": "gone",
"marginTop": "12dp",
"marginBottom": "12dp"
},
{
"width": "match",
"height": "content",
"widget": "LinearLayout",
"visibility": "visible",
"orientation": "horizontal",
"children": [
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell5}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textStart"
},
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell6}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textEnd"
}
]
},
{
"widgetPolicy": {
"allowedAttributes": [
"visibility"
]
},
"width": "match",
"height": "1dp",
"widget": "View",
"background": "#232323",
"visibility": "gone",
"marginTop": "12dp",
"marginBottom": "12dp"
},
{
"width": "match",
"height": "content",
"widget": "LinearLayout",
"visibility": "visible",
"orientation": "horizontal",
"children": [
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell7}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textStart"
},
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell8}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textEnd"
}
]
},
{
"widgetPolicy": {
"allowedAttributes": [
"visibility"
]
},
"width": "match",
"height": "1dp",
"widget": "View",
"background": "#232323",
"visibility": "gone",
"marginTop": "12dp",
"marginBottom": "12dp"
},
{
"width": "match",
"height": "content",
"widget": "LinearLayout",
"visibility": "visible",
"orientation": "horizontal",
"children": [
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell9}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textStart"
},
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell10}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textEnd"
}
]
},
{
"widgetPolicy": {
"allowedAttributes": [
"visibility"
]
},
"width": "match",
"height": "1dp",
"widget": "View",
"background": "#232323",
"visibility": "gone",
"marginTop": "12dp",
"marginBottom": "12dp"
},
{
"width": "match",
"height": "content",
"widget": "LinearLayout",
"visibility": "visible",
"orientation": "horizontal",
"children": [
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell11}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textStart"
},
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell12}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textEnd"
}
]
},
{
"widgetPolicy": {
"allowedAttributes": [
"visibility"
]
},
"width": "match",
"height": "1dp",
"widget": "View",
"background": "#232323",
"visibility": "gone",
"marginTop": "12dp",
"marginBottom": "12dp"
},
{
"width": "match",
"height": "content",
"widget": "LinearLayout",
"visibility": "visible",
"orientation": "horizontal",
"children": [
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell13}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textStart"
},
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell14}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textEnd"
}
]
},
{
"widgetPolicy": {
"allowedAttributes": [
"visibility"
]
},
"width": "match",
"height": "1dp",
"widget": "View",
"background": "#232323",
"visibility": "gone",
"marginTop": "12dp",
"marginBottom": "12dp"
},
{
"width": "match",
"height": "content",
"widget": "LinearLayout",
"visibility": "visible",
"orientation": "horizontal",
"children": [
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell15}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textStart"
},
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell16}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textEnd"
}
]
},
{
"widgetPolicy": {
"allowedAttributes": [
"visibility"
]
},
"width": "match",
"height": "1dp",
"widget": "View",
"background": "#232323",
"visibility": "gone",
"marginTop": "12dp",
"marginBottom": "12dp"
},
{
"width": "match",
"height": "content",
"widget": "LinearLayout",
"visibility": "visible",
"orientation": "horizontal",
"children": [
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell17}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textStart"
},
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell18}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textEnd"
}
]
},
{
"widgetPolicy": {
"allowedAttributes": [
"visibility"
]
},
"width": "match",
"height": "1dp",
"widget": "View",
"background": "#232323",
"visibility": "gone",
"marginTop": "12dp",
"marginBottom": "12dp"
},
{
"width": "match",
"height": "content",
"widget": "LinearLayout",
"visibility": "visible",
"orientation": "horizontal",
"children": [
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "총합",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textStart"
},
{
"widgetPolicy": {
"allowedAttributes": [
"text",
"textAlignment",
"textColor",
"textSize",
"textStyle"
]
},
"text": "{{cell20}}",
"width": "match",
"height": "content",
"weight": 1,
"widget": "TextView",
"textSize": "16dp",
"textColor": "#232323",
"textAlignment": "textEnd"
}
]
},
{
"widgetPolicy": {
"allowedAttributes": [
"visibility"
]
},
"width": "match",
"height": "1dp",
"widget": "View",
"background": "#232323",
"visibility": "gone",
"marginTop": "12dp",
"marginBottom": "12dp"
}
]
}
]
}
]
},
"suggestions": [
{}
]
}
}
}
}
]
}
Response
result - array<object>
messagebaseId
string
수정된템플릿ID(= messagebaseId)
❖ response body sample
{
"code": "20000000",
"desc": null,
"result": [
{
"messagebaseId": "UBR.u720xwadx0-test202406182"
}
],
"status": 200
}
error code는 RCS Biz Center - Response body error code 참조
Last updated
Was this helpful?