콘텐츠로 이동

메시지 수신

Endpoint

해당 API는 해피톡에서 고객사 수신도메인으로 발송되는 API 입니다.

[POST] API URL 정보

설정된 수신도메인/message/{UUID}
설정된 수신도메인/message/{UUID}

Description

Description

해당 API는 해피톡에서 발신된 API이며, Biz-API 기능 중 메시지에 대한 정보를 고객사 수신도메인으로 수신되는 API입니다.

템플릿 V1/V2 적용 대상 안내

  • 템플릿 V1 업체: Biz API, 아카이브, 상담내역 API, Happytalk Embedded 사용 고객사
    → Data Dictionary(V2)를 참고하여 대응 개발이 필요합니다.

  • 템플릿 V2 업체: 위 조건에 해당하지 않는 고객사

템플릿 V2 유형 사용을 희망하실 경우, 대응 개발 완료 후 해피톡 고객센터로 문의해 주시기 바랍니다.

자세한 내용은 템플릿 타입 전환 안내(~26/06/30) 공지에서 확인하실 수 있습니다.

Request (Json)

None

Body

None

Example

REST API Sample

None

Response (Json)

Parameter

Data by Message Type
Field Name Type Required Description
uuid String Y 사용자 식별 정보 (영문,숫자,_ 조합)
room_id String Y 상담방 아이디
type String Y 메시지 타입
msgid String Y 메시지 아이디
content String Y 메시지 정보
image Object N 이미지 정보 (데이터 없음)
auto_end String Y 자동 종료 여부 (Y/N)
Field Name Type Required Description
uuid String Y 사용자 식별 정보 (영문,숫자,_ 조합)
room_id String Y 상담방 아이디
type String Y 메시지 타입
msgid String Y 메시지 아이디
content String Y 메시지 정보 (공백)
image Object Y 이미지 정보
width Int Y 이미지 가로 크기
height Int Y 이미지 세로 크기
url String Y 이미지 URL
auto_end String Y 자동 종료 여부 (Y/N)
Field Name Type Required Description
uuid String Y 사용자 식별 정보 (영문,숫자,_ 조합)
room_id String Y 상담방 아이디
type String Y 메시지 타입
msgid String Y 메시지 아이디
content Object Y 메시지 정보
text String Y 메시지 내용 (문자)
link Object Y 다운로드 링크 버튼
name String Y 링크 버튼 이름
url String Y 파일 다운로드 링크
auto_end String Y 자동 종료 여부 (Y/N)
Field Name Type Required Description
uuid String Y 사용자 식별 정보 (영문,숫자,_ 조합)
room_id String Y 상담방 아이디
type String Y 메시지 타입
msgid String Y 메시지 아이디
content Object Y 메시지 정보
text String Y 메시지 내용 (문자)
link Object Y 링크 버튼
name String Y 링크 버튼 이름 (공백)
url String Y 링크 버튼 URL (공백)
auto_end String Y 자동 종료 여부 (Y/N)
isLocked Boolean N 보안메시지 발화 여부 (default : false)
Field Name Type Required Description
uuid String Y 사용자 식별 정보 (영문,숫자,_ 조합)
room_id String Y 상담방 아이디
type String Y 메시지 타입
msgid String Y 메시지 아이디
content Object Y 메시지 정보
text String Y 메시지 내용 (문자)
link Object Y 링크 버튼
name String Y 링크 버튼 이름
url String Y 링크 버튼 URL
auto_end String Y 자동 종료 여부 (Y/N)
isLocked Boolean N 보안메시지 발화 여부 (default : false)
Field Name Type Required Description
uuid String Y 사용자 식별 정보 (영문,숫자,_ 조합)
room_id String Y 상담방 아이디
type String Y 메시지 타입
msgid String Y 메시지 아이디
content Object Y 메시지 정보
text String Y 메시지 내용 (문자)
link Array(Object) Y 링크 버튼
name String Y 링크 버튼 이름
url String Y 링크 버튼 URL
auto_end String Y 자동 종료 여부 (Y/N)
isLocked Boolean N 보안메시지 발화 여부 (default : false)
Field Name Type Required Description
uuid String Y 사용자 식별 정보 (영문,숫자,_ 조합)
room_id String Y 상담방 아이디
type String Y 메시지 타입 (template)
msgid String Y 메시지 아이디
content Object Y 템플릿 메시지 정보
type Type Y 템플릿 타입 (TEXT)
message text(1000) Y 메시지 문구
buttonList buttonList[] N 메시지 버튼
quickReplyList QuickReply[] N 바로 연결 버튼
isLocked Boolean Y 보안메시지 발화 여부 (default : false)
auto_end String Y 자동 종료 여부 (Y/N)
Field Name Type Required Description
uuid String Y 사용자 식별 정보 (영문,숫자,_ 조합)
room_id String Y 상담방 아이디
type String Y 메시지 타입 (template)
msgid String Y 메시지 아이디
content Object Y 템플릿 메시지 정보
type Type Y 템플릿 타입 (IMAGE)
message text(1000) Y 메시지 문구
image Image Y 이미지 정보 필드
buttonList buttonList[] N 메시지 버튼
quickReplyList QuickReply[] N 바로 연결 버튼
isLocked Boolean Y 보안메시지 발화 여부 (default : false)
auto_end String Y 자동 종료 여부 (Y/N)
Field Name Type Required Description
uuid String Y 사용자 식별 정보 (영문,숫자,_ 조합)
room_id String Y 상담방 아이디
type String Y 메시지 타입 (template)
msgid String Y 메시지 아이디
content Object Y 템플릿 메시지 정보
type Type Y 템플릿 타입 (CAROUSEL)
carouselBlocks Carousel[] Y 캐러셀 상세 메시지 정의 필드
quickReplyList QuickReply[] N 바로 연결 버튼
isLocked Boolean Y 보안메시지 발화 여부 (default : false)
auto_end String Y 자동 종료 여부 (Y/N)

