Skip to main content

copilotSessionHistory

Requires permission catalog:copilot:chat.

The caller's OWN chat history, one page at a time: pinned first, then most recent. search matches titles and message text; status: ARCHIVED is the archived view. Org + user scoped.

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:

query CopilotSessionHistory {
copilotSessionHistory {
endCursor
hasNextPage
items {
id
title
status
createdAt
awaitingApprovalCount
lastMessageAt
}
}
}

Response:

{
"data": {
"copilotSessionHistory": {
"endCursor": "string",
"hasNextPage": true,
"items": [
{
"id": "id",
"title": "string",
"status": "string",
"createdAt": 0,
"awaitingApprovalCount": 0,
"lastMessageAt": 0
}
]
}
}
}
copilotSessionHistory(
after: String
awaitingApproval: Boolean
first: Int = 20
search: String
status: String
): CopilotSessionHistoryPage!

Arguments​

copilotSessionHistory.after ● String scalar​

Cursor from the previous page's last item. Omit for the first page.

copilotSessionHistory.awaitingApproval ● Boolean scalar​

True: only chats holding a proposal card that still waits for your decision — including cards a connected app (MCP) proposed.

copilotSessionHistory.first ● Int scalar​

The number of items to return.

Text to search for.

copilotSessionHistory.status ● String scalar​

ACTIVE (default) or ARCHIVED.

Type​

CopilotSessionHistoryPage object​

One page of the caller's own chat history — pinned first, then most recent.