Skip to content
gist.link ↗

sendMessage

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

Send a chat message. Provide exactly one of channelId (team member only) or conversationId (conversation member only). parentId threads one level deep.

teams:mutation:sendMessage

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 {
sendMessage(input: SendMessageInput!): Message!
}
Argument Type Required Description
input SendMessageInput! 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 SendMessage($input: SendMessageInput!) { sendMessage(input: $input) { id channel_id conversation_id parent_id author_user_id author_name body pinned_at } }",
"variables": {
"input": {
"body": "example"
}
}
}
JSON