Skip to content
gist.link ↗

addComment

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

Add a comment (reply) to a post. Any team member.

teams:mutation:addComment

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 {
addComment(postId: Int!, body: String!): Comment!
}
Argument Type Required Description
postId Int! Yes —
body String! Yes —

Comment! — 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 AddComment($postId: Int!, $body: String!) { addComment(postId: $postId, body: $body) { id post_id body created_at } }",
"variables": {
"postId": 10,
"body": "example"
}
}
JSON