Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api-reference/assistant/search.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: "POST /search/{domain}"
---
11 changes: 6 additions & 5 deletions api-reference/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,24 @@ The Mintlify REST API enables you to programmatically interact with your documen

## Endpoints

- [Trigger Update](/api-reference/update/trigger): Trigger an update of your site when desired.
- [Get Update Status](/api-reference/update/status): Get the status of an update and other details about your docs.
- [Generate Assistant Message](/api-reference/chat/create-assistant-message): Embed the assistant, trained on your docs, into any application of your choosing.
- [Trigger update](/api-reference/update/trigger): Trigger an update of your site when desired.
- [Get update status](/api-reference/update/status): Get the status of an update and other details about your docs.
- [Generate assistant message](/api-reference/assistant/create-assistant-message): Embed the assistant, trained on your docs, into any application of your choosing.
- [Search documentation](/api-reference/assistant/search): Search through your documentation.

## Authentication

You can generate an API key through [the dashboard](https://dashboard.mintlify.com/settings/organization/api-keys). API keys are associated with an entire organization and can be used across multiple deployments.

### Admin API key

The admin API key is used for the majority of the API. It is used to trigger updates and get update status.
The admin API key is used for the [Trigger update](/api-reference/update/trigger) and [Get update status](/api-reference/update/status) endpoints.

Admin API keys begin with the `mint_` prefix. Keep your admin API keys secret.

### Assistant API key

The assistant API key is used for generating assistant chat messages through the API. Responses include citations so you can point your users to the right destinations for more information.
The assistant API key is used for the [Generate assistant message](/api-reference/assistant/create-assistant-message) and [Search documentation](/api-reference/assistant/search) endpoints.

Assistant API keys begin with the `mint_dsc_` prefix.

Expand Down
87 changes: 86 additions & 1 deletion discovery-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"x-mcp": {
"enabled": true
},
"summary": "Generate Assistant Message",
"summary": "Generate assistant message",
"description": "Generates a response message from the assistant for the specified domain. For best results, use the [useChat hook from ai-sdk](https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-chat#usechat) to send requests and handle responses. You can set `fp`, `threadId`, and `filter` in the `body` field of the options parameter passed to the hook.",
"parameters": [
{
Expand Down Expand Up @@ -498,6 +498,91 @@
}
}
}
},
"/search/{domain}": {
"post": {
"x-mcp": {
"enabled": true
},
"summary": "Search documentation",
"description": "Perform semantic and keyword searches across your documentation with configurable filtering and pagination.",
"parameters": [
{
"name": "domain",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The domain identifier from your `domain.mintlify.app` URL. Can be found in the top left of your dashboard."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["query"],
"properties": {
"query": {
"type": "string",
"description": "The search query to execute against your documentation content."
},
"pageSize": {
"type": "number",
"default": 10,
"description": "Number of search results to return. Defaults to 10 if not specified."
},
"filter": {
"type": "object",
"description": "Optional filtering parameters to narrow search results.",
"properties": {
"version": {
"type": "string",
"description": "Filter results by documentation version."
},
"language": {
"type": "string",
"description": "Filter results by content language."
}
}
Comment on lines +537 to +549
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should've specified better in my PR, this filter type should match the filter in the create-assistant-message route.

https://mintlify.com/docs/api-reference/chat/create-assistant-message#body-filter

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, just looked at this again, I'm json blind. All good!

}
}
}
}
}
},
"responses": {
"200": {
"description": "Search results",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "The matching content from your documentation."
},
"path": {
"type": "string",
"description": "The path or URL to the source document."
},
"metadata": {
"type": "object",
"description": "Additional metadata about the search result, including relevance scoring and other contextual information."
}
}
}
}
}
}
}
}
}
}
},
"components": {
Expand Down
7 changes: 6 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@
{
"group": "Assistant",
"pages": [
"api-reference/chat/create-assistant-message"
"api-reference/assistant/create-assistant-message",
"api-reference/assistant/search"
]
}
]
Expand Down Expand Up @@ -500,6 +501,10 @@
{
"source": "ai-ingestion",
"destination": "ai/llmstxt"
},
{
"source": "api-reference/chat/*",
"destination": "api-reference/assistant/*"
}
],
"integrations": {
Expand Down
4 changes: 2 additions & 2 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"paths": {
"/project/update/{projectId}": {
"post": {
"summary": "Trigger Update",
"summary": "Trigger update",
"description": "Trigger an update after updating your OpenAPI document by calling this endpoint in a CI check",
"parameters": [
{
Expand Down Expand Up @@ -56,7 +56,7 @@
},
"/project/update-status/{statusId}": {
"get": {
"summary": "Get Update Status",
"summary": "Get update status",
"description": "Get the status of an update from the status ID",
"parameters": [
{
Expand Down