Example

Success
{
  "uuid": "test-user",
  "room_id": "ZJsOV48NS2PQtxK3k69UvDhW5eoCEf",
  "type": "text",
  "content": "test",
  "image": {},
  "msgid": "message_id",
  "auto_end": "N"
}
{
  "uuid": "test-user",
  "room_id": "ZJsOV48NS2PQtxK3k69UvDhW5eoCEf",
  "type": "image",
  "content": "",
  "image": {
    "width": 481,
    "height": 469,
    "url": "https://patch.happytalk.io/data/chat_data/2023_06_01/61d1263f3cbb3ab1953a66f7ed5adbd3.jpg"
  },
  "msgid": "message_id",
  "auto_end": "N"
}
{
  "uuid":"test-user",
  "room_id":"ZJsOV48NS2PQtxK3k69UvDhW5eoCEf",
  "type":"normal",
  "msgid":"message_id",
  "content":{
    "text":"파일명 : welcome.zip 유효기한 ~ 2023-06-08 15:28 사이즈 : 59KB"
  },
  "links":{
    "name":"다운로드",
    "url":"https://patch-customer.happytalk.io/files/s3_download?v=2&token=UDQxeU94b1JHYS9Od1pyVG5ZaGhnZz09"
  },
  "auto_end":"N"
}
{
  "uuid":"test-user",
  "room_id":"ZJsOV48NS2PQtxK3k69UvDhW5eoCEf",
  "type":"normal",
  "msgid":"message_id",
  "content":{
    "text":"test"
  },
  "links":{
    "name":"",
    "url":""
  },
  "auto_end":"N"
}
{
  "uuid":"test-user",
  "room_id":"ZJsOV48NS2PQtxK3k69UvDhW5eoCEf",
  "type":"normal",
  "msgid":"message_id",
  "content":{
    "text":"test"
  },
  "links":{
    "name":"happyalk URL",
    "url":"https://happytalk.io"
  },
  "auto_end":"N"
}
{
  "uuid":"test-user",
  "room_id":"ZJsOV48NS2PQtxK3k69UvDhW5eoCEf",
  "type":"normal",
  "msgid":"message_id",
  "content":{
    "text":"test"
  },
  "links":[
    {
      "name":"happytalk URL",
      "url":"https://happytalk.io"
    },
    {
      "name":"ARS happytalk URL",
      "url":"https://ars.happytalk.io"
    }
  ],
  "auto_end":"N"
}
{
  "uuid":"test-user",
  "room_id":"ZJsOV48NS2PQtxK3k69UvDhW5eoCEf",
  "type":"template",
  "msgid":"message_id",
  "content":{
    "type":"TEXT",
    "message":"텍스트 + 버튼 + 바로연결",
    "buttonList":[
      {
        "type":"TEXT",
        "name":"챗봇 발화 버튼"
      },
      {
        "type":"WEB_LINK",
        "name":"링크 버튼",
        "pcUrl":"https://www.naver.com",
        "mobileUrl":"https://m.naver.com"
      },
      {
        "type":"COUPON",
        "name":"쿠폰",
        "description":"쿠폰 테스트",
        "pcUrl":"https://www.naver.com",
        "mobileUrl":"https://m.naver.com",
        "schemaAOS":"https://www.naver.com",
        "schemaIOS":"https://www.naver.com"
      }
    ],
    "quickReplyList":[
      {
        "type":"TEXT",
        "name":"챗봇 발화 버튼"
      },
      {
        "type":"WEB_LINK",
        "name":"링크 버튼",
        "pcUrl":"https://www.naver.com",
        "mobileUrl":"https://m.naver.com"
      }
    ],
    "isLocked":false
  },
  "auto_end":"N"
}
{
  "uuid":"test-user",
  "room_id":"ZJsOV48NS2PQtxK3k69UvDhW5eoCEf",
  "type":"template",
  "msgid":"message_id",
  "content":{
    "type":"IMAGE",
    "message":"이미지 + 텍스트 + 버튼 + 바로연결",
    "image":{
      "imageUrl":"https://static.happytalkio.com/이미지_URL_PATH"
    },
    "buttonList":[
      {
        "type":"TEXT",
        "name":"챗봇 발화 버튼"
      },
      {
        "type":"WEB_LINK",
        "name":"링크 버튼",
        "pcUrl":"https://www.naver.com",
        "mobileUrl":"https://m.naver.com"
      },
      {
        "type":"COUPON",
        "name":"쿠폰",
        "description":"쿠폰 테스트",
        "pcUrl":"https://www.naver.com",
        "mobileUrl":"https://m.naver.com",
        "schemaAOS":"https://www.naver.com",
        "schemaIOS":"https://www.naver.com"
      }
    ],
    "quickReplyList":[
      {
        "type":"TEXT",
        "name":"챗봇 발화 버튼"
      },
      {
        "type":"WEB_LINK",
        "name":"링크 버튼",
        "pcUrl":"https://www.naver.com",
        "mobileUrl":"https://m.naver.com"
      }
    ],
    "isLocked":false
  },
  "auto_end":"N"
}
{
  "uuid":"test-user",
  "room_id":"ZJsOV48NS2PQtxK3k69UvDhW5eoCEf",
  "type":"template",
  "msgid":"message_id",
  "content":{
    "type":"CAROUSEL",
    "message":"캐러셀 + 바로 연결",
    "carouselBlocks":[
      {
        "header":"캐러셀 1번 헤더",
        "message":"캐러셀 1번 메시지",
        "image":{
          "imageUrl":"https://static.happytalkio.com/이미지_URL_PATH1"
        },
        "buttonList":[
          {
            "type":"TEXT",
            "name":"챗봇 발화 버튼"
          },
          {
            "type":"WEB_LINK",
            "name":"링크 버튼",
            "pcUrl":"https://www.naver.com",
            "mobileUrl":"https://m.naver.com"
          }
        ],
        "coupon":{
          "name":"쿠폰",
          "description":"쿠폰 테스트",
          "pcUrl":"https://www.naver.com",
          "mobileUrl":"https://m.naver.com",
          "schemaAOS":"https://www.naver.com",
          "schemaIOS":"https://www.naver.com"
        }
      },
      {
        "header":"캐러셀 2번 헤더",
        "message":"캐러셀 2번 메시지",
        "image":{
          "imageUrl":"https://static.happytalkio.com/이미지_URL_PATH2"
        },
        "buttonList":[
          {
            "type":"TEXT",
            "name":"챗봇 발화 버튼"
          },
          {
            "type":"WEB_LINK",
            "name":"링크 버튼",
            "pcUrl":"https://www.naver.com",
            "mobileUrl":"https://m.naver.com"
          }
        ],
        "coupon":{
          "name":"쿠폰",
          "description":"쿠폰 테스트",
          "pcUrl":"https://www.naver.com",
          "mobileUrl":"https://m.naver.com",
          "schemaAOS":"https://www.naver.com",
          "schemaIOS":"https://www.naver.com"
        }
      }
    ],
    "quickReplyList":[
      {
        "type":"TEXT",
        "name":"챗봇 발화 버튼"
      },
      {
        "type":"WEB_LINK",
        "name":"링크 버튼",
        "pcUrl":"https://www.naver.com",
        "mobileUrl":"https://m.naver.com"
      }
    ],
    "isLocked":false
  },
  "auto_end":"N"
}
Failure

