createCopilotSession
Requires permission catalog:copilot:chat.
Starts a new copilot chat for the signed-in user. Limited to 20 requests a minute. Needs the catalog copilot feature on the plan and permission to chat with the copilot.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation CreateCopilotSession {
createCopilotSession {
id
title
status
createdAt
activeRunId
hasIr
messages {
id
createdAt
cardIds
feedback
role
text
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CreateCopilotSession {\n createCopilotSession {\n id\n title\n status\n createdAt\n activeRunId\n hasIr\n messages {\n id\n createdAt\n cardIds\n feedback\n role\n text\n }\n }\n}"
}
EOF
Response:
{
"data": {
"createCopilotSession": {
"id": "id",
"title": "string",
"status": "string",
"createdAt": 0,
"activeRunId": "string",
"hasIr": true,
"messages": [
{
"id": "id",
"createdAt": 0,
"cardIds": [
"string"
],
"feedback": {},
"role": "string",
"text": "string"
}
]
}
}
}
createCopilotSession: CopilotSession!
Type
CopilotSession object
A copilot conversation.