Skip to content
gist.link ↗

pinPost

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

Pin/unpin a post at the top of its channel. Any team member.

teams:mutation:pinPost

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 {
pinPost(id: Int!, pinned: Boolean!): Post!
}
Argument Type Required Description
id Int! Yes —
pinned Boolean! Yes —

Post! — 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 PinPost($id: Int!, $pinned: Boolean!) { pinPost(id: $id, pinned: $pinned) { id channel_id body pinned edited_at created_at comment_count } }",
"variables": {
"id": 10,
"pinned": true
}
}
JSON