Skip to content
gist.link ↗

createDoc

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

Create a doc in a team. Any team member.

teams:mutation:createDoc

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 {
createDoc(teamId: Int!, input: CreateDocInput!): Doc!
}
Argument Type Required Description
teamId Int! Yes —
input CreateDocInput! Yes —

Doc! — 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 CreateDoc($teamId: Int!, $input: CreateDocInput!) { createDoc(teamId: $teamId, input: $input) { id title created_at updated_at } }",
"variables": {
"teamId": 10,
"input": {
"title": "Example"
}
}
}
JSON