# Starleads api docs ## Docs - [Connect a knowledge base chat to an agent](https://docs.starleads.co/api-reference/agent/connect-a-knowledge-base-chat-to-an-agent.md): Connects a knowledge base chat to an agent. Each agent can have at most one chat connected at a time. The agent and chat must belong to the same company as the API key used for authentication. - [Detach the chat from an agent](https://docs.starleads.co/api-reference/agent/detach-the-chat-from-an-agent.md): Detaches the currently connected knowledge base chat from an agent. The chat itself is not deleted. The agent must belong to the same company as the API key used for authentication. - [Get the chat connected to an agent](https://docs.starleads.co/api-reference/agent/get-the-chat-connected-to-an-agent.md): Retrieves the knowledge base chat currently connected to an agent. Returns 204 No Content if no chat is connected. The agent must belong to the same company as the API key used for authentication. - [Get the prompt of an agent](https://docs.starleads.co/api-reference/agent/get-the-prompt-of-an-agent.md): Retrieves the current prompt configured for an agent. The agent must belong to the same company as the API key used for authentication. - [Update the prompt of an agent](https://docs.starleads.co/api-reference/agent/update-the-prompt-of-an-agent.md): Replaces the current prompt of an agent with a new value. The agent must belong to the same company as the API key used for authentication. The prompt must not be empty and cannot exceed 50,000 characters. - [Create a campaign](https://docs.starleads.co/api-reference/campaign/create-a-campaign.md): Creates a new campaign associated with an AI agent. The campaign is created in an inactive state (`isActive: false`). A phone number is required when the agent's channel is `Phone`. Default values are applied for optional fields not provided. - [Get all campaigns](https://docs.starleads.co/api-reference/campaign/get-all-campaigns.md) - [Get campaign's fields](https://docs.starleads.co/api-reference/campaignfield/get-campaigns-fields.md) - [Add a new campaign item to a campaign](https://docs.starleads.co/api-reference/campaignitem/add-a-new-campaign-item-to-a-campaign.md) - [Add multiple items to a campaign](https://docs.starleads.co/api-reference/campaignitem/add-multiple-items-to-a-campaign.md): Allows adding multiple items to a specific campaign identified by `campaignId`. Authentication is required using an API key passed in the `X-Api-Key` header. You can retrieve your API key from your profile when logged in to [Starleads](https://app.starleads.co/). - [Delete an item from a campaign](https://docs.starleads.co/api-reference/campaignitem/delete-an-item-from-a-campaign.md) - [Get all items by phone number](https://docs.starleads.co/api-reference/campaignitem/get-all-items-by-phone-number.md) - [Get campaign items with filters](https://docs.starleads.co/api-reference/campaignitem/get-campaign-items-with-filters.md): Retrieves campaign items with optional filters including status, archived state, and pagination. - [Create a dataset](https://docs.starleads.co/api-reference/dataset/create-a-dataset.md): Creates a new dataset for storing and organizing documents used by the RAG (Retrieval-Augmented Generation) knowledge base. - [Delete a dataset](https://docs.starleads.co/api-reference/dataset/delete-a-dataset.md): Deletes a dataset and cascades: detaches it from all linked chats. - [Get a dataset](https://docs.starleads.co/api-reference/dataset/get-a-dataset.md): Retrieves the details of a specific dataset by its identifier. - [List datasets](https://docs.starleads.co/api-reference/dataset/list-datasets.md): Retrieves a paginated list of datasets belonging to the authenticated company. - [Update a dataset](https://docs.starleads.co/api-reference/dataset/update-a-dataset.md): Partially updates a dataset. Only the provided fields are updated; omitted fields remain unchanged. - [Delete a document](https://docs.starleads.co/api-reference/document/delete-a-document.md): Deletes a document from a dataset. - [Download a document file](https://docs.starleads.co/api-reference/document/download-a-document-file.md): Downloads the original file of a document. The response is the binary file stream with appropriate Content-Type and Content-Disposition headers. - [List documents in a dataset](https://docs.starleads.co/api-reference/document/list-documents-in-a-dataset.md): Retrieves a paginated list of documents in a dataset, with optional keyword search and status filter. - [Stop document parsing](https://docs.starleads.co/api-reference/document/stop-document-parsing.md): Stops parsing on one or more selected documents within a dataset. - [Trigger document parsing](https://docs.starleads.co/api-reference/document/trigger-document-parsing.md): Triggers parsing on one or more selected documents within a dataset. Documents must not already be in a parsing state. - [Update a document](https://docs.starleads.co/api-reference/document/update-a-document.md): Updates document metadata such as name, chunking method, parser configuration, and enabled status. - [Upload documents to a dataset](https://docs.starleads.co/api-reference/document/upload-documents-to-a-dataset.md): Uploads one or more documents to a dataset. Accepts 1 to 10 files, each with a maximum size of 5 MB. - [Create a knowledge base chat](https://docs.starleads.co/api-reference/knowledgebasechat/create-a-knowledge-base-chat.md): Creates a new knowledge base chat linked to one or more datasets. The chat can be configured with custom LLM and prompt settings. The model name field is not exposed; it is managed internally. - [Delete a knowledge base chat](https://docs.starleads.co/api-reference/knowledgebasechat/delete-a-knowledge-base-chat.md): Deletes a knowledge base chat and cascades: detaches it from all connected agents. - [Get a knowledge base chat](https://docs.starleads.co/api-reference/knowledgebasechat/get-a-knowledge-base-chat.md): Retrieves the details of a specific knowledge base chat. LLM model name is excluded from the response. - [List knowledge base chats](https://docs.starleads.co/api-reference/knowledgebasechat/list-knowledge-base-chats.md): Retrieves a paginated list of knowledge base chats belonging to the authenticated company. LLM model names are excluded from the response. - [Update a knowledge base chat](https://docs.starleads.co/api-reference/knowledgebasechat/update-a-knowledge-base-chat.md): Partially updates a knowledge base chat. Only the provided fields are updated; omitted fields remain unchanged. The model name field is not accepted. - [Delete the knowledge graph](https://docs.starleads.co/api-reference/knowledgegraph/delete-the-knowledge-graph.md): Deletes the knowledge graph associated with a dataset. - [Enable knowledge graph on a dataset](https://docs.starleads.co/api-reference/knowledgegraph/enable-knowledge-graph-on-a-dataset.md): Enables the knowledge graph feature on a dataset. This is available only on the Business plan. Optionally specify entity types to extract. - [Get knowledge graph build status](https://docs.starleads.co/api-reference/knowledgegraph/get-knowledge-graph-build-status.md): Retrieves the current build status of the knowledge graph for a dataset. - [Get the knowledge graph](https://docs.starleads.co/api-reference/knowledgegraph/get-the-knowledge-graph.md): Retrieves the knowledge graph data for a dataset. Returns 204 No Content if no knowledge graph exists. - [Trigger knowledge graph construction](https://docs.starleads.co/api-reference/knowledgegraph/trigger-knowledge-graph-construction.md): Triggers an asynchronous knowledge graph construction on a dataset. The knowledge graph must be enabled first. - [Authentication](https://docs.starleads.co/documentation/authentification.md): Learn how to authenticate your API requests using your API key. - [Welcome to Starleads](https://docs.starleads.co/documentation/get-started.md): Conversational AI platform — phone, web-widget, SMS & WhatsApp. Integrate with our API to manage campaigns, prospects, and receive results in real-time. - [Knowledge Base (RAG)](https://docs.starleads.co/documentation/rag-knowledge-base.md): Build and manage AI-powered knowledge bases. Create datasets, upload documents, configure chat assistants, and connect them to your voice agents. - [Receive Conversation Results](https://docs.starleads.co/documentation/receive-conversation-results.md): Get your agents' conversation results in real-time via webhooks. ## OpenAPI Specs - [openapi](https://docs.starleads.co/api-reference/openapi.json)