SetPinned

[POST] .../v1/chatmessage/setpinned

Changes the pinned flag for a chat message. Use this method to pin or unpin one message in a chat so it appears in ChatMessage/GetPinned and in pinned-message navigation. The request body is required, id must contain the message UUID and pinned determines the new message state. Access is scoped to the current request user's rights in the message chat and the response returns row_affected with the affected message id. Missing body, missing id, missing message, denied access, private-message restrictions, closed chat restrictions and database failures are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
id String Required Message UUID.
pinned Boolean Required true to pin the message, false to unpin it.

Request Example

{
  "id": "4b9727ec-a389-4274-95b6-069350000001",
  "pinned": true
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1,
    "ids": [
      "4b9727ec-a389-4274-95b6-069350000001"
    ]
  }
}