From 46dba713e84301cbc09bf9ea27880447e53d67b7 Mon Sep 17 00:00:00 2001 From: "mintlify-development[bot]" <109878554+mintlify-development[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 21:59:54 +0000 Subject: [PATCH] Add currentPath parameter to assistant API endpoints Generated-By: mintlify-agent --- api/assistant/create-assistant-message-v2.mdx | 1 + api/assistant/create-assistant-message.mdx | 1 + discovery-openapi.json | 41 +++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/api/assistant/create-assistant-message-v2.mdx b/api/assistant/create-assistant-message-v2.mdx index 06c7bf7a2..dab5c320c 100644 --- a/api/assistant/create-assistant-message-v2.mdx +++ b/api/assistant/create-assistant-message-v2.mdx @@ -101,6 +101,7 @@ function MyComponent({ domain }) { - `value` - The code snippet or selected text content. - `path` (optional) - Path to the source file or page. - `elementId` (optional) - Identifier for the UI element containing the context. +- `body.currentPath` - The path of the page the user is currently viewing. When provided, the assistant uses this context to provide more relevant answers. Maximum length: 200 characters. diff --git a/api/assistant/create-assistant-message.mdx b/api/assistant/create-assistant-message.mdx index d679dd584..e0970a5a4 100644 --- a/api/assistant/create-assistant-message.mdx +++ b/api/assistant/create-assistant-message.mdx @@ -75,6 +75,7 @@ function MyComponent({ domain }) { - `type` - Either `'code'` or `'textSelection'`. - `value` - The code snippet or selected text content. - `elementId` (optional) - Identifier for the UI element containing the context. +- `body.currentPath` - The path of the page the user is currently viewing. When provided, the assistant uses this context to provide more relevant answers. Maximum length: 200 characters. diff --git a/discovery-openapi.json b/discovery-openapi.json index 0dd00212b..c56cf7e65 100644 --- a/discovery-openapi.json +++ b/discovery-openapi.json @@ -394,6 +394,43 @@ } }, "description": "Optional filter criteria for the search." + }, + "context": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "code", + "textSelection" + ], + "description": "The type of context being provided." + }, + "value": { + "type": "string", + "description": "The code snippet or selected text content." + }, + "path": { + "type": "string", + "description": "Optional path to the source file or page." + }, + "elementId": { + "type": "string", + "description": "Optional identifier for the UI element containing the context." + } + }, + "required": [ + "type", + "value" + ] + }, + "description": "Optional array of contextual information to provide to the assistant." + }, + "currentPath": { + "type": "string", + "description": "The path of the page the user is currently viewing. When provided, the assistant uses this context to provide more relevant answers. Maximum length: 200 characters." } } } @@ -678,6 +715,10 @@ ] }, "description": "Optional array of contextual information to provide to the assistant." + }, + "currentPath": { + "type": "string", + "description": "The path of the page the user is currently viewing. When provided, the assistant uses this context to provide more relevant answers. Maximum length: 200 characters." } } }