본문으로 건너뛰기

생성/수정/삭제

그룹 채널 생성

그룹 채널을 생성 할 수 있습니다.

정보

1:1 채널을 만들 경우, reuse: true로 설정하여 요청을 보내면 기존에 동일한 참가자로 구성된 채널이 있다면 새로운 채널을 생성하지 않고 기존 채널 정보를 응답하기 때문에 대화를 이어갈 수 있습니다. 기존 채널이 없다면 새 채널이 생성됩니다.
기존 채널을 판단하는 기준은 채널 참가자가 동일하고, 해당 참가자들 외에 다른 참가자가 참가한 이력이 없으며, 매니저 등록 이력이 없는 경우입니다.

POST /v1/group/channels

Request

속성설명유형기본값필수여부
channel_id채널 아이디. 소문자, 숫자, _ 만 사용할 수 있으며 4~80자로 제한됩니다.String없음O
name채널 이름. 1~150자로 제한됩니다.String없음O
profile_url프로필 URL. 최대 2,048자로 제한됩니다.String없음X
members참가시킬 사용자 아이디 목록. 최대 100명까지 참가 할 수 있습니다.[String]없음O
reuse기존 채널 사용 여부BooleanfalseO
meta메타 데이터. key는 소/대문자, 한글, _, - 만 사용할 수 있으며 100byte string 으로 제한됩니다. value는 200byte string 으로 제합됩니다. key-value set은 최대 10개까지 저장할 수 있습니다.Object없음X
{
"channel_id": "group_channel_1",
"name": "group channel",
"profile_url": "https://example.com/sample.png",
"members": [
"user_1"
...
],
"reuse": false,
"meta": {
"key": "value",
...
}
}

Response

201 success
{
"channel_id": "Channel ID",
"name": "Channel Name",
"profile_url": "Channel Profile URL",
"type": "group",
"freeze": false,
"total_message_count": 0,
"total_file_count": 0,
"members": [
{
"user_id": "User ID",
"name": "User Name",
"profile_url": "User Profile URL",
"meta": {
"key": "value",
...
},
"created_at": 1658977173917,
"updated_at": 1658977173917
},
...
],
"meta": {
"key": "value",
...
},
"created_at": 1658977173917,
"updated_at": 1658977173917
}

그룹 채널 수정

채널 정보를 수정 할 수 있습니다.

PUT /v1/group/channels/(channel_id)

Parameters

속성설명유형필수여부
channel_id채널 아이디StringO

Request

속성설명유형필수여부
name채널 이름. 1~150자로 제한됩니다.StringO
profile_url프로필 URL. 최대 2,048자로 제한됩니다.StringX
{
"name": "group channel",
"profile_url": "https://example.com/sample.png"
}

Response

200 success
{
"channel_id": "Channel ID",
"name": "Channel Name",
"profile_url": "Channel Profile URL",
"type": "group",
"freeze": false,
"total_message_count": 0,
"total_file_count": 0,
"meta": {
"key": "value",
...
},
"created_at": 1658977173917,
"updated_at": 1658977173917
}

그룹 채널 삭제

채널을 삭제 할 수 있습니다.

DELETE /v1/group/channels/(channel_id)

Parameters

속성설명유형필수여부
channel_id채널 아이디StringO

Response

200 success