# Ghim tin nhắn

1. Body

<table><thead><tr><th width="135">Name</th><th width="288">Type</th><th>Description</th></tr></thead><tbody><tr><td>service</td><td>message</td><td></td></tr><tr><td>method</td><td>pinMsg</td><td></td></tr><tr><td>data</td><td><pre class="language-json"><code class="lang-json">{
    "method": "pinMsg",
    "service": "message",    
    "data": {
        "accountId": "39456257143545255",
        "toId": "7070722571989963531",
        "group": true,
        "clientMsgId": "1726471613254",
        "globalMsgId": "5836005608509",
        "senderId": "39456257143545255",
        "senderName": "Saint Laurent",
        "message": "https://b-f50-zpg-r.zdn.vn/25075273188988217/082f646d6034c66a9f25.jpg",
        "msgType": "chat.photo"
    }
}
</code></pre></td><td><ul><li>group: <em>true/false</em></li><li>globalMsgId: <em>msgId</em></li><li>message: </li></ul><pre class="language-javascript"><code class="lang-javascript">  if (msgType == "webchat") {
    message = msg.content;
  }
  if (msgType == "chat.photo") {
    message = msg.content.params.hd || msg.href;
  }
  if (msgType === "share.file") {
    message = msg.title;
  }
</code></pre></td></tr></tbody></table>

2. Response

{% tabs %}
{% tab title="200" %}

```json
{
    "data": {
        "error_message": "Successful.",
        "data": {
            "editorId": "39456257143545255", // id người ghim
            "emoji": "📌",
            "createTime": 1726557330681,
            "creatorId": "39456257143545255", // id người ghim
            "editTime": 1726557330681,
            "id": "552680637", // id ghim
            "params": "{\"senderUid\":\"39456257143545255\",\"senderName\":\"Saint Laurent\",\"client_msg_id\":\"1726471613254\",\"global_msg_id\":\"5836005608509\",\"msg_type\":1,\"title\":\"https://b-f50-zpg-r.zdn.vn/25075273188988217/082f646d6034c66a9f25.jpg\"}" // chi tiết tin nhắn ghim
        },
        "error_code": 0
    },
    "status": "success"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "status": "error",
    "error": {
        "message": "Something wrong was happened.",
        "code": null,
        "prms": null
    }
}
```

{% endtab %}
{% endtabs %}
