Skip to content
gist.link ↗

pinMessage

Mutation Teams API — POST https://teams.api.gist.link/graphql

Pin a channel message (any team member). Channel messages only.

teams:mutation:pinMessage

The calling IAM key must hold this permission (or a wildcard that covers it: teams:mutation:* or teams:*) and the access token must have been minted with audience=teams. See Permissions.

type Mutation {
pinMessage(id: Int!): Message!
}
Argument Type Required Description
id Int! Yes —

Message! — see the Teams types reference.

Terminal window
curl https://teams.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation PinMessage($id: Int!) { pinMessage(id: $id) { id channel_id conversation_id parent_id author_user_id author_name body pinned_at } }",
"variables": {
"id": 10
}
}
JSON