Pin/unpin a dialog
 Method schema is available as of layer 76. Switch ยป
| Name | Type | Description | 
|---|---|---|
| flags | # | Flags, see TL conditional fields | 
| pinned | flags.0?true | Whether to pin or unpin the dialog | 
| peer | InputDialogPeer | The dialog to pin | 
| Code | Type | Description | 
|---|---|---|
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. | 
| 400 | PEER_HISTORY_EMPTY | You can't pin an empty chat with a user. | 
| 400 | PEER_ID_INVALID | The provided peer id is invalid. | 
| 400 | PINNED_DIALOGS_TOO_MUCH | Too many pinned dialogs. |