Chat

🔒 Update chat

Update chat

Access: authorized (10 ) · allowNullCompany: true · Scope: write

Allows: chat:update (все обязательны; ресурс — <тип>ID / ID из запроса, user:* — userID или сам пользователь)

TypeScript (copy-paste)

POST /chat/update

<details open><summary><b>Params</b></summary>
export interface ChatUpdateParams {
  chatID: string
}
</details> <details open><summary><b>Body (Partial)</b></summary>
// Patch-body: все поля опциональны (Valid.Patch)
export type ChatUpdateBody = Partial<Chat>

export interface ChatUpdateBodyFields {
  ID?: string
  cID?: string | null
  type?: Chat_Type
  logoFID?: string | null
  title?: string | null
  meta?: Record<string, any> | null
  createDT?: string
  /** Unix timestamp in milliseconds */
  updTS?: number
  updUID?: string
  isDeleted?: boolean
  /** Unix timestamp in milliseconds */
  deletedTS?: number | null
}
</details> <details open><summary><b>Response</b></summary>
export type ChatUpdateResponse = IServerResponse<Chat>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
</details>

Полный файл типов: /docs/types · raw: /docs/api-types.ts

post/chat/update

Request

  • Base URL: http://localhost
  • URL: http://localhost/chat/update
  • Auth: one of:
    • API key in header sid and API key in header rts and API key in header sig
    • HTTP bearer

Query parameters

chatIDstring uuid required

Можно передать header chatID (сервер мержит headers+query)

Headers

devIDstring uuid required

UUID устройства клиента

tzstring required
Example:Europe/Moscow

Таймзона клиента (IANA или offset)

appstring required
Example:kosmodrom-web

Имя клиентского приложения

appVerstring required
Example:1.0.0

Версия клиента

rKeystring

Уникальный ключ запроса для логов/саппорта

Request body

IDstring uuid
cIDstring uuid nullable
type'public' | 'private' | 'direct' | 'company' | 'meeting'

public = "public", private = "private", direct = "direct", company = "company", meeting = "meeting"

logoFIDstring uuid nullable
titlestring nullable
metaobject nullable
createDTstring date-time
updTSinteger

Unix timestamp in milliseconds

updUIDstring
isDeletedboolean
deletedTSinteger nullable

Unix timestamp in milliseconds

Response

OK — IServerResponse<Chat>

codeinteger required
srvTSinteger required

Server timestamp (ms)

rkeystring required

Request key

Example response

{
  "code": 200
}

Changes

No recorded changes to this operation across all 1 revision of this API.