None

Data Dictionary(V1)

Data Dictionary

None

Field Name Description
text 일반 텍스트
image 이미지
normal 혼합형 메시지 (텍스트 + 링크 버튼)
필드명 데이터 타입 필수여부 설명
text String Y 메시지 텍스트
image_url String N 이미지 URL
link Link N 링크 버튼 정보
필드명 데이터 타입 필수여부 설명
name String[] Y 링크 버튼 제목 리스트
url String[] Y 링크 버튼 URL 리스트

Data Dictionary(V2)

Data Dictionary

None

Field Name Description
text 일반 텍스트
image 이미지
normal 혼합형 메시지 (텍스트 + 링크 버튼)
template 템플릿 메시지
타입명 설명
TEXT 텍스트 메시지와 버튼, 바로연결 등 혼합형 메시지를 발화하는 타입
IMAGE 이미지 + 텍스트 메시지와 버튼, 바로연결 등 혼합형 메시지를 발화하는 타입
CAROUSEL 별도의 필드에 메시지를 정의하여 블록을 슬라이드 형태로 보여줄 수 있는 타입

Optional

필드명 데이터 타입 필수여부 설명
type ButtonType Y 버튼 타입을 정의하는 필드
name text (30) Y 버튼 이름
pcUrl text(1000) Y/N PC 환경에서 지정된 URL로 연결 해주는 필드 (ButtonType이 WEB_LINK, COUPON 일때 필수)
mobileUrl text(1000) Y/N MOBILE 환경에서 지정된 URL로 연결 해주는 필드 (ButtonType이 WEB_LINK, COUPON 일때 필수)
description text(12) Y/N 쿠폰 설명 (ButtonType이 COUPON 일때 필수)
schemaAOS text(1000) N 안드로이드 기기 환경에서 앱스키마를 호출할 수 있는 필드 (추후 지원 예정)
schemaIOS text(1000) N IOS 기기 환경에서 앱스키마를 호출할 수 있는 필드 (추후 지원 예정)
타입명 설명
TEXT 버튼 이름을 발화하는 버튼
WEB_LINK 지정된 URL로 이동 시키는 버튼
COUPON 쿠폰 형태 버튼

