Reputation: 1219
I have been doing some work with the slack API recently, and it doesn't seem obvious how to pin a message using the Slack API, I see you can updated an existing message, so it doesn't seem like it is a limitation to get a hold of a message and do something with it.
Am I missing something obvious here or is there now API call to pin a message in a channel?
Upvotes: 3
Views: 2773
Reputation: 32854
It is now possible to pin messages using the Slack API. The Slack team has obviously added this functionality in the meantime.
You can now use: pins.add
to pin a message or uploaded files to a channel
See here for the documentation.
Upvotes: 5
Reputation: 4537
Neither chat.update
nor chat.postMessage
support pinning messages or adding new ones with pins.
In two different pin-related APIs you can find the following note:
The format of this message is still unstable and we expect to make changes to it in the future. Until the pinning APIs are released clients should ignore this event.
So unfortunately it looks like this can't be done currently, but a pinning API is in the works.
Upvotes: 1