Skip to content
gist.link ↗

createConversation

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

Start a DM or group DM. 1:1 conversations are deduplicated — messaging the same person again returns the existing conversation. The caller is always a member; title only applies to group conversations.

teams:mutation:createConversation

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 {
createConversation(members: [ConversationMemberInput!]!, title: String): Conversation!
}
Argument Type Required Description
members [ConversationMemberInput!]! Yes —
title String No —

Conversation! — 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 CreateConversation($members: [ConversationMemberInput!]!, $title: String) { createConversation(members: $members, title: $title) { id title created_at } }",
"variables": {
"members": [
{
"authUserId": "example",
"displayName": "Example",
"email": "ada@example.com"
}
],
"title": "Example"
}
}
JSON