Optional

필드명 데이터 타입 필수여부 설명
type QuickReplyType Y 바로 연결 버튼 타입을 정의하는 필드
name text (14) Y 바로 연결 버튼 이름
pcUrl text(1000) Y/N PC 환경에서 지정된 URL로 연결 해주는 필드 (QuickReplyType이 WEB_LINK 일때 필수)
mobileUrl text(1000) Y/N MOBILE 환경에서 지정된 URL로 연결 해주는 필드 (QuickReplyType이 WEB_LINK 일때 필수)
타입명 설명
TEXT 버튼 이름을 발화하는 버튼
WEB_LINK 지정된 URL로 이동 시키는 버튼

Optional

필드명 데이터 타입 필수여부 설명
imageUrl text Y 해피톡 서버에 업로드된 이미지 URL

Optional (Type이 CAROUSEL인 경우 필수)

필드명 데이터 타입 필수여부 설명
header text(20) Y 헤더 문구 필드
message text(180) Y 메시지 필드
image Image Y 이미지 정보 필드
buttonList buttonList[] N 버튼 필드 정의시 최소 1개, 최대 2개 (COUPON 타입 제외)
coupon coupon N 쿠폰 정보 필드
필드명 데이터 타입 필수여부 설명
name text (30) Y 쿠폰 이름
description text (12) Y 쿠폰 설명
pcUrl text(1000) Y PC 환경에서 지정된 URL로 연결 해주는 필드
mobileUrl text(1000) Y MOBILE 환경에서 지정된 URL로 연결 해주는 필드
schemaAOS text(1000) N 안드로이드 기기 환경에서 앱스키마를 호출할 수 있는 필드 (추후 지원 예정)
schemaIOS text(1000) N IOS 기기 환경에서 앱스키마를 호출할 수 있는 필드 (추후 지원 예정)