채널 정보 업데이트

Update Channel

PUT https://api.talkplus.io/v1.4/api/channels/:channelId

data의 경우, 최대 5개의 key-value pair를 입력할 수 있습니다. key의 최대 size는 128자 이고 최대 value size는 1024자입니다. Key, value 둘 다 문자열이어야 합니다.

Path Parameters

NameTypeDescription

channelId*

string

Headers

NameTypeDescription

content-type

string

application/json

api-key*

string

App API key

app-id*

string

App ID

Request Body

NameTypeDescription

name

string

채널명

ownerId

string

채널을 소유할 사용자 ID

invitationCode

string

Required if channel type is 'invitationOnly'

imageUrl

string

채널 이미지 URL

data

object

Key-value 형식의 채널 메타 정보

maxMemberCount

number

채널 최대 인원수.

- super channel: default: -1(무제한), min: 1, max: 제한 없음)

- 그 외: default: 100, min: 1, max: 100

hideMessagesBeforeJoin

boolean

member에게 가입 이전 시점의 메시지를 숨길지 여부

category

string

채널 검색 시 사용할 수 있음. 최대 32자

subcategory

string

채널 검색 시 사용할 서브필터. category가 먼저 설정되어 있어야 함. 최대 32자.

{
  "channel": {
    "id": "channel123",
    "name": "MyFirstChannel",
    "ownerId": "user123",
    "type": "private",
    "imageUrl": "image url",
    "invitationCode": "",
    "isFrozen": false,
    "hideMessagesBeforeJoin": false,
    "category": "",
    "subcategory": "",
    "privateTag": "",
     "privateData": "",
    "memberCount": 2,
    "maxMemberCount": 100,
    "data": {
      "someMetaKey1": "someMetaValue1",
      "someMetaKey2": "someMetaValue2"
    },
    "members": [
      {
        "id": "user123",
        "username": "john",
        "profileImageUrl": "http://cnd.test.com/123.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      },
      {
        "id": "user456",
        "username": "james",
        "profileImageUrl": "http://cnd.test.com/456.jpg",
        "data": {},
        "memberInfo": {},
        "lastReadAt": 1583924400,
        "lastSentAt": 1583924400,
        "updatedAt": 1583924400,
        "createdAt": 1583921400
      }
    ],
    "mutedUsers": [],
    "bannedUsers": [],
    "updatedAt": 1583924400,
    "createdAt": 1583921400,
    "unreadCount": 0,
    "lastReadAt": 0,
    "lastMessage": {
      "id": "sdf2l5s9j",
      "channelId": "channel123",
      "userId": "user456",
      "username": "myUsername",
      "profileImageUrl": "http://cdn.test.com/123.jpg",
      "type": "message",
      "text": "Hello world",
      "data": {
        "customField": "customData"
      },
      "parentMessage": {},
      "translations": {},
      "reactions": {"happy": 1},
      "ownReactions": [],
      "createdAt": 1583921400
    }
  }
}

Last updated