Skip to content
gist.link ↗

createChatAttachmentUpload

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

Presigned upload ticket for a chat attachment (≤25 MB). The browser PUTs the raw file to uploadUrl with the returned headers, then calls finalizeChatAttachment. Files live in Drive’s managed “teams” folder.

teams:mutation:createChatAttachmentUpload

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 {
createChatAttachmentUpload(filename: String!, contentType: String, sizeBytes: Int): AttachmentUploadTicket!
}
Argument Type Required Description
filename String! Yes —
contentType String No —
sizeBytes Int No —

AttachmentUploadTicket! — 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 CreateChatAttachmentUpload($filename: String!, $contentType: String, $sizeBytes: Int) { createChatAttachmentUpload(filename: $filename, contentType: $contentType, sizeBytes: $sizeBytes) { nodeId uploadUrl headers } }",
"variables": {
"filename": "Example",
"contentType": "example",
"sizeBytes": 10
}
}
JSON