Sanity Library Reference Docs
    Preparing search index...

    This file was auto-generated by openapi-typescript. Do not make direct changes to the file.

    interface paths {
        "/{apiVersion}/context/knowledge-bases": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string };
                    query: {
                        cursor?: string;
                        includeDrafts?: "true" | "false";
                        limit?: number;
                        organizationId: string;
                    };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                data: {
                                    activeJobId: string
                                    | null;
                                    buildRestriction: { code: string; message: string } | null;
                                    buildStageState: { jobId: string; stages: (...)[] } | null;
                                    createdAt: string;
                                    createdBy: { displayName: (...) | (...); id: (...) | (...) } | null;
                                    description: string;
                                    excludedSourceChunks: number;
                                    hasDatasetSource: boolean;
                                    hasFileSource: boolean;
                                    hasPendingChanges: boolean;
                                    hasWebSource: boolean;
                                    id: string;
                                    instructionCount: number;
                                    isBuilding: boolean;
                                    lastChangedAt: string | null;
                                    lastCheckedAt: string | null;
                                    openIssueCount: number;
                                    organizationId: string;
                                    pendingChanges:
                                        | { added: number; changed: number; removed: number }
                                        | null;
                                    pipelineOutdated: boolean;
                                    publicId: string;
                                    rebuildRecommended: { at: string; reason: string } | null;
                                    refreshInFlight: boolean;
                                    sourceChunks: number;
                                    sourceUsage: { used: number } | null;
                                    state: "draft" | "created" | "ready";
                                    title: string;
                                    updatedAt: string;
                                }[];
                                nextCursor: string
                                | null;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: { "Idempotency-Key"?: string };
                    path: { apiVersion: string };
                    query?: undefined;
                };
                requestBody: {
                    content: {
                        "application/json": {
                            description?: string;
                            draft?: boolean;
                            organizationId: string;
                            title?: string;
                        };
                    };
                };
                responses: {
                    "201": {
                        content: {
                            "application/json": {
                                activeJobId: string
                                | null;
                                buildRestriction: { code: string; message: string } | null;
                                buildStageState:
                                    | {
                                        jobId: string;
                                        stages: {
                                            id: string;
                                            status: (...)
                                            | (...)
                                            | (...)
                                            | (...);
                                            units?: (...) | (...);
                                            weight: number;
                                        }[];
                                    }
                                    | null;
                                createdAt: string;
                                createdBy: { displayName: string | null; id: string | null }
                                | null;
                                description: string;
                                excludedSourceChunks: number;
                                hasDatasetSource: boolean;
                                hasFileSource: boolean;
                                hasPendingChanges: boolean;
                                hasWebSource: boolean;
                                id: string;
                                instructionCount: number;
                                isBuilding: boolean;
                                lastChangedAt: string | null;
                                lastCheckedAt: string | null;
                                openIssueCount: number;
                                organizationId: string;
                                pendingChanges:
                                    | { added: number; changed: number; removed: number }
                                    | null;
                                pipelineOutdated: boolean;
                                publicId: string;
                                rebuildRecommended: { at: string; reason: string } | null;
                                refreshInFlight: boolean;
                                sourceChunks: number;
                                sourceUsage: { used: number } | null;
                                state: "draft" | "created" | "ready";
                                title: string;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}": {
            delete: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "204": {
                        content: { "application/json": null };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                activeJobId: string
                                | null;
                                buildRestriction: { code: string; message: string } | null;
                                buildStageState:
                                    | {
                                        jobId: string;
                                        stages: {
                                            id: string;
                                            status: (...)
                                            | (...)
                                            | (...)
                                            | (...);
                                            units?: (...) | (...);
                                            weight: number;
                                        }[];
                                    }
                                    | null;
                                createdAt: string;
                                createdBy: { displayName: string | null; id: string | null }
                                | null;
                                description: string;
                                excludedSourceChunks: number;
                                hasDatasetSource: boolean;
                                hasFileSource: boolean;
                                hasPendingChanges: boolean;
                                hasWebSource: boolean;
                                id: string;
                                instructionCount: number;
                                isBuilding: boolean;
                                lastChangedAt: string | null;
                                lastCheckedAt: string | null;
                                openIssueCount: number;
                                organizationId: string;
                                pendingChanges:
                                    | { added: number; changed: number; removed: number }
                                    | null;
                                pipelineOutdated: boolean;
                                publicId: string;
                                rebuildRecommended: { at: string; reason: string } | null;
                                refreshInFlight: boolean;
                                sourceChunks: number;
                                sourceUsage: { used: number } | null;
                                state: "draft" | "created" | "ready";
                                title: string;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody: {
                    content: {
                        "application/json": {
                            description?: string;
                            draft?: false;
                            title?: string;
                        };
                    };
                };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                activeJobId: string
                                | null;
                                buildRestriction: { code: string; message: string } | null;
                                buildStageState:
                                    | {
                                        jobId: string;
                                        stages: {
                                            id: string;
                                            status: (...)
                                            | (...)
                                            | (...)
                                            | (...);
                                            units?: (...) | (...);
                                            weight: number;
                                        }[];
                                    }
                                    | null;
                                createdAt: string;
                                createdBy: { displayName: string | null; id: string | null }
                                | null;
                                description: string;
                                excludedSourceChunks: number;
                                hasDatasetSource: boolean;
                                hasFileSource: boolean;
                                hasPendingChanges: boolean;
                                hasWebSource: boolean;
                                id: string;
                                instructionCount: number;
                                isBuilding: boolean;
                                lastChangedAt: string | null;
                                lastCheckedAt: string | null;
                                openIssueCount: number;
                                organizationId: string;
                                pendingChanges:
                                    | { added: number; changed: number; removed: number }
                                    | null;
                                pipelineOutdated: boolean;
                                publicId: string;
                                rebuildRecommended: { at: string; reason: string } | null;
                                refreshInFlight: boolean;
                                sourceChunks: number;
                                sourceUsage: { used: number } | null;
                                state: "draft" | "created" | "ready";
                                title: string;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/build": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: { "Idempotency-Key"?: string };
                    path: { apiVersion: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "202": {
                        content: { "application/json": { jobId: string } };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/build/cancel": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: { "application/json": { cancelled: boolean } };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/documents": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string };
                    query?: {
                        cursor?: string;
                        ids?: string;
                        limit?: number;
                        source?: string;
                        state?: "active" | "missing" | "deleted";
                    };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                data: {
                                    conversion: | "pending"
                                    | "failed"
                                    | "converted"
                                    | "unsupported"
                                    | "oversized";
                                    conversionError: string
                                    | null;
                                    createdAt: string;
                                    documentUpdatedAt: string | null;
                                    excludedAt: string | null;
                                    externalId: string;
                                    id: string;
                                    lastSeenAt: string;
                                    mime: string | null;
                                    sizeBytes: number | null;
                                    sourceId: string;
                                    sourceType: "files" | "web" | "sanity-dataset";
                                    state: "active" | "missing" | "deleted";
                                    title: string;
                                    updatedAt: string;
                                    url: string | null;
                                }[];
                                nextCursor: string
                                | null;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/documents/{documentId}": {
            delete: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        documentId: string;
                        knowledgeBaseId: string;
                    };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "204": {
                        content: { "application/json": null };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        documentId: string;
                        knowledgeBaseId: string;
                    };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                chunks: {
                                    headingPath: string[];
                                    id: string;
                                    lineEnd: number;
                                    lineStart: number;
                                }[];
                                conversion: | "pending"
                                | "failed"
                                | "converted"
                                | "unsupported"
                                | "oversized";
                                conversionError: string
                                | null;
                                createdAt: string;
                                documentUpdatedAt: string | null;
                                excludedAt: string | null;
                                externalId: string;
                                id: string;
                                lastSeenAt: string;
                                mime: string | null;
                                sizeBytes: number | null;
                                sourceId: string;
                                sourceType: "files" | "web" | "sanity-dataset";
                                state: "active" | "missing" | "deleted";
                                title: string;
                                updatedAt: string;
                                url: string | null;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        documentId: string;
                        knowledgeBaseId: string;
                    };
                    query?: undefined;
                };
                requestBody: { content: { "application/json": { state: "active" } } };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                conversion:
                                    | "pending"
                                    | "failed"
                                    | "converted"
                                    | "unsupported"
                                    | "oversized";
                                conversionError: string
                                | null;
                                createdAt: string;
                                documentUpdatedAt: string | null;
                                excludedAt: string | null;
                                externalId: string;
                                id: string;
                                lastSeenAt: string;
                                mime: string | null;
                                sizeBytes: number | null;
                                sourceId: string;
                                sourceType: "files" | "web" | "sanity-dataset";
                                state: "active" | "missing" | "deleted";
                                title: string;
                                updatedAt: string;
                                url: string | null;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/documents/{documentId}/content": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        documentId: string;
                        knowledgeBaseId: string;
                    };
                    query?: {
                        chunk?: string;
                        format?: "json"
                        | "raw"
                        | "markdown"
                        | "plain";
                        lines?: string;
                    };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                chunkId: string
                                | null;
                                content: string;
                                documentId: string;
                                slice: { end: number; start: number };
                                totalLines: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/entries/{entryPath}/rebuild": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; entryPath: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "202": {
                        content: {
                            "application/json": {
                                affectedEntries: { id: string; path: string; title: string }[];
                                jobId: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/instructions": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody: {
                    content: {
                        "application/json": {
                            rebuildPaths?: string[];
                            scopeDocumentIds: string[];
                            statement: string;
                            verified?: boolean;
                        };
                    };
                };
                responses: {
                    "201": {
                        content: {
                            "application/json": {
                                instruction: {
                                    archivedAt: string
                                    | null;
                                    archivedReason: string | null;
                                    createdAt: string;
                                    createdBy: { displayName: string | null; id: string | null } | null;
                                    id: string;
                                    knowledgeBaseId: string;
                                    origin: "conflict" | "human";
                                    scopeDocumentIds: string[];
                                    sourceIssueId: string | null;
                                    statement: string;
                                    status: "active" | "archived";
                                    updatedAt: string | null;
                                    updatedBy: { displayName: string | null; id: string | null } | null;
                                };
                                rebuildJobId: string
                                | null;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/instructions/{instructionId}": {
            delete: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        instructionId: string;
                        knowledgeBaseId: string;
                    };
                    query?: { rebuild?: "true"
                    | "false" };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: { "application/json": { rebuildJobId: string
                        | null } };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        instructionId: string;
                        knowledgeBaseId: string;
                    };
                    query?: undefined;
                };
                requestBody: {
                    content: {
                        "application/json": {
                            scopeDocumentIds?: string[];
                            statement?: string;
                        };
                    };
                };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                archivedAt: string
                                | null;
                                archivedReason: string | null;
                                createdAt: string;
                                createdBy: { displayName: string | null; id: string | null } | null;
                                id: string;
                                knowledgeBaseId: string;
                                origin: "conflict" | "human";
                                scopeDocumentIds: string[];
                                sourceIssueId: string | null;
                                statement: string;
                                status: "active" | "archived";
                                updatedAt: string | null;
                                updatedBy: { displayName: string | null; id: string | null } | null;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/dismiss": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                content: | {
                                    claimKey: string;
                                    context?: string;
                                    issue: string;
                                    kind: "conflict";
                                    scopePath: string;
                                    severity: "critical"
                                    | "suggestion";
                                    sides: {
                                        authority?: (...) | (...) | (...) | (...);
                                        citations?: (...) | (...);
                                        claim: string;
                                        documentIds?: (...) | (...);
                                        entryPaths?: (...) | (...);
                                        value?: (...) | (...);
                                        where?: (...) | (...);
                                    }[];
                                    suggested?: number;
                                    suggestedFix: string;
                                }
                                | {
                                    citedDocumentIds?: string[];
                                    claimKey?: string;
                                    involvedScopes?: string[];
                                    issue: string;
                                    kind: "update_required";
                                    scopePath: string;
                                    severity: "critical"
                                    | "suggestion";
                                    suggestedFix: string;
                                };
                                createdAt: string;
                                id: string;
                                knowledgeBaseId: string;
                                resolution: number
                                | null;
                                resolvedAt: string | null;
                                resolvedBy: { id: string; kind: "user" | "robot" } | null;
                                status: "open" | "accepted" | "rejected";
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/reopen": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                content: | {
                                    claimKey: string;
                                    context?: string;
                                    issue: string;
                                    kind: "conflict";
                                    scopePath: string;
                                    severity: "critical"
                                    | "suggestion";
                                    sides: {
                                        authority?: (...) | (...) | (...) | (...);
                                        citations?: (...) | (...);
                                        claim: string;
                                        documentIds?: (...) | (...);
                                        entryPaths?: (...) | (...);
                                        value?: (...) | (...);
                                        where?: (...) | (...);
                                    }[];
                                    suggested?: number;
                                    suggestedFix: string;
                                }
                                | {
                                    citedDocumentIds?: string[];
                                    claimKey?: string;
                                    involvedScopes?: string[];
                                    issue: string;
                                    kind: "update_required";
                                    scopePath: string;
                                    severity: "critical"
                                    | "suggestion";
                                    suggestedFix: string;
                                };
                                createdAt: string;
                                id: string;
                                knowledgeBaseId: string;
                                resolution: number
                                | null;
                                resolvedAt: string | null;
                                resolvedBy: { id: string; kind: "user" | "robot" } | null;
                                status: "open" | "accepted" | "rejected";
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/resolve": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody: { content: { "application/json": { resolution: number } } };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                issue: {
                                    content:
                                        | {
                                            claimKey: string;
                                            context?: string;
                                            issue: string;
                                            kind: "conflict";
                                            scopePath: string;
                                            severity: "critical"
                                            | "suggestion";
                                            sides: {
                                                authority?: ...;
                                                citations?: ...;
                                                claim: ...;
                                                documentIds?: ...;
                                                entryPaths?: ...;
                                                value?: ...;
                                                where?: ...;
                                            }[];
                                            suggested?: number;
                                            suggestedFix: string;
                                        }
                                        | {
                                            citedDocumentIds?: (...)[];
                                            claimKey?: string;
                                            involvedScopes?: (...)[];
                                            issue: string;
                                            kind: "update_required";
                                            scopePath: string;
                                            severity: "critical" | "suggestion";
                                            suggestedFix: string;
                                        };
                                    createdAt: string;
                                    id: string;
                                    knowledgeBaseId: string;
                                    resolution: number
                                    | null;
                                    resolvedAt: string | null;
                                    resolvedBy: { id: string; kind: "user" | "robot" } | null;
                                    status: "open" | "accepted" | "rejected";
                                };
                                jobId: string
                                | null;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/apply": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody: { content: { "application/json": { issueIds: string[] } } };
                responses: {
                    "202": {
                        content: { "application/json": { jobId: string } };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/jobs/{jobId}": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; jobId: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": | {
                                completedAt: string
                                | null;
                                error?: string | null;
                                id: string;
                                kind: "build";
                                knowledgeBaseId: string;
                                result?: {
                                    criticalIssueCount: number;
                                    entryCount: number;
                                    issuesCreated: number;
                                    revisionId: string;
                                };
                                startedAt: string
                                | null;
                                status:
                                    | "pending"
                                    | "running"
                                    | "failed"
                                    | "queued"
                                    | "succeeded"
                                    | "cancelled";
                            }
                            | {
                                completedAt: string
                                | null;
                                error?: string | null;
                                id: string;
                                kind: "update";
                                knowledgeBaseId: string;
                                result?: { entriesRewritten: number; revisionId: string | null };
                                startedAt: string | null;
                                status:
                                    | "pending"
                                    | "running"
                                    | "failed"
                                    | "queued"
                                    | "succeeded"
                                    | "cancelled";
                            }
                            | {
                                completedAt: string
                                | null;
                                error?: string | null;
                                id: string;
                                kind: "sync";
                                knowledgeBaseId: string;
                                result?: {
                                    heldDeletions: number | null;
                                    sourceId: string;
                                    status: "completed" | "held";
                                    syncId: string;
                                };
                                startedAt: string
                                | null;
                                status:
                                    | "pending"
                                    | "running"
                                    | "failed"
                                    | "queued"
                                    | "succeeded"
                                    | "cancelled";
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string };
                    query?: { cursor?: string; limit?: number };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                data: (
                                    | {
                                        chunkCount: number;
                                        convertedDocumentCount: number;
                                        crawlOptions: {
                                            excludePaths?: (...)
                                            | (...);
                                            ignoreQueryParameters?: (...) | (...) | (...);
                                            includePaths?: (...) | (...);
                                            maxDepth?: (...) | (...);
                                            pageLimit?: (...) | (...);
                                            sitemapOnly?: (...) | (...) | (...);
                                        };
                                        createdAt: string;
                                        documentCount: number;
                                        failedDocumentCount: number;
                                        id: string;
                                        knowledgeBaseId: string;
                                        lastSyncedAt: string
                                        | null;
                                        latestSync:
                                            | {
                                                createdAt: ...;
                                                documentsDeleted: ...;
                                                documentsMissing: ...;
                                                documentsSeen: ...;
                                                documentsUnchanged: ...;
                                                documentsUpserted: ...;
                                                error: ...;
                                                finishedAt: ...;
                                                heldDeletions: ...;
                                                id: ...;
                                                mode: ...;
                                                partialReason: ...;
                                                sourceId: ...;
                                                status: ...;
                                                trigger: ...;
                                            }
                                            | null;
                                        skippedDocumentCount: number;
                                        syncFrequency: "weekly"
                                        | "monthly"
                                        | null;
                                        title: string;
                                        type: "web";
                                        updatedAt: string;
                                        url: string;
                                    }
                                    | {
                                        chunkCount: number;
                                        convertedDocumentCount: number;
                                        createdAt: string;
                                        documentCount: number;
                                        failedDocumentCount: number;
                                        id: string;
                                        knowledgeBaseId: string;
                                        lastSyncedAt: string
                                        | null;
                                        latestSync:
                                            | {
                                                createdAt: ...;
                                                documentsDeleted: ...;
                                                documentsMissing: ...;
                                                documentsSeen: ...;
                                                documentsUnchanged: ...;
                                                documentsUpserted: ...;
                                                error: ...;
                                                finishedAt: ...;
                                                heldDeletions: ...;
                                                id: ...;
                                                mode: ...;
                                                partialReason: ...;
                                                sourceId: ...;
                                                status: ...;
                                                trigger: ...;
                                            }
                                            | null;
                                        query: string;
                                        sanityDatasetId: string;
                                        sanityProjectId: string;
                                        skippedDocumentCount: number;
                                        syncFrequency: "weekly"
                                        | "monthly"
                                        | null;
                                        title: string;
                                        type: "sanity-dataset";
                                        updatedAt: string;
                                    }
                                    | {
                                        chunkCount: number;
                                        convertedDocumentCount: number;
                                        createdAt: string;
                                        documentCount: number;
                                        failedDocumentCount: number;
                                        filename: string
                                        | null;
                                        id: string;
                                        knowledgeBaseId: string;
                                        lastSyncedAt: string | null;
                                        latestSync:
                                            | {
                                                createdAt: ...;
                                                documentsDeleted: ...;
                                                documentsMissing: ...;
                                                documentsSeen: ...;
                                                documentsUnchanged: ...;
                                                documentsUpserted: ...;
                                                error: ...;
                                                finishedAt: ...;
                                                heldDeletions: ...;
                                                id: ...;
                                                mode: ...;
                                                partialReason: ...;
                                                sourceId: ...;
                                                status: ...;
                                                trigger: ...;
                                            }
                                            | null;
                                        sizeBytes: number
                                        | null;
                                        skippedDocumentCount: number;
                                        title: string;
                                        type: "files";
                                        updatedAt: string;
                                    }
                                )[];
                                nextCursor: string
                                | null;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: { "Idempotency-Key"?: string };
                    path: { apiVersion: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody: {
                    content: {
                        "application/json": | {
                            crawlOptions?: {
                                excludePaths?: string[];
                                ignoreQueryParameters?: boolean;
                                includePaths?: string[];
                                maxDepth?: number;
                                pageLimit?: number;
                                sitemapOnly?: boolean;
                            };
                            dryRun?: boolean;
                            type: "web";
                            url: string;
                        }
                        | {
                            query: string;
                            sanityDatasetId: string;
                            sanityProjectId: string;
                            type: "sanity-dataset";
                        }
                        | {
                            content?: string;
                            contentType?: "text/markdown"
                            | "text/plain";
                            title: string;
                            type: "files";
                        };
                    };
                };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                groups: { count: number; prefix: string }[];
                                otherCount: number;
                                totalPages: number;
                                truncated: boolean;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "201": {
                        content: {
                            "application/json": | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                crawlOptions: {
                                    excludePaths?: string[];
                                    ignoreQueryParameters?: boolean;
                                    includePaths?: string[];
                                    maxDepth?: number;
                                    pageLimit?: number;
                                    sitemapOnly?: boolean;
                                };
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string
                                | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: string
                                        | null;
                                        finishedAt: string | null;
                                        heldDeletions: number | null;
                                        id: string;
                                        mode: "full" | "incremental";
                                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                        sourceId: string;
                                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                    }
                                    | null;
                                skippedDocumentCount: number;
                                syncFrequency: "weekly"
                                | "monthly"
                                | null;
                                title: string;
                                type: "web";
                                updatedAt: string;
                                url: string;
                            }
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string
                                | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: string
                                        | null;
                                        finishedAt: string | null;
                                        heldDeletions: number | null;
                                        id: string;
                                        mode: "full" | "incremental";
                                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                        sourceId: string;
                                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                    }
                                    | null;
                                query: string;
                                sanityDatasetId: string;
                                sanityProjectId: string;
                                skippedDocumentCount: number;
                                syncFrequency: "weekly"
                                | "monthly"
                                | null;
                                title: string;
                                type: "sanity-dataset";
                                updatedAt: string;
                            }
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                filename: string
                                | null;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: string
                                        | null;
                                        finishedAt: string | null;
                                        heldDeletions: number | null;
                                        id: string;
                                        mode: "full" | "incremental";
                                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                        sourceId: string;
                                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                    }
                                    | null;
                                sizeBytes: number
                                | null;
                                skippedDocumentCount: number;
                                title: string;
                                type: "files";
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}": {
            delete: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "204": {
                        content: { "application/json": null };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                crawlOptions: {
                                    excludePaths?: string[];
                                    ignoreQueryParameters?: boolean;
                                    includePaths?: string[];
                                    maxDepth?: number;
                                    pageLimit?: number;
                                    sitemapOnly?: boolean;
                                };
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string
                                | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: string
                                        | null;
                                        finishedAt: string | null;
                                        heldDeletions: number | null;
                                        id: string;
                                        mode: "full" | "incremental";
                                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                        sourceId: string;
                                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                    }
                                    | null;
                                skippedDocumentCount: number;
                                syncFrequency: "weekly"
                                | "monthly"
                                | null;
                                title: string;
                                type: "web";
                                updatedAt: string;
                                url: string;
                            }
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string
                                | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: string
                                        | null;
                                        finishedAt: string | null;
                                        heldDeletions: number | null;
                                        id: string;
                                        mode: "full" | "incremental";
                                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                        sourceId: string;
                                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                    }
                                    | null;
                                query: string;
                                sanityDatasetId: string;
                                sanityProjectId: string;
                                skippedDocumentCount: number;
                                syncFrequency: "weekly"
                                | "monthly"
                                | null;
                                title: string;
                                type: "sanity-dataset";
                                updatedAt: string;
                            }
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                filename: string
                                | null;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: string
                                        | null;
                                        finishedAt: string | null;
                                        heldDeletions: number | null;
                                        id: string;
                                        mode: "full" | "incremental";
                                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                        sourceId: string;
                                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                    }
                                    | null;
                                sizeBytes: number
                                | null;
                                skippedDocumentCount: number;
                                title: string;
                                type: "files";
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                    query?: undefined;
                };
                requestBody: {
                    content: {
                        "application/json": {
                            confirmDeletions?: boolean;
                            crawlOptions?: {
                                excludePaths?: string[];
                                ignoreQueryParameters?: boolean;
                                includePaths?: string[];
                                maxDepth?: number;
                                pageLimit?: number;
                                sitemapOnly?: boolean;
                            };
                            query?: string;
                            syncFrequency?: "weekly"
                            | "monthly"
                            | null;
                            title?: string;
                        };
                    };
                };
                responses: {
                    "200": {
                        content: {
                            "application/json": | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                crawlOptions: {
                                    excludePaths?: string[];
                                    ignoreQueryParameters?: boolean;
                                    includePaths?: string[];
                                    maxDepth?: number;
                                    pageLimit?: number;
                                    sitemapOnly?: boolean;
                                };
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string
                                | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: string
                                        | null;
                                        finishedAt: string | null;
                                        heldDeletions: number | null;
                                        id: string;
                                        mode: "full" | "incremental";
                                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                        sourceId: string;
                                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                    }
                                    | null;
                                skippedDocumentCount: number;
                                syncFrequency: "weekly"
                                | "monthly"
                                | null;
                                title: string;
                                type: "web";
                                updatedAt: string;
                                url: string;
                            }
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string
                                | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: string
                                        | null;
                                        finishedAt: string | null;
                                        heldDeletions: number | null;
                                        id: string;
                                        mode: "full" | "incremental";
                                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                        sourceId: string;
                                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                    }
                                    | null;
                                query: string;
                                sanityDatasetId: string;
                                sanityProjectId: string;
                                skippedDocumentCount: number;
                                syncFrequency: "weekly"
                                | "monthly"
                                | null;
                                title: string;
                                type: "sanity-dataset";
                                updatedAt: string;
                            }
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                filename: string
                                | null;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string | null;
                                latestSync:
                                    | {
                                        createdAt: string;
                                        documentsDeleted: number;
                                        documentsMissing: number;
                                        documentsSeen: number;
                                        documentsUnchanged: number;
                                        documentsUpserted: number;
                                        error: string
                                        | null;
                                        finishedAt: string | null;
                                        heldDeletions: number | null;
                                        id: string;
                                        mode: "full" | "incremental";
                                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                        sourceId: string;
                                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                    }
                                    | null;
                                sizeBytes: number
                                | null;
                                skippedDocumentCount: number;
                                title: string;
                                type: "files";
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                    query?: { cursor?: string; limit?: number };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                data: {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }[];
                                nextCursor: string
                                | null;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: { "Idempotency-Key"?: string };
                    path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                    query?: undefined;
                };
                requestBody: {
                    content: { "application/json": { uploadId?: string }
                    | null };
                };
                responses: {
                    "202": {
                        content: {
                            "application/json": { jobId: string
                            | null; sourceId: string };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs/{syncId}": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        knowledgeBaseId: string;
                        sourceId: string;
                        syncId: string;
                    };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs/{syncId}/confirm": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        knowledgeBaseId: string;
                        sourceId: string;
                        syncId: string;
                    };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs/{syncId}/discard": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        knowledgeBaseId: string;
                        sourceId: string;
                        syncId: string;
                    };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/uploads": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: { "Idempotency-Key"?: string };
                    path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                    query?: undefined;
                };
                requestBody: {
                    content: {
                        "application/json": { contentType?: string; filename: string };
                    };
                };
                responses: {
                    "201": {
                        content: {
                            "application/json": { uploadId: string; uploadUrl: string };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sync": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; knowledgeBaseId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "202": {
                        content: { "application/json": { sourceIds: string[] } };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/organizations/{organizationId}/conversations/{threadId}": {
            delete: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; organizationId: string; threadId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "204": {
                        content: { "application/json": null };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; organizationId: string; threadId: string };
                    query?: undefined;
                };
                requestBody: {
                    content: {
                        "application/json": {
                            classificationError?: string;
                            coreMetrics?: {
                                contentGaps: string[];
                                sentiment: "positive"
                                | "neutral"
                                | "negative";
                                successScore: number;
                            };
                        };
                    };
                };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                classificationError: string
                                | null;
                                classifiedAt: string | null;
                                coreMetrics:
                                    | {
                                        contentGaps?: string[];
                                        sentiment?: "positive"
                                        | "neutral"
                                        | "negative";
                                        successScore?: number;
                                    }
                                    | null;
                                createdAt: string;
                                id: string;
                                messages: {
                                    content: string
                                    | null;
                                    error: string | null;
                                    role: "user" | "assistant" | "system" | "tool";
                                    timestamp: string | null;
                                    toolName: string | null;
                                    toolType: "result" | "call" | null;
                                }[];
                                messagesUpdatedAt: string;
                                metadata: { [key: string]: string | string[] }
                                | null;
                                modelId: string | null;
                                modelProvider: string | null;
                                sharing:
                                    | {
                                        contact?: string;
                                        conversations?: boolean;
                                        metrics?: boolean;
                                    }
                                    | null;
                                startedAt: string;
                                threadId: string;
                                tokenUsage: | {
                                    inputTokens?: number;
                                    outputTokens?: number;
                                    totalTokens?: number;
                                }
                                | null;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            post?: undefined;
            put: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; organizationId: string; threadId: string };
                    query?: undefined;
                };
                requestBody: {
                    content: {
                        "application/json": {
                            messages: {
                                content?: string
                                | null;
                                error?: string | null;
                                role: "user" | "assistant" | "system" | "tool";
                                toolName?: string | null;
                                toolType?: "result" | "call" | null;
                            }[];
                            metadata?: { [key: string]: string
                            | string[] };
                            modelId?: string;
                            modelProvider?: string;
                            sharing?: {
                                contact?: string;
                                conversations?: boolean;
                                metrics?: boolean;
                            };
                            tokenUsage?: {
                                inputTokens?: number;
                                outputTokens?: number;
                                totalTokens?: number;
                            };
                        };
                    };
                };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                classificationError: string
                                | null;
                                classifiedAt: string | null;
                                coreMetrics:
                                    | {
                                        contentGaps?: string[];
                                        sentiment?: "positive"
                                        | "neutral"
                                        | "negative";
                                        successScore?: number;
                                    }
                                    | null;
                                createdAt: string;
                                id: string;
                                messages: {
                                    content: string
                                    | null;
                                    error: string | null;
                                    role: "user" | "assistant" | "system" | "tool";
                                    timestamp: string | null;
                                    toolName: string | null;
                                    toolType: "result" | "call" | null;
                                }[];
                                messagesUpdatedAt: string;
                                metadata: { [key: string]: string | string[] }
                                | null;
                                modelId: string | null;
                                modelProvider: string | null;
                                sharing:
                                    | {
                                        contact?: string;
                                        conversations?: boolean;
                                        metrics?: boolean;
                                    }
                                    | null;
                                startedAt: string;
                                threadId: string;
                                tokenUsage: | {
                                    inputTokens?: number;
                                    outputTokens?: number;
                                    totalTokens?: number;
                                }
                                | null;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            trace?: undefined;
        };
        "/{apiVersion}/context/organizations/{organizationId}/mcp": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { apiVersion: string; organizationId: string };
                    query?: undefined;
                };
                requestBody: {
                    content: {
                        "application/json": {
                            groqFilter?: string;
                            instructions?: string;
                            name: string;
                            sources: (
                                | { id: string; type: "knowledge-base" }
                                | {
                                    id: string;
                                    perspective?: "published" | "drafts" | "raw" | null;
                                    semanticSearch?: boolean | null;
                                    type: "dataset";
                                    workspace?: string | null;
                                }
                            )[];
                            title: string;
                        };
                    };
                };
                responses: {
                    "201": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                groqFilter: string
                                | null;
                                id: string;
                                instructions: string | null;
                                lastUsedAt: string | null;
                                name: string;
                                organizationId: string;
                                sources: (
                                    | { id: string; type: "knowledge-base" }
                                    | {
                                        id: string;
                                        perspective: "published" | "drafts" | "raw" | null;
                                        semanticSearch: boolean | null;
                                        type: "dataset";
                                        workspace: string | null;
                                    }
                                )[];
                                title: string;
                                updatedAt: string;
                                url: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/organizations/{organizationId}/mcp/{mcpEndpoint}": {
            delete: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        mcpEndpoint: string;
                        organizationId: string;
                    };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "204": {
                        content: { "application/json": null };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        mcpEndpoint: string;
                        organizationId: string;
                    };
                    query?: undefined;
                };
                requestBody: {
                    content: {
                        "application/json": {
                            groqFilter?: string
                            | null;
                            instructions?: string | null;
                            sources?: (
                                | { id: string; type: "knowledge-base" }
                                | {
                                    id: string;
                                    perspective?: "published" | "drafts" | "raw" | null;
                                    semanticSearch?: boolean | null;
                                    type: "dataset";
                                    workspace?: string | null;
                                }
                            )[];
                            title?: string;
                        };
                    };
                };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                groqFilter: string
                                | null;
                                id: string;
                                instructions: string | null;
                                lastUsedAt: string | null;
                                name: string;
                                organizationId: string;
                                sources: (
                                    | { id: string; type: "knowledge-base" }
                                    | {
                                        id: string;
                                        perspective: "published" | "drafts" | "raw" | null;
                                        semanticSearch: boolean | null;
                                        type: "dataset";
                                        workspace: string | null;
                                    }
                                )[];
                                title: string;
                                updatedAt: string;
                                url: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        mcpEndpoint: string;
                        organizationId: string;
                    };
                    query?: {
                        embeddings?: string;
                        groqFilter?: string;
                        instructions?: string;
                        knowledgeBases?: string;
                        linkResolver?: string;
                        mode?: "groq"
                        | "knowledge_base";
                        perspective?: string;
                        workspace?: string;
                    };
                };
                requestBody?: undefined;
                responses: {
                    "200": { content?: undefined; headers: { [name: string]: unknown } };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/organizations/{organizationId}/mcp/{mcpEndpoint}/initial-context": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        mcpEndpoint: string;
                        organizationId: string;
                    };
                    query?: {
                        embeddings?: string;
                        groqFilter?: string;
                        heading_offset?: string;
                        instructions?: string;
                        knowledgeBases?: string;
                        linkResolver?: string;
                        mode?: "groq"
                        | "knowledge_base";
                        perspective?: string;
                        workspace?: string;
                    };
                };
                requestBody?: undefined;
                responses: {
                    "200": { content?: undefined; headers: { [name: string]: unknown } };
                    default: {
                        content: {
                            "application/json": {
                                code:
                                    | "knowledgeBaseNotFound"
                                    | "jobNotFound"
                                    | "sourceNotFound"
                                    | "documentNotFound"
                                    | "syncNotFound"
                                    | "uploadNotFound"
                                    | "chunkNotFound"
                                    | "entryNotFound"
                                    | "entryDocumentInvalid"
                                    | "revisionNotFound"
                                    | "revisionNotBrowsable"
                                    | "revisionNotRestorable"
                                    | "buildDecisionsNotFound"
                                    | "issueNotFound"
                                    | "instructionNotFound"
                                    | "routeNotFound"
                                    | "buildInFlight"
                                    | "knowledgeBaseIsDraft"
                                    | "webSourceRootConflict"
                                    | "webSourceRootLimitExceeded"
                                    | "preferenceLimitExceeded"
                                    | "syncInProgress"
                                    | "syncNotHeld"
                                    | "sourceDeletionsUnconfirmed"
                                    | "documentNotConverted"
                                    | "documentNotStored"
                                    | "documentInvalidState"
                                    | "uploadTooLarge"
                                    | "payloadTooLarge"
                                    | "validationError"
                                    | "unsupportedMediaType"
                                    | "sourceTypeMismatch"
                                    | "issueNotResolvable"
                                    | "issueNotAutoApplicable"
                                    | "issueDocumentInvalid"
                                    | "issueTransitionConflict"
                                    | "draftTitleRequired"
                                    | "datasetSourceEmpty"
                                    | "datasetAlreadyBound"
                                    | "datasetSourceNotBound"
                                    | "datasetReadAccessDenied"
                                    | "invalidGroqFilter"
                                    | "mcpEndpointNotFound"
                                    | "mcpEndpointNameConflict"
                                    | "mcpEndpointEditConflict"
                                    | "mcpSourceKnowledgeBaseNotFound"
                                    | "mcpEndpointNotServable"
                                    | "conversationNotFound"
                                    | "missingCredential"
                                    | "invalidCredential"
                                    | "missingOrganization"
                                    | "organizationAccessDenied"
                                    | "knowledgeBaseAccessDenied"
                                    | "contextGrantRequired"
                                    | "knowledgeBaseCreateAccessDenied"
                                    | "mcpEndpointManageAccessDenied"
                                    | "insightsWriteAccessDenied"
                                    | "sharedOrgPreferencesWriteAccessDenied"
                                    | "projectAdminRequired"
                                    | "accessCheckFailed"
                                    | "planLimitReached"
                                    | "featureNotInPlan"
                                    | "buildCapReached"
                                    | "tooManyConnections"
                                    | "jobsUnavailable"
                                    | "contextStoreUnavailable"
                                    | "crawlingUnavailable"
                                    | "crawlPreviewUnavailable"
                                    | "instructionDraftFailed"
                                    | "instructionScopeVanished"
                                    | "purposeDraftFailed"
                                    | "noPurposeEvidence"
                                    | "idempotencyKeyReused"
                                    | "idempotencyRequestInFlight"
                                    | "idempotencyParamsMismatch"
                                    | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/{apiVersion}/context/organizations/{organizationId}/mcp/{mcpEndpoint}/status": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: {
                        apiVersion: string;
                        mcpEndpoint: string;
                        organizationId: string;
                    };
                    query?: {
                        embeddings?: string;
                        groqFilter?: string;
                        instructions?: string;
                        knowledgeBases?: string;
                        linkResolver?: string;
                        mode?: "groq"
                        | "knowledge_base";
                        perspective?: string;
                        workspace?: string;
                    };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                checks: {
                                    access: | { ok: true }
                                    | { denied: string[]; error: string; ok: false }
                                    | null;
                                    knowledgeBases:
                                        | { ok: true; resolved: string[] }
                                        | {
                                            error: string;
                                            missing: string[];
                                            ok: false;
                                            resolved: string[];
                                            unbuilt: string[];
                                        }
                                        | null;
                                    schema: | { documentTypes: number; ok: true; perspective: string }
                                    | { error: string; ok: false }
                                    | null;
                                    semanticSearch:
                                        | {
                                            active: boolean;
                                            inactiveReason: | "turnedOff"
                                            | "datasetEmbeddingsNotReady"
                                            | "usageLimitReached"
                                            | null;
                                            ok: true;
                                            status: string
                                            | null;
                                            withinUsageLimit: boolean | null;
                                        }
                                        | { error: string; ok: false }
                                        | null;
                                    studio:
                                        | {
                                            availableWorkspaces: { name: ...; title: ... }[];
                                            ok: true;
                                            workspace: string;
                                            workspaceAutoSelected: boolean;
                                            workspaceTitle: string;
                                        }
                                        | { error: string; ok: false }
                                        | null;
                                };
                                ready: boolean;
                                requiredOk: boolean;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    default: {
                        content: {
                            "application/json": {
                                code: | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                                error: string;
                                fields?: { [key: string]: unknown };
                                message: string;
                                statusCode: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
    }
    Index

    Properties

    /{apiVersion}/context/knowledge-bases /{apiVersion}/context/knowledge-bases/{knowledgeBaseId} /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/build /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/build/cancel /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/documents /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/documents/{documentId} /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/documents/{documentId}/content /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/entries/{entryPath}/rebuild /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/instructions /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/instructions/{instructionId} /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/dismiss /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/reopen /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/resolve /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/apply /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/jobs/{jobId} /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId} /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs/{syncId} /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs/{syncId}/confirm /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs/{syncId}/discard /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/uploads /{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sync /{apiVersion}/context/organizations/{organizationId}/conversations/{threadId} /{apiVersion}/context/organizations/{organizationId}/mcp /{apiVersion}/context/organizations/{organizationId}/mcp/{mcpEndpoint} /{apiVersion}/context/organizations/{organizationId}/mcp/{mcpEndpoint}/initial-context /{apiVersion}/context/organizations/{organizationId}/mcp/{mcpEndpoint}/status

    Properties

    "/{apiVersion}/context/knowledge-bases": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string };
                query: {
                    cursor?: string;
                    includeDrafts?: "true" | "false";
                    limit?: number;
                    organizationId: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            data: {
                                activeJobId: string
                                | null;
                                buildRestriction: { code: string; message: string } | null;
                                buildStageState: { jobId: string; stages: (...)[] } | null;
                                createdAt: string;
                                createdBy: { displayName: (...) | (...); id: (...) | (...) } | null;
                                description: string;
                                excludedSourceChunks: number;
                                hasDatasetSource: boolean;
                                hasFileSource: boolean;
                                hasPendingChanges: boolean;
                                hasWebSource: boolean;
                                id: string;
                                instructionCount: number;
                                isBuilding: boolean;
                                lastChangedAt: string | null;
                                lastCheckedAt: string | null;
                                openIssueCount: number;
                                organizationId: string;
                                pendingChanges:
                                    | { added: number; changed: number; removed: number }
                                    | null;
                                pipelineOutdated: boolean;
                                publicId: string;
                                rebuildRecommended: { at: string; reason: string } | null;
                                refreshInFlight: boolean;
                                sourceChunks: number;
                                sourceUsage: { used: number } | null;
                                state: "draft" | "created" | "ready";
                                title: string;
                                updatedAt: string;
                            }[];
                            nextCursor: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: { "Idempotency-Key"?: string };
                path: { apiVersion: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        description?: string;
                        draft?: boolean;
                        organizationId: string;
                        title?: string;
                    };
                };
            };
            responses: {
                "201": {
                    content: {
                        "application/json": {
                            activeJobId: string
                            | null;
                            buildRestriction: { code: string; message: string } | null;
                            buildStageState:
                                | {
                                    jobId: string;
                                    stages: {
                                        id: string;
                                        status: (...)
                                        | (...)
                                        | (...)
                                        | (...);
                                        units?: (...) | (...);
                                        weight: number;
                                    }[];
                                }
                                | null;
                            createdAt: string;
                            createdBy: { displayName: string | null; id: string | null }
                            | null;
                            description: string;
                            excludedSourceChunks: number;
                            hasDatasetSource: boolean;
                            hasFileSource: boolean;
                            hasPendingChanges: boolean;
                            hasWebSource: boolean;
                            id: string;
                            instructionCount: number;
                            isBuilding: boolean;
                            lastChangedAt: string | null;
                            lastCheckedAt: string | null;
                            openIssueCount: number;
                            organizationId: string;
                            pendingChanges:
                                | { added: number; changed: number; removed: number }
                                | null;
                            pipelineOutdated: boolean;
                            publicId: string;
                            rebuildRecommended: { at: string; reason: string } | null;
                            refreshInFlight: boolean;
                            sourceChunks: number;
                            sourceUsage: { used: number } | null;
                            state: "draft" | "created" | "ready";
                            title: string;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string };
              query: {
                  cursor?: string;
                  includeDrafts?: "true" | "false";
                  limit?: number;
                  organizationId: string;
              };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          data: {
                              activeJobId: string
                              | null;
                              buildRestriction: { code: string; message: string } | null;
                              buildStageState: { jobId: string; stages: (...)[] } | null;
                              createdAt: string;
                              createdBy: { displayName: (...) | (...); id: (...) | (...) } | null;
                              description: string;
                              excludedSourceChunks: number;
                              hasDatasetSource: boolean;
                              hasFileSource: boolean;
                              hasPendingChanges: boolean;
                              hasWebSource: boolean;
                              id: string;
                              instructionCount: number;
                              isBuilding: boolean;
                              lastChangedAt: string | null;
                              lastCheckedAt: string | null;
                              openIssueCount: number;
                              organizationId: string;
                              pendingChanges:
                                  | { added: number; changed: number; removed: number }
                                  | null;
                              pipelineOutdated: boolean;
                              publicId: string;
                              rebuildRecommended: { at: string; reason: string } | null;
                              refreshInFlight: boolean;
                              sourceChunks: number;
                              sourceUsage: { used: number } | null;
                              state: "draft" | "created" | "ready";
                              title: string;
                              updatedAt: string;
                          }[];
                          nextCursor: string
                          | null;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      List knowledge bases

      Returns the knowledge bases you can access in the organization set by organizationId. Drafts are left out unless you set includeDrafts to true. Results are cursor-paginated, newest first.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string };
            query: {
                cursor?: string;
                includeDrafts?: "true" | "false";
                limit?: number;
                organizationId: string;
            };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • query: {
              cursor?: string;
              includeDrafts?: "true" | "false";
              limit?: number;
              organizationId: string;
          }
          • Optionalcursor?: string

            The nextCursor value from the previous page. Omit it to get the first page.

          • OptionalincludeDrafts?: "true" | "false"

            Set to true to also list the organization's drafts, which have state set to draft. Drafts count toward the plan's knowledge base limit, and createdBy says who started each one.

          • Optionallimit?: number

            The maximum number of items to return.

          • organizationId: string

            The organization to list knowledge bases for.

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        data: {
                            activeJobId: string | null;
                            buildRestriction: { code: string; message: string } | null;
                            buildStageState: { jobId: string; stages: (...)[] } | null;
                            createdAt: string;
                            createdBy: { displayName: (...) | (...); id: (...) | (...) } | null;
                            description: string;
                            excludedSourceChunks: number;
                            hasDatasetSource: boolean;
                            hasFileSource: boolean;
                            hasPendingChanges: boolean;
                            hasWebSource: boolean;
                            id: string;
                            instructionCount: number;
                            isBuilding: boolean;
                            lastChangedAt: string | null;
                            lastCheckedAt: string | null;
                            openIssueCount: number;
                            organizationId: string;
                            pendingChanges:
                                | { added: number; changed: number; removed: number }
                                | null;
                            pipelineOutdated: boolean;
                            publicId: string;
                            rebuildRecommended: { at: string; reason: string } | null;
                            refreshInFlight: boolean;
                            sourceChunks: number;
                            sourceUsage: { used: number } | null;
                            state: "draft" | "created" | "ready";
                            title: string;
                            updatedAt: string;
                        }[];
                        nextCursor: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      data: {
                          activeJobId: string | null;
                          buildRestriction: { code: string; message: string } | null;
                          buildStageState: { jobId: string; stages: (...)[] } | null;
                          createdAt: string;
                          createdBy: { displayName: (...) | (...); id: (...) | (...) } | null;
                          description: string;
                          excludedSourceChunks: number;
                          hasDatasetSource: boolean;
                          hasFileSource: boolean;
                          hasPendingChanges: boolean;
                          hasWebSource: boolean;
                          id: string;
                          instructionCount: number;
                          isBuilding: boolean;
                          lastChangedAt: string | null;
                          lastCheckedAt: string | null;
                          openIssueCount: number;
                          organizationId: string;
                          pendingChanges:
                              | { added: number; changed: number; removed: number }
                              | null;
                          pipelineOutdated: boolean;
                          publicId: string;
                          rebuildRecommended: { at: string; reason: string } | null;
                          refreshInFlight: boolean;
                          sourceChunks: number;
                          sourceUsage: { used: number } | null;
                          state: "draft" | "created" | "ready";
                          title: string;
                          updatedAt: string;
                      }[];
                      nextCursor: string
                      | null;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A page of knowledge bases.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: { "Idempotency-Key"?: string };
              path: { apiVersion: string };
              query?: undefined;
          };
          requestBody: {
              content: {
                  "application/json": {
                      description?: string;
                      draft?: boolean;
                      organizationId: string;
                      title?: string;
                  };
              };
          };
          responses: {
              "201": {
                  content: {
                      "application/json": {
                          activeJobId: string
                          | null;
                          buildRestriction: { code: string; message: string } | null;
                          buildStageState:
                              | {
                                  jobId: string;
                                  stages: {
                                      id: string;
                                      status: (...)
                                      | (...)
                                      | (...)
                                      | (...);
                                      units?: (...) | (...);
                                      weight: number;
                                  }[];
                              }
                              | null;
                          createdAt: string;
                          createdBy: { displayName: string | null; id: string | null }
                          | null;
                          description: string;
                          excludedSourceChunks: number;
                          hasDatasetSource: boolean;
                          hasFileSource: boolean;
                          hasPendingChanges: boolean;
                          hasWebSource: boolean;
                          id: string;
                          instructionCount: number;
                          isBuilding: boolean;
                          lastChangedAt: string | null;
                          lastCheckedAt: string | null;
                          openIssueCount: number;
                          organizationId: string;
                          pendingChanges:
                              | { added: number; changed: number; removed: number }
                              | null;
                          pipelineOutdated: boolean;
                          publicId: string;
                          rebuildRecommended: { at: string; reason: string } | null;
                          refreshInFlight: boolean;
                          sourceChunks: number;
                          sourceUsage: { used: number } | null;
                          state: "draft" | "created" | "ready";
                          title: string;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Create a knowledge base

      Creates a knowledge base in your organization. To add content to it, add a source. Set draft to true to create a draft, which needs no title or description until you finish it. If your organization's Context document store can't be used, the request returns 503 with code contextStoreUnavailable and you can retry.

      • parameters: {
            cookie?: undefined;
            header?: { "Idempotency-Key"?: string };
            path: { apiVersion: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: { "Idempotency-Key"?: string }
          • OptionalIdempotency-Key?: string

            A unique value, such as a UUID, that makes retries safe. A retry with the same key and body returns the first response instead of repeating the work.

        • path: { apiVersion: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

        • Optionalquery?: undefined
      • requestBody: {
            content: {
                "application/json": {
                    description?: string;
                    draft?: boolean;
                    organizationId: string;
                    title?: string;
                };
            };
        }
      • responses: {
            "201": {
                content: {
                    "application/json": {
                        activeJobId: string | null;
                        buildRestriction: { code: string; message: string } | null;
                        buildStageState:
                            | {
                                jobId: string;
                                stages: {
                                    id: string;
                                    status: (...)
                                    | (...)
                                    | (...)
                                    | (...);
                                    units?: (...) | (...);
                                    weight: number;
                                }[];
                            }
                            | null;
                        createdAt: string;
                        createdBy: { displayName: string | null; id: string | null }
                        | null;
                        description: string;
                        excludedSourceChunks: number;
                        hasDatasetSource: boolean;
                        hasFileSource: boolean;
                        hasPendingChanges: boolean;
                        hasWebSource: boolean;
                        id: string;
                        instructionCount: number;
                        isBuilding: boolean;
                        lastChangedAt: string | null;
                        lastCheckedAt: string | null;
                        openIssueCount: number;
                        organizationId: string;
                        pendingChanges:
                            | { added: number; changed: number; removed: number }
                            | null;
                        pipelineOutdated: boolean;
                        publicId: string;
                        rebuildRecommended: { at: string; reason: string } | null;
                        refreshInFlight: boolean;
                        sourceChunks: number;
                        sourceUsage: { used: number } | null;
                        state: "draft" | "created" | "ready";
                        title: string;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 201: {
              content: {
                  "application/json": {
                      activeJobId: string | null;
                      buildRestriction: { code: string; message: string } | null;
                      buildStageState:
                          | {
                              jobId: string;
                              stages: {
                                  id: string;
                                  status: (...)
                                  | (...)
                                  | (...)
                                  | (...);
                                  units?: (...) | (...);
                                  weight: number;
                              }[];
                          }
                          | null;
                      createdAt: string;
                      createdBy: { displayName: string | null; id: string | null }
                      | null;
                      description: string;
                      excludedSourceChunks: number;
                      hasDatasetSource: boolean;
                      hasFileSource: boolean;
                      hasPendingChanges: boolean;
                      hasWebSource: boolean;
                      id: string;
                      instructionCount: number;
                      isBuilding: boolean;
                      lastChangedAt: string | null;
                      lastCheckedAt: string | null;
                      openIssueCount: number;
                      organizationId: string;
                      pendingChanges:
                          | { added: number; changed: number; removed: number }
                          | null;
                      pipelineOutdated: boolean;
                      publicId: string;
                      rebuildRecommended: { at: string; reason: string } | null;
                      refreshInFlight: boolean;
                      sourceChunks: number;
                      sourceUsage: { used: number } | null;
                      state: "draft" | "created" | "ready";
                      title: string;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A knowledge base and its current state.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}": {
        delete: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "204": {
                    content: { "application/json": null };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            activeJobId: string
                            | null;
                            buildRestriction: { code: string; message: string } | null;
                            buildStageState:
                                | {
                                    jobId: string;
                                    stages: {
                                        id: string;
                                        status: (...)
                                        | (...)
                                        | (...)
                                        | (...);
                                        units?: (...) | (...);
                                        weight: number;
                                    }[];
                                }
                                | null;
                            createdAt: string;
                            createdBy: { displayName: string | null; id: string | null }
                            | null;
                            description: string;
                            excludedSourceChunks: number;
                            hasDatasetSource: boolean;
                            hasFileSource: boolean;
                            hasPendingChanges: boolean;
                            hasWebSource: boolean;
                            id: string;
                            instructionCount: number;
                            isBuilding: boolean;
                            lastChangedAt: string | null;
                            lastCheckedAt: string | null;
                            openIssueCount: number;
                            organizationId: string;
                            pendingChanges:
                                | { added: number; changed: number; removed: number }
                                | null;
                            pipelineOutdated: boolean;
                            publicId: string;
                            rebuildRecommended: { at: string; reason: string } | null;
                            refreshInFlight: boolean;
                            sourceChunks: number;
                            sourceUsage: { used: number } | null;
                            state: "draft" | "created" | "ready";
                            title: string;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        description?: string;
                        draft?: false;
                        title?: string;
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            activeJobId: string
                            | null;
                            buildRestriction: { code: string; message: string } | null;
                            buildStageState:
                                | {
                                    jobId: string;
                                    stages: {
                                        id: string;
                                        status: (...)
                                        | (...)
                                        | (...)
                                        | (...);
                                        units?: (...) | (...);
                                        weight: number;
                                    }[];
                                }
                                | null;
                            createdAt: string;
                            createdBy: { displayName: string | null; id: string | null }
                            | null;
                            description: string;
                            excludedSourceChunks: number;
                            hasDatasetSource: boolean;
                            hasFileSource: boolean;
                            hasPendingChanges: boolean;
                            hasWebSource: boolean;
                            id: string;
                            instructionCount: number;
                            isBuilding: boolean;
                            lastChangedAt: string | null;
                            lastCheckedAt: string | null;
                            openIssueCount: number;
                            organizationId: string;
                            pendingChanges:
                                | { added: number; changed: number; removed: number }
                                | null;
                            pipelineOutdated: boolean;
                            publicId: string;
                            rebuildRecommended: { at: string; reason: string } | null;
                            refreshInFlight: boolean;
                            sourceChunks: number;
                            sourceUsage: { used: number } | null;
                            state: "draft" | "created" | "ready";
                            title: string;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • delete: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "204": {
                  content: { "application/json": null };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Delete a knowledge base

      Deletes the knowledge base and everything it owns: its sources, revisions, stored source files, and its documents in your organization's document store. While a build, refresh, apply, or sync is running, the request returns 409 with code buildInFlight. Retry after that work finishes.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "204": {
                content: { "application/json": null };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 204: { content: { "application/json": null }; headers: { [name: string]: unknown } }

          The knowledge base was deleted.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          activeJobId: string
                          | null;
                          buildRestriction: { code: string; message: string } | null;
                          buildStageState:
                              | {
                                  jobId: string;
                                  stages: {
                                      id: string;
                                      status: (...)
                                      | (...)
                                      | (...)
                                      | (...);
                                      units?: (...) | (...);
                                      weight: number;
                                  }[];
                              }
                              | null;
                          createdAt: string;
                          createdBy: { displayName: string | null; id: string | null }
                          | null;
                          description: string;
                          excludedSourceChunks: number;
                          hasDatasetSource: boolean;
                          hasFileSource: boolean;
                          hasPendingChanges: boolean;
                          hasWebSource: boolean;
                          id: string;
                          instructionCount: number;
                          isBuilding: boolean;
                          lastChangedAt: string | null;
                          lastCheckedAt: string | null;
                          openIssueCount: number;
                          organizationId: string;
                          pendingChanges:
                              | { added: number; changed: number; removed: number }
                              | null;
                          pipelineOutdated: boolean;
                          publicId: string;
                          rebuildRecommended: { at: string; reason: string } | null;
                          refreshInFlight: boolean;
                          sourceChunks: number;
                          sourceUsage: { used: number } | null;
                          state: "draft" | "created" | "ready";
                          title: string;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get a knowledge base

      Returns a knowledge base's metadata and state. knowledgeBaseId accepts the public ID (kb...) or the UUID, and you don't need to pass an organization. If you can't read the knowledge base, the request returns 404. To read the built entries, query sanity.context.entry documents with GROQ from your organization's document store.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        activeJobId: string | null;
                        buildRestriction: { code: string; message: string } | null;
                        buildStageState:
                            | {
                                jobId: string;
                                stages: {
                                    id: string;
                                    status: (...)
                                    | (...)
                                    | (...)
                                    | (...);
                                    units?: (...) | (...);
                                    weight: number;
                                }[];
                            }
                            | null;
                        createdAt: string;
                        createdBy: { displayName: string | null; id: string | null }
                        | null;
                        description: string;
                        excludedSourceChunks: number;
                        hasDatasetSource: boolean;
                        hasFileSource: boolean;
                        hasPendingChanges: boolean;
                        hasWebSource: boolean;
                        id: string;
                        instructionCount: number;
                        isBuilding: boolean;
                        lastChangedAt: string | null;
                        lastCheckedAt: string | null;
                        openIssueCount: number;
                        organizationId: string;
                        pendingChanges:
                            | { added: number; changed: number; removed: number }
                            | null;
                        pipelineOutdated: boolean;
                        publicId: string;
                        rebuildRecommended: { at: string; reason: string } | null;
                        refreshInFlight: boolean;
                        sourceChunks: number;
                        sourceUsage: { used: number } | null;
                        state: "draft" | "created" | "ready";
                        title: string;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      activeJobId: string | null;
                      buildRestriction: { code: string; message: string } | null;
                      buildStageState:
                          | {
                              jobId: string;
                              stages: {
                                  id: string;
                                  status: (...)
                                  | (...)
                                  | (...)
                                  | (...);
                                  units?: (...) | (...);
                                  weight: number;
                              }[];
                          }
                          | null;
                      createdAt: string;
                      createdBy: { displayName: string | null; id: string | null }
                      | null;
                      description: string;
                      excludedSourceChunks: number;
                      hasDatasetSource: boolean;
                      hasFileSource: boolean;
                      hasPendingChanges: boolean;
                      hasWebSource: boolean;
                      id: string;
                      instructionCount: number;
                      isBuilding: boolean;
                      lastChangedAt: string | null;
                      lastCheckedAt: string | null;
                      openIssueCount: number;
                      organizationId: string;
                      pendingChanges:
                          | { added: number; changed: number; removed: number }
                          | null;
                      pipelineOutdated: boolean;
                      publicId: string;
                      rebuildRecommended: { at: string; reason: string } | null;
                      refreshInFlight: boolean;
                      sourceChunks: number;
                      sourceUsage: { used: number } | null;
                      state: "draft" | "created" | "ready";
                      title: string;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A knowledge base and its current state.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • patch: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody: {
              content: {
                  "application/json": {
                      description?: string;
                      draft?: false;
                      title?: string;
                  };
              };
          };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          activeJobId: string
                          | null;
                          buildRestriction: { code: string; message: string } | null;
                          buildStageState:
                              | {
                                  jobId: string;
                                  stages: {
                                      id: string;
                                      status: (...)
                                      | (...)
                                      | (...)
                                      | (...);
                                      units?: (...) | (...);
                                      weight: number;
                                  }[];
                              }
                              | null;
                          createdAt: string;
                          createdBy: { displayName: string | null; id: string | null }
                          | null;
                          description: string;
                          excludedSourceChunks: number;
                          hasDatasetSource: boolean;
                          hasFileSource: boolean;
                          hasPendingChanges: boolean;
                          hasWebSource: boolean;
                          id: string;
                          instructionCount: number;
                          isBuilding: boolean;
                          lastChangedAt: string | null;
                          lastCheckedAt: string | null;
                          openIssueCount: number;
                          organizationId: string;
                          pendingChanges:
                              | { added: number; changed: number; removed: number }
                              | null;
                          pipelineOutdated: boolean;
                          publicId: string;
                          rebuildRecommended: { at: string; reason: string } | null;
                          refreshInFlight: boolean;
                          sourceChunks: number;
                          sourceUsage: { used: number } | null;
                          state: "draft" | "created" | "ready";
                          title: string;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Update a knowledge base

      Updates the title or the description, or finishes a draft (draft: false). Fields equal to their current value are ignored, so sending the current values changes nothing. Finishing a draft with no title returns 422 with code draftTitleRequired. How often a website or dataset syncs is set on the source, with PATCH .../sources/{sourceId}.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • requestBody: {
            content: {
                "application/json": {
                    description?: string;
                    draft?: false;
                    title?: string;
                };
            };
        }
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        activeJobId: string | null;
                        buildRestriction: { code: string; message: string } | null;
                        buildStageState:
                            | {
                                jobId: string;
                                stages: {
                                    id: string;
                                    status: (...)
                                    | (...)
                                    | (...)
                                    | (...);
                                    units?: (...) | (...);
                                    weight: number;
                                }[];
                            }
                            | null;
                        createdAt: string;
                        createdBy: { displayName: string | null; id: string | null }
                        | null;
                        description: string;
                        excludedSourceChunks: number;
                        hasDatasetSource: boolean;
                        hasFileSource: boolean;
                        hasPendingChanges: boolean;
                        hasWebSource: boolean;
                        id: string;
                        instructionCount: number;
                        isBuilding: boolean;
                        lastChangedAt: string | null;
                        lastCheckedAt: string | null;
                        openIssueCount: number;
                        organizationId: string;
                        pendingChanges:
                            | { added: number; changed: number; removed: number }
                            | null;
                        pipelineOutdated: boolean;
                        publicId: string;
                        rebuildRecommended: { at: string; reason: string } | null;
                        refreshInFlight: boolean;
                        sourceChunks: number;
                        sourceUsage: { used: number } | null;
                        state: "draft" | "created" | "ready";
                        title: string;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      activeJobId: string | null;
                      buildRestriction: { code: string; message: string } | null;
                      buildStageState:
                          | {
                              jobId: string;
                              stages: {
                                  id: string;
                                  status: (...)
                                  | (...)
                                  | (...)
                                  | (...);
                                  units?: (...) | (...);
                                  weight: number;
                              }[];
                          }
                          | null;
                      createdAt: string;
                      createdBy: { displayName: string | null; id: string | null }
                      | null;
                      description: string;
                      excludedSourceChunks: number;
                      hasDatasetSource: boolean;
                      hasFileSource: boolean;
                      hasPendingChanges: boolean;
                      hasWebSource: boolean;
                      id: string;
                      instructionCount: number;
                      isBuilding: boolean;
                      lastChangedAt: string | null;
                      lastCheckedAt: string | null;
                      openIssueCount: number;
                      organizationId: string;
                      pendingChanges:
                          | { added: number; changed: number; removed: number }
                          | null;
                      pipelineOutdated: boolean;
                      publicId: string;
                      rebuildRecommended: { at: string; reason: string } | null;
                      refreshInFlight: boolean;
                      sourceChunks: number;
                      sourceUsage: { used: number } | null;
                      state: "draft" | "created" | "ready";
                      title: string;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A knowledge base and its current state.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/build": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: { "Idempotency-Key"?: string };
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "202": {
                    content: { "application/json": { jobId: string } };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: { "Idempotency-Key"?: string };
              path: { apiVersion: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "202": {
                  content: { "application/json": { jobId: string } };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Start a knowledge base build

      Queues a build over the knowledge base's current sources and returns a job ID immediately. If a build is already running, the response returns that build's job ID instead of starting a second build. A draft can't be built: the request returns 409 with code knowledgeBaseIsDraft.

      • parameters: {
            cookie?: undefined;
            header?: { "Idempotency-Key"?: string };
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: { "Idempotency-Key"?: string }
          • OptionalIdempotency-Key?: string

            A unique value, such as a UUID, that makes retries safe. A retry with the same key and body returns the first response instead of repeating the work.

        • path: { apiVersion: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "202": {
                content: { "application/json": { jobId: string } };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 202: {
              content: { "application/json": { jobId: string } };
              headers: { [name: string]: unknown };
          }

          A queued job that you can poll for progress.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/build/cancel": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: { "application/json": { cancelled: boolean } };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: { "application/json": { cancelled: boolean } };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Cancel a knowledge base build

      Cancels the running build and resets the knowledge base so you can build it again. Returns cancelled: false when no build is running.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: { "application/json": { cancelled: boolean } };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: { "application/json": { cancelled: boolean } };
              headers: { [name: string]: unknown };
          }

          The result of the cancel request.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/documents": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: {
                    cursor?: string;
                    ids?: string;
                    limit?: number;
                    source?: string;
                    state?: "active" | "missing" | "deleted";
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            data: {
                                conversion: | "pending"
                                | "failed"
                                | "converted"
                                | "unsupported"
                                | "oversized";
                                conversionError: string
                                | null;
                                createdAt: string;
                                documentUpdatedAt: string | null;
                                excludedAt: string | null;
                                externalId: string;
                                id: string;
                                lastSeenAt: string;
                                mime: string | null;
                                sizeBytes: number | null;
                                sourceId: string;
                                sourceType: "files" | "web" | "sanity-dataset";
                                state: "active" | "missing" | "deleted";
                                title: string;
                                updatedAt: string;
                                url: string | null;
                            }[];
                            nextCursor: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string };
              query?: {
                  cursor?: string;
                  ids?: string;
                  limit?: number;
                  source?: string;
                  state?: "active" | "missing" | "deleted";
              };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          data: {
                              conversion: | "pending"
                              | "failed"
                              | "converted"
                              | "unsupported"
                              | "oversized";
                              conversionError: string
                              | null;
                              createdAt: string;
                              documentUpdatedAt: string | null;
                              excludedAt: string | null;
                              externalId: string;
                              id: string;
                              lastSeenAt: string;
                              mime: string | null;
                              sizeBytes: number | null;
                              sourceId: string;
                              sourceType: "files" | "web" | "sanity-dataset";
                              state: "active" | "missing" | "deleted";
                              title: string;
                              updatedAt: string;
                              url: string | null;
                          }[];
                          nextCursor: string
                          | null;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      List documents

      Lists the documents in a knowledge base: the pages, dataset documents and files its sources yield, which builds read and cite. Results are cursor-paginated, and you can filter them by source and state.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: {
                cursor?: string;
                ids?: string;
                limit?: number;
                source?: string;
                state?: "active" | "missing" | "deleted";
            };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: {
              cursor?: string;
              ids?: string;
              limit?: number;
              source?: string;
              state?: "active" | "missing" | "deleted";
          }
          • Optionalcursor?: string

            The nextCursor value from the previous page. Omit it to get the first page.

          • Optionalids?: string

            Comma-separated IDs of the documents to return, up to 200, in any state. Use it to look up the documents entry citations point at.

          • Optionallimit?: number

            The maximum number of items to return.

          • Optionalsource?: string

            Return only the documents of this source.

          • Optionalstate?: "active" | "missing" | "deleted"

            Return only documents in this state. Without it, deleted documents are left out.

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        data: {
                            conversion:
                                | "pending"
                                | "failed"
                                | "converted"
                                | "unsupported"
                                | "oversized";
                            conversionError: string
                            | null;
                            createdAt: string;
                            documentUpdatedAt: string | null;
                            excludedAt: string | null;
                            externalId: string;
                            id: string;
                            lastSeenAt: string;
                            mime: string | null;
                            sizeBytes: number | null;
                            sourceId: string;
                            sourceType: "files" | "web" | "sanity-dataset";
                            state: "active" | "missing" | "deleted";
                            title: string;
                            updatedAt: string;
                            url: string | null;
                        }[];
                        nextCursor: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      data: {
                          conversion:
                              | "pending"
                              | "failed"
                              | "converted"
                              | "unsupported"
                              | "oversized";
                          conversionError: string
                          | null;
                          createdAt: string;
                          documentUpdatedAt: string | null;
                          excludedAt: string | null;
                          externalId: string;
                          id: string;
                          lastSeenAt: string;
                          mime: string | null;
                          sizeBytes: number | null;
                          sourceId: string;
                          sourceType: "files" | "web" | "sanity-dataset";
                          state: "active" | "missing" | "deleted";
                          title: string;
                          updatedAt: string;
                          url: string | null;
                      }[];
                      nextCursor: string
                      | null;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A page of documents.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/documents/{documentId}": {
        delete: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "204": {
                    content: { "application/json": null };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            chunks: {
                                headingPath: string[];
                                id: string;
                                lineEnd: number;
                                lineStart: number;
                            }[];
                            conversion: | "pending"
                            | "failed"
                            | "converted"
                            | "unsupported"
                            | "oversized";
                            conversionError: string
                            | null;
                            createdAt: string;
                            documentUpdatedAt: string | null;
                            excludedAt: string | null;
                            externalId: string;
                            id: string;
                            lastSeenAt: string;
                            mime: string | null;
                            sizeBytes: number | null;
                            sourceId: string;
                            sourceType: "files" | "web" | "sanity-dataset";
                            state: "active" | "missing" | "deleted";
                            title: string;
                            updatedAt: string;
                            url: string | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: { content: { "application/json": { state: "active" } } };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            conversion:
                                | "pending"
                                | "failed"
                                | "converted"
                                | "unsupported"
                                | "oversized";
                            conversionError: string
                            | null;
                            createdAt: string;
                            documentUpdatedAt: string | null;
                            excludedAt: string | null;
                            externalId: string;
                            id: string;
                            lastSeenAt: string;
                            mime: string | null;
                            sizeBytes: number | null;
                            sourceId: string;
                            sourceType: "files" | "web" | "sanity-dataset";
                            state: "active" | "missing" | "deleted";
                            title: string;
                            updatedAt: string;
                            url: string | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • delete: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "204": {
                  content: { "application/json": null };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Delete a document

      Deletes a document from its source. A page that is still on the website comes back on the next sync of its source unless the crawl options exclude it. Entries that cite the document stay the same until the next build or refresh, which removes the citations.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; documentId: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • documentId: string

            The document's ID.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "204": {
                content: { "application/json": null };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 204: { content: { "application/json": null }; headers: { [name: string]: unknown } }

          The document was deleted.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          chunks: {
                              headingPath: string[];
                              id: string;
                              lineEnd: number;
                              lineStart: number;
                          }[];
                          conversion: | "pending"
                          | "failed"
                          | "converted"
                          | "unsupported"
                          | "oversized";
                          conversionError: string
                          | null;
                          createdAt: string;
                          documentUpdatedAt: string | null;
                          excludedAt: string | null;
                          externalId: string;
                          id: string;
                          lastSeenAt: string;
                          mime: string | null;
                          sizeBytes: number | null;
                          sourceId: string;
                          sourceType: "files" | "web" | "sanity-dataset";
                          state: "active" | "missing" | "deleted";
                          title: string;
                          updatedAt: string;
                          url: string | null;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get a document

      Returns a document with its conversion status and the chunks of its markdown. Entry citations point at a document's chunks.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; documentId: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • documentId: string

            The document's ID.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        chunks: {
                            headingPath: string[];
                            id: string;
                            lineEnd: number;
                            lineStart: number;
                        }[];
                        conversion: | "pending"
                        | "failed"
                        | "converted"
                        | "unsupported"
                        | "oversized";
                        conversionError: string
                        | null;
                        createdAt: string;
                        documentUpdatedAt: string | null;
                        excludedAt: string | null;
                        externalId: string;
                        id: string;
                        lastSeenAt: string;
                        mime: string | null;
                        sizeBytes: number | null;
                        sourceId: string;
                        sourceType: "files" | "web" | "sanity-dataset";
                        state: "active" | "missing" | "deleted";
                        title: string;
                        updatedAt: string;
                        url: string | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      chunks: {
                          headingPath: string[];
                          id: string;
                          lineEnd: number;
                          lineStart: number;
                      }[];
                      conversion: | "pending"
                      | "failed"
                      | "converted"
                      | "unsupported"
                      | "oversized";
                      conversionError: string
                      | null;
                      createdAt: string;
                      documentUpdatedAt: string | null;
                      excludedAt: string | null;
                      externalId: string;
                      id: string;
                      lastSeenAt: string;
                      mime: string | null;
                      sizeBytes: number | null;
                      sourceId: string;
                      sourceType: "files" | "web" | "sanity-dataset";
                      state: "active" | "missing" | "deleted";
                      title: string;
                      updatedAt: string;
                      url: string | null;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A document with the chunks of its markdown.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • patch: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody: { content: { "application/json": { state: "active" } } };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          conversion:
                              | "pending"
                              | "failed"
                              | "converted"
                              | "unsupported"
                              | "oversized";
                          conversionError: string
                          | null;
                          createdAt: string;
                          documentUpdatedAt: string | null;
                          excludedAt: string | null;
                          externalId: string;
                          id: string;
                          lastSeenAt: string;
                          mime: string | null;
                          sizeBytes: number | null;
                          sourceId: string;
                          sourceType: "files" | "web" | "sanity-dataset";
                          state: "active" | "missing" | "deleted";
                          title: string;
                          updatedAt: string;
                          url: string | null;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Keep a missing document

      Keeps a missing web page in the knowledge base by setting its state back to active. A document that isn't missing returns 409 with code documentInvalidState.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; documentId: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • documentId: string

            The document's ID.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • requestBody: { content: { "application/json": { state: "active" } } }

        The changes to make to a document.

      • responses: {
            "200": {
                content: {
                    "application/json": {
                        conversion:
                            | "pending"
                            | "failed"
                            | "converted"
                            | "unsupported"
                            | "oversized";
                        conversionError: string
                        | null;
                        createdAt: string;
                        documentUpdatedAt: string | null;
                        excludedAt: string | null;
                        externalId: string;
                        id: string;
                        lastSeenAt: string;
                        mime: string | null;
                        sizeBytes: number | null;
                        sourceId: string;
                        sourceType: "files" | "web" | "sanity-dataset";
                        state: "active" | "missing" | "deleted";
                        title: string;
                        updatedAt: string;
                        url: string | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      conversion:
                          | "pending"
                          | "failed"
                          | "converted"
                          | "unsupported"
                          | "oversized";
                      conversionError: string
                      | null;
                      createdAt: string;
                      documentUpdatedAt: string | null;
                      excludedAt: string | null;
                      externalId: string;
                      id: string;
                      lastSeenAt: string;
                      mime: string | null;
                      sizeBytes: number | null;
                      sourceId: string;
                      sourceType: "files" | "web" | "sanity-dataset";
                      state: "active" | "missing" | "deleted";
                      title: string;
                      updatedAt: string;
                      url: string | null;
                  };
              };
              headers: { [name: string]: unknown };
          }

          One page, dataset document or file that a source yields.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/documents/{documentId}/content": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
                query?: {
                    chunk?: string;
                    format?: "json" | "raw" | "markdown" | "plain";
                    lines?: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            chunkId: string
                            | null;
                            content: string;
                            documentId: string;
                            slice: { end: number; start: number };
                            totalLines: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
              query?: {
                  chunk?: string;
                  format?: "json" | "raw" | "markdown" | "plain";
                  lines?: string;
              };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          chunkId: string
                          | null;
                          content: string;
                          documentId: string;
                          slice: { end: number; start: number };
                          totalLines: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get a document's markdown

      Returns the markdown a document converted to: the text builds read, and the line numbers citations use. Set chunk or lines to get part of it, and format to markdown or plain to get the text alone instead of JSON. Until the document is converted, the request returns 409 with code documentNotConverted. With format=raw it returns the document as its source gave it, as an attachment, or 409 with code documentNotStored when the document was too large to keep.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; documentId: string; knowledgeBaseId: string };
            query?: {
                chunk?: string;
                format?: "json" | "raw" | "markdown" | "plain";
                lines?: string;
            };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; documentId: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • documentId: string

            The document's ID.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: {
              chunk?: string;
              format?: "json" | "raw" | "markdown" | "plain";
              lines?: string;
          }
          • Optionalchunk?: string

            Return only this chunk's lines. Citations name the chunk they quote.

          • Optionalformat?: "json" | "raw" | "markdown" | "plain"

            Response format. json (default) returns the markdown with its line numbers. markdown and plain return the markdown alone, ready to pass to a model. raw returns the bytes the source gave, before conversion: the uploaded file, the crawled page, the dataset document as JSON.

          • Optionallines?: string

            Return only these lines, from 1 and inclusive: 10-20, or 10 for line 10 to the end. A range past the end returns up to the last line.

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        chunkId: string | null;
                        content: string;
                        documentId: string;
                        slice: { end: number; start: number };
                        totalLines: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      chunkId: string | null;
                      content: string;
                      documentId: string;
                      slice: { end: number; start: number };
                      totalLines: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A document's markdown, or a range of its lines.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/entries/{entryPath}/rebuild": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; entryPath: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "202": {
                    content: {
                        "application/json": {
                            affectedEntries: { id: string; path: string; title: string }[];
                            jobId: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; entryPath: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "202": {
                  content: {
                      "application/json": {
                          affectedEntries: { id: string; path: string; title: string }[];
                          jobId: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Rebuild an entry from its sources

      Queues a rewrite of the entry at entryPath from its cited sources and the active instructions, and returns a job ID immediately. The response also lists the other entries built from any of the same sources. An instruction applies to every entry built from its sources, so those entries can change too. Returns 422 with code entryDocumentInvalid if the entry document was edited into a shape the API cannot read.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; entryPath: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; entryPath: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • entryPath: string

            The entry's slash-delimited path, such as pricing/plans/free, URL-encoded.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "202": {
                content: {
                    "application/json": {
                        affectedEntries: { id: string; path: string; title: string }[];
                        jobId: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 202: {
              content: {
                  "application/json": {
                      affectedEntries: { id: string; path: string; title: string }[];
                      jobId: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          The job that rebuilds the entry, and the other entries that share its sources.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/instructions": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        rebuildPaths?: string[];
                        scopeDocumentIds: string[];
                        statement: string;
                        verified?: boolean;
                    };
                };
            };
            responses: {
                "201": {
                    content: {
                        "application/json": {
                            instruction: {
                                archivedAt: string
                                | null;
                                archivedReason: string | null;
                                createdAt: string;
                                createdBy: { displayName: string | null; id: string | null } | null;
                                id: string;
                                knowledgeBaseId: string;
                                origin: "conflict" | "human";
                                scopeDocumentIds: string[];
                                sourceIssueId: string | null;
                                statement: string;
                                status: "active" | "archived";
                                updatedAt: string | null;
                                updatedBy: { displayName: string | null; id: string | null } | null;
                            };
                            rebuildJobId: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody: {
              content: {
                  "application/json": {
                      rebuildPaths?: string[];
                      scopeDocumentIds: string[];
                      statement: string;
                      verified?: boolean;
                  };
              };
          };
          responses: {
              "201": {
                  content: {
                      "application/json": {
                          instruction: {
                              archivedAt: string
                              | null;
                              archivedReason: string | null;
                              createdAt: string;
                              createdBy: { displayName: string | null; id: string | null } | null;
                              id: string;
                              knowledgeBaseId: string;
                              origin: "conflict" | "human";
                              scopeDocumentIds: string[];
                              sourceIssueId: string | null;
                              statement: string;
                              status: "active" | "archived";
                              updatedAt: string | null;
                              updatedBy: { displayName: string | null; id: string | null } | null;
                          };
                          rebuildJobId: string
                          | null;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Create an instruction

      Creates a standing instruction for how entries built from its documents are written. Every instruction applies to specific documents, set in scopeDocumentIds. To rebuild entries under the new instruction right away, pass their paths in rebuildPaths. The response includes the rebuild job ID, or null if the rebuild could not start. The instruction is saved either way. After the instruction is saved, a background check files issues for entries that contradict it. If you already checked the instruction for contradictions, set verified to skip the background check. If the requested rebuild does not start, the background check runs even when verified is set.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • requestBody: {
            content: {
                "application/json": {
                    rebuildPaths?: string[];
                    scopeDocumentIds: string[];
                    statement: string;
                    verified?: boolean;
                };
            };
        }

        The instruction to create, and any entries to rebuild under it.

      • responses: {
            "201": {
                content: {
                    "application/json": {
                        instruction: {
                            archivedAt: string | null;
                            archivedReason: string | null;
                            createdAt: string;
                            createdBy: { displayName: string | null; id: string | null } | null;
                            id: string;
                            knowledgeBaseId: string;
                            origin: "conflict" | "human";
                            scopeDocumentIds: string[];
                            sourceIssueId: string | null;
                            statement: string;
                            status: "active" | "archived";
                            updatedAt: string | null;
                            updatedBy: { displayName: string | null; id: string | null } | null;
                        };
                        rebuildJobId: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 201: {
              content: {
                  "application/json": {
                      instruction: {
                          archivedAt: string | null;
                          archivedReason: string | null;
                          createdAt: string;
                          createdBy: { displayName: string | null; id: string | null } | null;
                          id: string;
                          knowledgeBaseId: string;
                          origin: "conflict" | "human";
                          scopeDocumentIds: string[];
                          sourceIssueId: string | null;
                          statement: string;
                          status: "active" | "archived";
                          updatedAt: string | null;
                          updatedBy: { displayName: string | null; id: string | null } | null;
                      };
                      rebuildJobId: string
                      | null;
                  };
              };
              headers: { [name: string]: unknown };
          }

          The created instruction, and the rebuild it started.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/instructions/{instructionId}": {
        delete: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: {
                    apiVersion: string;
                    instructionId: string;
                    knowledgeBaseId: string;
                };
                query?: { rebuild?: "true"
                | "false" };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: { "application/json": { rebuildJobId: string
                    | null } };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: {
                    apiVersion: string;
                    instructionId: string;
                    knowledgeBaseId: string;
                };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        scopeDocumentIds?: string[];
                        statement?: string;
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            archivedAt: string
                            | null;
                            archivedReason: string | null;
                            createdAt: string;
                            createdBy: { displayName: string | null; id: string | null } | null;
                            id: string;
                            knowledgeBaseId: string;
                            origin: "conflict" | "human";
                            scopeDocumentIds: string[];
                            sourceIssueId: string | null;
                            statement: string;
                            status: "active" | "archived";
                            updatedAt: string | null;
                            updatedBy: { displayName: string | null; id: string | null } | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • delete: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: {
                  apiVersion: string;
                  instructionId: string;
                  knowledgeBaseId: string;
              };
              query?: { rebuild?: "true"
              | "false" };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: { "application/json": { rebuildJobId: string
                  | null } };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Delete an instruction

      Deletes the instruction. Builds stop applying it from the next run. Entries already written under it keep their text until they are rebuilt; pass rebuild=true to rebuild every entry built from its documents right away.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: {
                apiVersion: string;
                instructionId: string;
                knowledgeBaseId: string;
            };
            query?: { rebuild?: "true"
            | "false" };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; instructionId: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • instructionId: string

            The instruction's ID.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: { rebuild?: "true" | "false" }
          • Optionalrebuild?: "true" | "false"

            Set to true to rebuild every entry built from the instruction's documents once it is deleted, so pages written under the instruction reflect their documents again. The response returns the rebuild job ID in rebuildJobId.

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: { "application/json": { rebuildJobId: string | null } };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: { "application/json": { rebuildJobId: string | null } };
              headers: { [name: string]: unknown };
          }

          The rebuild the delete started, if any.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • patch: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: {
                  apiVersion: string;
                  instructionId: string;
                  knowledgeBaseId: string;
              };
              query?: undefined;
          };
          requestBody: {
              content: {
                  "application/json": {
                      scopeDocumentIds?: string[];
                      statement?: string;
                  };
              };
          };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          archivedAt: string
                          | null;
                          archivedReason: string | null;
                          createdAt: string;
                          createdBy: { displayName: string | null; id: string | null } | null;
                          id: string;
                          knowledgeBaseId: string;
                          origin: "conflict" | "human";
                          scopeDocumentIds: string[];
                          sourceIssueId: string | null;
                          statement: string;
                          status: "active" | "archived";
                          updatedAt: string | null;
                          updatedBy: { displayName: string | null; id: string | null } | null;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Update an instruction

      Updates the instruction's statement or documents. The change applies from the next build. Any update also reactivates an archived instruction and ties it to the current content of its documents.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: {
                apiVersion: string;
                instructionId: string;
                knowledgeBaseId: string;
            };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; instructionId: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • instructionId: string

            The instruction's ID.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • requestBody: {
            content: {
                "application/json": { scopeDocumentIds?: string[]; statement?: string };
            };
        }

        The changes to make to an instruction. Set statement, scopeDocumentIds, or both. Any update also reactivates an archived instruction.

      • responses: {
            "200": {
                content: {
                    "application/json": {
                        archivedAt: string | null;
                        archivedReason: string | null;
                        createdAt: string;
                        createdBy: { displayName: string | null; id: string | null } | null;
                        id: string;
                        knowledgeBaseId: string;
                        origin: "conflict" | "human";
                        scopeDocumentIds: string[];
                        sourceIssueId: string | null;
                        statement: string;
                        status: "active" | "archived";
                        updatedAt: string | null;
                        updatedBy: { displayName: string | null; id: string | null } | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      archivedAt: string | null;
                      archivedReason: string | null;
                      createdAt: string;
                      createdBy: { displayName: string | null; id: string | null } | null;
                      id: string;
                      knowledgeBaseId: string;
                      origin: "conflict" | "human";
                      scopeDocumentIds: string[];
                      sourceIssueId: string | null;
                      statement: string;
                      status: "active" | "archived";
                      updatedAt: string | null;
                      updatedBy: { displayName: string | null; id: string | null } | null;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A standing instruction that shapes how entries built from its documents are written.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/dismiss": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            content: | {
                                claimKey: string;
                                context?: string;
                                issue: string;
                                kind: "conflict";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                sides: {
                                    authority?: (...) | (...) | (...) | (...);
                                    citations?: (...) | (...);
                                    claim: string;
                                    documentIds?: (...) | (...);
                                    entryPaths?: (...) | (...);
                                    value?: (...) | (...);
                                    where?: (...) | (...);
                                }[];
                                suggested?: number;
                                suggestedFix: string;
                            }
                            | {
                                citedDocumentIds?: string[];
                                claimKey?: string;
                                involvedScopes?: string[];
                                issue: string;
                                kind: "update_required";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                suggestedFix: string;
                            };
                            createdAt: string;
                            id: string;
                            knowledgeBaseId: string;
                            resolution: number
                            | null;
                            resolvedAt: string | null;
                            resolvedBy: { id: string; kind: "user" | "robot" } | null;
                            status: "open" | "accepted" | "rejected";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          content: | {
                              claimKey: string;
                              context?: string;
                              issue: string;
                              kind: "conflict";
                              scopePath: string;
                              severity: "critical"
                              | "suggestion";
                              sides: {
                                  authority?: (...) | (...) | (...) | (...);
                                  citations?: (...) | (...);
                                  claim: string;
                                  documentIds?: (...) | (...);
                                  entryPaths?: (...) | (...);
                                  value?: (...) | (...);
                                  where?: (...) | (...);
                              }[];
                              suggested?: number;
                              suggestedFix: string;
                          }
                          | {
                              citedDocumentIds?: string[];
                              claimKey?: string;
                              involvedScopes?: string[];
                              issue: string;
                              kind: "update_required";
                              scopePath: string;
                              severity: "critical"
                              | "suggestion";
                              suggestedFix: string;
                          };
                          createdAt: string;
                          id: string;
                          knowledgeBaseId: string;
                          resolution: number
                          | null;
                          resolvedAt: string | null;
                          resolvedBy: { id: string; kind: "user" | "robot" } | null;
                          status: "open" | "accepted" | "rejected";
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Dismiss an issue

      Marks the issue as rejected. If the issue already left triage, the request returns it unchanged. Returns 422 with code issueDocumentInvalid if the issue document was edited into a shape the API cannot verify. Returns 409 with code issueTransitionConflict if another change to the issue happened at the same time. You can safely retry a 409.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; issueId: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • issueId: string

            The issue's document ID.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        content:
                            | {
                                claimKey: string;
                                context?: string;
                                issue: string;
                                kind: "conflict";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                sides: {
                                    authority?: (...) | (...) | (...) | (...);
                                    citations?: (...) | (...);
                                    claim: string;
                                    documentIds?: (...) | (...);
                                    entryPaths?: (...) | (...);
                                    value?: (...) | (...);
                                    where?: (...) | (...);
                                }[];
                                suggested?: number;
                                suggestedFix: string;
                            }
                            | {
                                citedDocumentIds?: string[];
                                claimKey?: string;
                                involvedScopes?: string[];
                                issue: string;
                                kind: "update_required";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                suggestedFix: string;
                            };
                        createdAt: string;
                        id: string;
                        knowledgeBaseId: string;
                        resolution: number
                        | null;
                        resolvedAt: string | null;
                        resolvedBy: { id: string; kind: "user" | "robot" } | null;
                        status: "open" | "accepted" | "rejected";
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      content:
                          | {
                              claimKey: string;
                              context?: string;
                              issue: string;
                              kind: "conflict";
                              scopePath: string;
                              severity: "critical"
                              | "suggestion";
                              sides: {
                                  authority?: (...) | (...) | (...) | (...);
                                  citations?: (...) | (...);
                                  claim: string;
                                  documentIds?: (...) | (...);
                                  entryPaths?: (...) | (...);
                                  value?: (...) | (...);
                                  where?: (...) | (...);
                              }[];
                              suggested?: number;
                              suggestedFix: string;
                          }
                          | {
                              citedDocumentIds?: string[];
                              claimKey?: string;
                              involvedScopes?: string[];
                              issue: string;
                              kind: "update_required";
                              scopePath: string;
                              severity: "critical"
                              | "suggestion";
                              suggestedFix: string;
                          };
                      createdAt: string;
                      id: string;
                      knowledgeBaseId: string;
                      resolution: number
                      | null;
                      resolvedAt: string | null;
                      resolvedBy: { id: string; kind: "user" | "robot" } | null;
                      status: "open" | "accepted" | "rejected";
                  };
              };
              headers: { [name: string]: unknown };
          }

          An issue found in a knowledge base, and its triage status.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/reopen": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            content: | {
                                claimKey: string;
                                context?: string;
                                issue: string;
                                kind: "conflict";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                sides: {
                                    authority?: (...) | (...) | (...) | (...);
                                    citations?: (...) | (...);
                                    claim: string;
                                    documentIds?: (...) | (...);
                                    entryPaths?: (...) | (...);
                                    value?: (...) | (...);
                                    where?: (...) | (...);
                                }[];
                                suggested?: number;
                                suggestedFix: string;
                            }
                            | {
                                citedDocumentIds?: string[];
                                claimKey?: string;
                                involvedScopes?: string[];
                                issue: string;
                                kind: "update_required";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                suggestedFix: string;
                            };
                            createdAt: string;
                            id: string;
                            knowledgeBaseId: string;
                            resolution: number
                            | null;
                            resolvedAt: string | null;
                            resolvedBy: { id: string; kind: "user" | "robot" } | null;
                            status: "open" | "accepted" | "rejected";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          content: | {
                              claimKey: string;
                              context?: string;
                              issue: string;
                              kind: "conflict";
                              scopePath: string;
                              severity: "critical"
                              | "suggestion";
                              sides: {
                                  authority?: (...) | (...) | (...) | (...);
                                  citations?: (...) | (...);
                                  claim: string;
                                  documentIds?: (...) | (...);
                                  entryPaths?: (...) | (...);
                                  value?: (...) | (...);
                                  where?: (...) | (...);
                              }[];
                              suggested?: number;
                              suggestedFix: string;
                          }
                          | {
                              citedDocumentIds?: string[];
                              claimKey?: string;
                              involvedScopes?: string[];
                              issue: string;
                              kind: "update_required";
                              scopePath: string;
                              severity: "critical"
                              | "suggestion";
                              suggestedFix: string;
                          };
                          createdAt: string;
                          id: string;
                          knowledgeBaseId: string;
                          resolution: number
                          | null;
                          resolvedAt: string | null;
                          resolvedBy: { id: string; kind: "user" | "robot" } | null;
                          status: "open" | "accepted" | "rejected";
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Reopen an accepted conflict

      Returns an accepted conflict issue to triage, clears its resolution, and deletes the instruction the resolution created. Reopening an open or dismissed conflict returns it unchanged. Other issue types return 422 with code issueNotResolvable.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; issueId: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • issueId: string

            The issue's document ID.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        content:
                            | {
                                claimKey: string;
                                context?: string;
                                issue: string;
                                kind: "conflict";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                sides: {
                                    authority?: (...) | (...) | (...) | (...);
                                    citations?: (...) | (...);
                                    claim: string;
                                    documentIds?: (...) | (...);
                                    entryPaths?: (...) | (...);
                                    value?: (...) | (...);
                                    where?: (...) | (...);
                                }[];
                                suggested?: number;
                                suggestedFix: string;
                            }
                            | {
                                citedDocumentIds?: string[];
                                claimKey?: string;
                                involvedScopes?: string[];
                                issue: string;
                                kind: "update_required";
                                scopePath: string;
                                severity: "critical"
                                | "suggestion";
                                suggestedFix: string;
                            };
                        createdAt: string;
                        id: string;
                        knowledgeBaseId: string;
                        resolution: number
                        | null;
                        resolvedAt: string | null;
                        resolvedBy: { id: string; kind: "user" | "robot" } | null;
                        status: "open" | "accepted" | "rejected";
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      content:
                          | {
                              claimKey: string;
                              context?: string;
                              issue: string;
                              kind: "conflict";
                              scopePath: string;
                              severity: "critical"
                              | "suggestion";
                              sides: {
                                  authority?: (...) | (...) | (...) | (...);
                                  citations?: (...) | (...);
                                  claim: string;
                                  documentIds?: (...) | (...);
                                  entryPaths?: (...) | (...);
                                  value?: (...) | (...);
                                  where?: (...) | (...);
                              }[];
                              suggested?: number;
                              suggestedFix: string;
                          }
                          | {
                              citedDocumentIds?: string[];
                              claimKey?: string;
                              involvedScopes?: string[];
                              issue: string;
                              kind: "update_required";
                              scopePath: string;
                              severity: "critical"
                              | "suggestion";
                              suggestedFix: string;
                          };
                      createdAt: string;
                      id: string;
                      knowledgeBaseId: string;
                      resolution: number
                      | null;
                      resolvedAt: string | null;
                      resolvedBy: { id: string; kind: "user" | "robot" } | null;
                      status: "open" | "accepted" | "rejected";
                  };
              };
              headers: { [name: string]: unknown };
          }

          An issue found in a knowledge base, and its triage status.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/resolve": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: { content: { "application/json": { resolution: number } } };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            issue: {
                                content:
                                    | {
                                        claimKey: string;
                                        context?: string;
                                        issue: string;
                                        kind: "conflict";
                                        scopePath: string;
                                        severity: "critical"
                                        | "suggestion";
                                        sides: {
                                            authority?: ...;
                                            citations?: ...;
                                            claim: ...;
                                            documentIds?: ...;
                                            entryPaths?: ...;
                                            value?: ...;
                                            where?: ...;
                                        }[];
                                        suggested?: number;
                                        suggestedFix: string;
                                    }
                                    | {
                                        citedDocumentIds?: (...)[];
                                        claimKey?: string;
                                        involvedScopes?: (...)[];
                                        issue: string;
                                        kind: "update_required";
                                        scopePath: string;
                                        severity: "critical" | "suggestion";
                                        suggestedFix: string;
                                    };
                                createdAt: string;
                                id: string;
                                knowledgeBaseId: string;
                                resolution: number
                                | null;
                                resolvedAt: string | null;
                                resolvedBy: { id: string; kind: "user" | "robot" } | null;
                                status: "open" | "accepted" | "rejected";
                            };
                            jobId: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody: { content: { "application/json": { resolution: number } } };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          issue: {
                              content:
                                  | {
                                      claimKey: string;
                                      context?: string;
                                      issue: string;
                                      kind: "conflict";
                                      scopePath: string;
                                      severity: "critical"
                                      | "suggestion";
                                      sides: {
                                          authority?: ...;
                                          citations?: ...;
                                          claim: ...;
                                          documentIds?: ...;
                                          entryPaths?: ...;
                                          value?: ...;
                                          where?: ...;
                                      }[];
                                      suggested?: number;
                                      suggestedFix: string;
                                  }
                                  | {
                                      citedDocumentIds?: (...)[];
                                      claimKey?: string;
                                      involvedScopes?: (...)[];
                                      issue: string;
                                      kind: "update_required";
                                      scopePath: string;
                                      severity: "critical" | "suggestion";
                                      suggestedFix: string;
                                  };
                              createdAt: string;
                              id: string;
                              knowledgeBaseId: string;
                              resolution: number
                              | null;
                              resolvedAt: string | null;
                              resolvedBy: { id: string; kind: "user" | "robot" } | null;
                              status: "open" | "accepted" | "rejected";
                          };
                          jobId: string
                          | null;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Resolve a conflict issue

      Resolves a conflict issue by choosing one of its sides. Set resolution to the index of a side in content.sides. For a conflict on a single entry, index 0 is the entry's current content, so choosing it keeps the entry as it is. Choosing any other side rewrites the entry, and the returned jobId tracks the rewrite. The decision becomes a standing instruction for every future build, and resolvedBy records who made it. To change a decision, resolve the accepted conflict again. Other issue types, dismissed conflicts, and out-of-range indexes return 422 with code issueNotResolvable.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; issueId: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; issueId: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • issueId: string

            The issue's document ID.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • requestBody: { content: { "application/json": { resolution: number } } }
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        issue: {
                            content:
                                | {
                                    claimKey: string;
                                    context?: string;
                                    issue: string;
                                    kind: "conflict";
                                    scopePath: string;
                                    severity: "critical"
                                    | "suggestion";
                                    sides: {
                                        authority?: ...;
                                        citations?: ...;
                                        claim: ...;
                                        documentIds?: ...;
                                        entryPaths?: ...;
                                        value?: ...;
                                        where?: ...;
                                    }[];
                                    suggested?: number;
                                    suggestedFix: string;
                                }
                                | {
                                    citedDocumentIds?: (...)[];
                                    claimKey?: string;
                                    involvedScopes?: (...)[];
                                    issue: string;
                                    kind: "update_required";
                                    scopePath: string;
                                    severity: "critical" | "suggestion";
                                    suggestedFix: string;
                                };
                            createdAt: string;
                            id: string;
                            knowledgeBaseId: string;
                            resolution: number
                            | null;
                            resolvedAt: string | null;
                            resolvedBy: { id: string; kind: "user" | "robot" } | null;
                            status: "open" | "accepted" | "rejected";
                        };
                        jobId: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      issue: {
                          content:
                              | {
                                  claimKey: string;
                                  context?: string;
                                  issue: string;
                                  kind: "conflict";
                                  scopePath: string;
                                  severity: "critical"
                                  | "suggestion";
                                  sides: {
                                      authority?: ...;
                                      citations?: ...;
                                      claim: ...;
                                      documentIds?: ...;
                                      entryPaths?: ...;
                                      value?: ...;
                                      where?: ...;
                                  }[];
                                  suggested?: number;
                                  suggestedFix: string;
                              }
                              | {
                                  citedDocumentIds?: (...)[];
                                  claimKey?: string;
                                  involvedScopes?: (...)[];
                                  issue: string;
                                  kind: "update_required";
                                  scopePath: string;
                                  severity: "critical" | "suggestion";
                                  suggestedFix: string;
                              };
                          createdAt: string;
                          id: string;
                          knowledgeBaseId: string;
                          resolution: number
                          | null;
                          resolvedAt: string | null;
                          resolvedBy: { id: string; kind: "user" | "robot" } | null;
                          status: "open" | "accepted" | "rejected";
                      };
                      jobId: string
                      | null;
                  };
              };
              headers: { [name: string]: unknown };
          }

          The resolved issue, plus the job that rewrites the entry when the decision changes it.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/issues/apply": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: { content: { "application/json": { issueIds: string[] } } };
            responses: {
                "202": {
                    content: { "application/json": { jobId: string } };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody: { content: { "application/json": { issueIds: string[] } } };
          responses: {
              "202": {
                  content: { "application/json": { jobId: string } };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Accept and apply issues

      Accepts the issues in issueIds, then queues a job that applies them, rewrites the affected entries, and saves a new revision. Returns a job ID. IDs of issues that no longer exist are skipped. Returns 409 with code issueNotAutoApplicable, and accepts none of the issues, if any of them cannot be applied: a conflict (resolve it with POST .../issues/{issueId}/resolve), or an update_required issue whose scopePath is * or names an entry that no longer exists. Dismiss those instead.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • requestBody: { content: { "application/json": { issueIds: string[] } } }
      • responses: {
            "202": {
                content: { "application/json": { jobId: string } };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 202: {
              content: { "application/json": { jobId: string } };
              headers: { [name: string]: unknown };
          }

          A queued job that you can poll for progress.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/jobs/{jobId}": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; jobId: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": | {
                            completedAt: string
                            | null;
                            error?: string | null;
                            id: string;
                            kind: "build";
                            knowledgeBaseId: string;
                            result?: {
                                criticalIssueCount: number;
                                entryCount: number;
                                issuesCreated: number;
                                revisionId: string;
                            };
                            startedAt: string
                            | null;
                            status:
                                | "pending"
                                | "running"
                                | "failed"
                                | "queued"
                                | "succeeded"
                                | "cancelled";
                        }
                        | {
                            completedAt: string
                            | null;
                            error?: string | null;
                            id: string;
                            kind: "update";
                            knowledgeBaseId: string;
                            result?: { entriesRewritten: number; revisionId: string | null };
                            startedAt: string | null;
                            status:
                                | "pending"
                                | "running"
                                | "failed"
                                | "queued"
                                | "succeeded"
                                | "cancelled";
                        }
                        | {
                            completedAt: string
                            | null;
                            error?: string | null;
                            id: string;
                            kind: "sync";
                            knowledgeBaseId: string;
                            result?: {
                                heldDeletions: number | null;
                                sourceId: string;
                                status: "completed" | "held";
                                syncId: string;
                            };
                            startedAt: string
                            | null;
                            status:
                                | "pending"
                                | "running"
                                | "failed"
                                | "queued"
                                | "succeeded"
                                | "cancelled";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; jobId: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": | {
                          completedAt: string
                          | null;
                          error?: string | null;
                          id: string;
                          kind: "build";
                          knowledgeBaseId: string;
                          result?: {
                              criticalIssueCount: number;
                              entryCount: number;
                              issuesCreated: number;
                              revisionId: string;
                          };
                          startedAt: string
                          | null;
                          status:
                              | "pending"
                              | "running"
                              | "failed"
                              | "queued"
                              | "succeeded"
                              | "cancelled";
                      }
                      | {
                          completedAt: string
                          | null;
                          error?: string | null;
                          id: string;
                          kind: "update";
                          knowledgeBaseId: string;
                          result?: { entriesRewritten: number; revisionId: string | null };
                          startedAt: string | null;
                          status:
                              | "pending"
                              | "running"
                              | "failed"
                              | "queued"
                              | "succeeded"
                              | "cancelled";
                      }
                      | {
                          completedAt: string
                          | null;
                          error?: string | null;
                          id: string;
                          kind: "sync";
                          knowledgeBaseId: string;
                          result?: {
                              heldDeletions: number | null;
                              sourceId: string;
                              status: "completed" | "held";
                              syncId: string;
                          };
                          startedAt: string
                          | null;
                          status:
                              | "pending"
                              | "running"
                              | "failed"
                              | "queued"
                              | "succeeded"
                              | "cancelled";
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get a job

      Returns the status of a background job, such as a build, sync, or refresh. The endpoint that starts the work returns the job ID.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; jobId: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; jobId: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • jobId: string

            The job ID returned by the endpoint that started the work.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json":
                        | {
                            completedAt: string
                            | null;
                            error?: string | null;
                            id: string;
                            kind: "build";
                            knowledgeBaseId: string;
                            result?: {
                                criticalIssueCount: number;
                                entryCount: number;
                                issuesCreated: number;
                                revisionId: string;
                            };
                            startedAt: string
                            | null;
                            status:
                                | "pending"
                                | "running"
                                | "failed"
                                | "queued"
                                | "succeeded"
                                | "cancelled";
                        }
                        | {
                            completedAt: string
                            | null;
                            error?: string | null;
                            id: string;
                            kind: "update";
                            knowledgeBaseId: string;
                            result?: { entriesRewritten: number; revisionId: string | null };
                            startedAt: string | null;
                            status:
                                | "pending"
                                | "running"
                                | "failed"
                                | "queued"
                                | "succeeded"
                                | "cancelled";
                        }
                        | {
                            completedAt: string
                            | null;
                            error?: string | null;
                            id: string;
                            kind: "sync";
                            knowledgeBaseId: string;
                            result?: {
                                heldDeletions: number | null;
                                sourceId: string;
                                status: "completed" | "held";
                                syncId: string;
                            };
                            startedAt: string
                            | null;
                            status:
                                | "pending"
                                | "running"
                                | "failed"
                                | "queued"
                                | "succeeded"
                                | "cancelled";
                        };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json":
                      | {
                          completedAt: string
                          | null;
                          error?: string | null;
                          id: string;
                          kind: "build";
                          knowledgeBaseId: string;
                          result?: {
                              criticalIssueCount: number;
                              entryCount: number;
                              issuesCreated: number;
                              revisionId: string;
                          };
                          startedAt: string
                          | null;
                          status:
                              | "pending"
                              | "running"
                              | "failed"
                              | "queued"
                              | "succeeded"
                              | "cancelled";
                      }
                      | {
                          completedAt: string
                          | null;
                          error?: string | null;
                          id: string;
                          kind: "update";
                          knowledgeBaseId: string;
                          result?: { entriesRewritten: number; revisionId: string | null };
                          startedAt: string | null;
                          status:
                              | "pending"
                              | "running"
                              | "failed"
                              | "queued"
                              | "succeeded"
                              | "cancelled";
                      }
                      | {
                          completedAt: string
                          | null;
                          error?: string | null;
                          id: string;
                          kind: "sync";
                          knowledgeBaseId: string;
                          result?: {
                              heldDeletions: number | null;
                              sourceId: string;
                              status: "completed" | "held";
                              syncId: string;
                          };
                          startedAt: string
                          | null;
                          status:
                              | "pending"
                              | "running"
                              | "failed"
                              | "queued"
                              | "succeeded"
                              | "cancelled";
                      };
              };
              headers: { [name: string]: unknown };
          }

          A background job, such as a build, an update or a sync, and its status. kind says which, and determines the shape of result.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: { cursor?: string; limit?: number };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            data: (
                                | {
                                    chunkCount: number;
                                    convertedDocumentCount: number;
                                    crawlOptions: {
                                        excludePaths?: (...)
                                        | (...);
                                        ignoreQueryParameters?: (...) | (...) | (...);
                                        includePaths?: (...) | (...);
                                        maxDepth?: (...) | (...);
                                        pageLimit?: (...) | (...);
                                        sitemapOnly?: (...) | (...) | (...);
                                    };
                                    createdAt: string;
                                    documentCount: number;
                                    failedDocumentCount: number;
                                    id: string;
                                    knowledgeBaseId: string;
                                    lastSyncedAt: string
                                    | null;
                                    latestSync:
                                        | {
                                            createdAt: ...;
                                            documentsDeleted: ...;
                                            documentsMissing: ...;
                                            documentsSeen: ...;
                                            documentsUnchanged: ...;
                                            documentsUpserted: ...;
                                            error: ...;
                                            finishedAt: ...;
                                            heldDeletions: ...;
                                            id: ...;
                                            mode: ...;
                                            partialReason: ...;
                                            sourceId: ...;
                                            status: ...;
                                            trigger: ...;
                                        }
                                        | null;
                                    skippedDocumentCount: number;
                                    syncFrequency: "weekly"
                                    | "monthly"
                                    | null;
                                    title: string;
                                    type: "web";
                                    updatedAt: string;
                                    url: string;
                                }
                                | {
                                    chunkCount: number;
                                    convertedDocumentCount: number;
                                    createdAt: string;
                                    documentCount: number;
                                    failedDocumentCount: number;
                                    id: string;
                                    knowledgeBaseId: string;
                                    lastSyncedAt: string
                                    | null;
                                    latestSync:
                                        | {
                                            createdAt: ...;
                                            documentsDeleted: ...;
                                            documentsMissing: ...;
                                            documentsSeen: ...;
                                            documentsUnchanged: ...;
                                            documentsUpserted: ...;
                                            error: ...;
                                            finishedAt: ...;
                                            heldDeletions: ...;
                                            id: ...;
                                            mode: ...;
                                            partialReason: ...;
                                            sourceId: ...;
                                            status: ...;
                                            trigger: ...;
                                        }
                                        | null;
                                    query: string;
                                    sanityDatasetId: string;
                                    sanityProjectId: string;
                                    skippedDocumentCount: number;
                                    syncFrequency: "weekly"
                                    | "monthly"
                                    | null;
                                    title: string;
                                    type: "sanity-dataset";
                                    updatedAt: string;
                                }
                                | {
                                    chunkCount: number;
                                    convertedDocumentCount: number;
                                    createdAt: string;
                                    documentCount: number;
                                    failedDocumentCount: number;
                                    filename: string
                                    | null;
                                    id: string;
                                    knowledgeBaseId: string;
                                    lastSyncedAt: string | null;
                                    latestSync:
                                        | {
                                            createdAt: ...;
                                            documentsDeleted: ...;
                                            documentsMissing: ...;
                                            documentsSeen: ...;
                                            documentsUnchanged: ...;
                                            documentsUpserted: ...;
                                            error: ...;
                                            finishedAt: ...;
                                            heldDeletions: ...;
                                            id: ...;
                                            mode: ...;
                                            partialReason: ...;
                                            sourceId: ...;
                                            status: ...;
                                            trigger: ...;
                                        }
                                        | null;
                                    sizeBytes: number
                                    | null;
                                    skippedDocumentCount: number;
                                    title: string;
                                    type: "files";
                                    updatedAt: string;
                                }
                            )[];
                            nextCursor: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: { "Idempotency-Key"?: string };
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": | {
                        crawlOptions?: {
                            excludePaths?: string[];
                            ignoreQueryParameters?: boolean;
                            includePaths?: string[];
                            maxDepth?: number;
                            pageLimit?: number;
                            sitemapOnly?: boolean;
                        };
                        dryRun?: boolean;
                        type: "web";
                        url: string;
                    }
                    | {
                        query: string;
                        sanityDatasetId: string;
                        sanityProjectId: string;
                        type: "sanity-dataset";
                    }
                    | {
                        content?: string;
                        contentType?: "text/markdown"
                        | "text/plain";
                        title: string;
                        type: "files";
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            groups: { count: number; prefix: string }[];
                            otherCount: number;
                            totalPages: number;
                            truncated: boolean;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "201": {
                    content: {
                        "application/json": | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            crawlOptions: {
                                excludePaths?: string[];
                                ignoreQueryParameters?: boolean;
                                includePaths?: string[];
                                maxDepth?: number;
                                pageLimit?: number;
                                sitemapOnly?: boolean;
                            };
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "web";
                            updatedAt: string;
                            url: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            query: string;
                            sanityDatasetId: string;
                            sanityProjectId: string;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "sanity-dataset";
                            updatedAt: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            filename: string
                            | null;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            sizeBytes: number
                            | null;
                            skippedDocumentCount: number;
                            title: string;
                            type: "files";
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string };
              query?: { cursor?: string; limit?: number };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          data: (
                              | {
                                  chunkCount: number;
                                  convertedDocumentCount: number;
                                  crawlOptions: {
                                      excludePaths?: (...)
                                      | (...);
                                      ignoreQueryParameters?: (...) | (...) | (...);
                                      includePaths?: (...) | (...);
                                      maxDepth?: (...) | (...);
                                      pageLimit?: (...) | (...);
                                      sitemapOnly?: (...) | (...) | (...);
                                  };
                                  createdAt: string;
                                  documentCount: number;
                                  failedDocumentCount: number;
                                  id: string;
                                  knowledgeBaseId: string;
                                  lastSyncedAt: string
                                  | null;
                                  latestSync:
                                      | {
                                          createdAt: ...;
                                          documentsDeleted: ...;
                                          documentsMissing: ...;
                                          documentsSeen: ...;
                                          documentsUnchanged: ...;
                                          documentsUpserted: ...;
                                          error: ...;
                                          finishedAt: ...;
                                          heldDeletions: ...;
                                          id: ...;
                                          mode: ...;
                                          partialReason: ...;
                                          sourceId: ...;
                                          status: ...;
                                          trigger: ...;
                                      }
                                      | null;
                                  skippedDocumentCount: number;
                                  syncFrequency: "weekly"
                                  | "monthly"
                                  | null;
                                  title: string;
                                  type: "web";
                                  updatedAt: string;
                                  url: string;
                              }
                              | {
                                  chunkCount: number;
                                  convertedDocumentCount: number;
                                  createdAt: string;
                                  documentCount: number;
                                  failedDocumentCount: number;
                                  id: string;
                                  knowledgeBaseId: string;
                                  lastSyncedAt: string
                                  | null;
                                  latestSync:
                                      | {
                                          createdAt: ...;
                                          documentsDeleted: ...;
                                          documentsMissing: ...;
                                          documentsSeen: ...;
                                          documentsUnchanged: ...;
                                          documentsUpserted: ...;
                                          error: ...;
                                          finishedAt: ...;
                                          heldDeletions: ...;
                                          id: ...;
                                          mode: ...;
                                          partialReason: ...;
                                          sourceId: ...;
                                          status: ...;
                                          trigger: ...;
                                      }
                                      | null;
                                  query: string;
                                  sanityDatasetId: string;
                                  sanityProjectId: string;
                                  skippedDocumentCount: number;
                                  syncFrequency: "weekly"
                                  | "monthly"
                                  | null;
                                  title: string;
                                  type: "sanity-dataset";
                                  updatedAt: string;
                              }
                              | {
                                  chunkCount: number;
                                  convertedDocumentCount: number;
                                  createdAt: string;
                                  documentCount: number;
                                  failedDocumentCount: number;
                                  filename: string
                                  | null;
                                  id: string;
                                  knowledgeBaseId: string;
                                  lastSyncedAt: string | null;
                                  latestSync:
                                      | {
                                          createdAt: ...;
                                          documentsDeleted: ...;
                                          documentsMissing: ...;
                                          documentsSeen: ...;
                                          documentsUnchanged: ...;
                                          documentsUpserted: ...;
                                          error: ...;
                                          finishedAt: ...;
                                          heldDeletions: ...;
                                          id: ...;
                                          mode: ...;
                                          partialReason: ...;
                                          sourceId: ...;
                                          status: ...;
                                          trigger: ...;
                                      }
                                      | null;
                                  sizeBytes: number
                                  | null;
                                  skippedDocumentCount: number;
                                  title: string;
                                  type: "files";
                                  updatedAt: string;
                              }
                          )[];
                          nextCursor: string
                          | null;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      List sources

      Lists the sources of a knowledge base: the websites, Sanity datasets and files its documents come from, each with its document counts and its latest sync. Results are cursor-paginated.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: { cursor?: string; limit?: number };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: { cursor?: string; limit?: number }
          • Optionalcursor?: string

            The nextCursor value from the previous page. Omit it to get the first page.

          • Optionallimit?: number

            The maximum number of items to return.

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        data: (
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                crawlOptions: {
                                    excludePaths?: (...)
                                    | (...);
                                    ignoreQueryParameters?: (...) | (...) | (...);
                                    includePaths?: (...) | (...);
                                    maxDepth?: (...) | (...);
                                    pageLimit?: (...) | (...);
                                    sitemapOnly?: (...) | (...) | (...);
                                };
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string
                                | null;
                                latestSync:
                                    | {
                                        createdAt: ...;
                                        documentsDeleted: ...;
                                        documentsMissing: ...;
                                        documentsSeen: ...;
                                        documentsUnchanged: ...;
                                        documentsUpserted: ...;
                                        error: ...;
                                        finishedAt: ...;
                                        heldDeletions: ...;
                                        id: ...;
                                        mode: ...;
                                        partialReason: ...;
                                        sourceId: ...;
                                        status: ...;
                                        trigger: ...;
                                    }
                                    | null;
                                skippedDocumentCount: number;
                                syncFrequency: "weekly"
                                | "monthly"
                                | null;
                                title: string;
                                type: "web";
                                updatedAt: string;
                                url: string;
                            }
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string
                                | null;
                                latestSync:
                                    | {
                                        createdAt: ...;
                                        documentsDeleted: ...;
                                        documentsMissing: ...;
                                        documentsSeen: ...;
                                        documentsUnchanged: ...;
                                        documentsUpserted: ...;
                                        error: ...;
                                        finishedAt: ...;
                                        heldDeletions: ...;
                                        id: ...;
                                        mode: ...;
                                        partialReason: ...;
                                        sourceId: ...;
                                        status: ...;
                                        trigger: ...;
                                    }
                                    | null;
                                query: string;
                                sanityDatasetId: string;
                                sanityProjectId: string;
                                skippedDocumentCount: number;
                                syncFrequency: "weekly"
                                | "monthly"
                                | null;
                                title: string;
                                type: "sanity-dataset";
                                updatedAt: string;
                            }
                            | {
                                chunkCount: number;
                                convertedDocumentCount: number;
                                createdAt: string;
                                documentCount: number;
                                failedDocumentCount: number;
                                filename: string
                                | null;
                                id: string;
                                knowledgeBaseId: string;
                                lastSyncedAt: string | null;
                                latestSync:
                                    | {
                                        createdAt: ...;
                                        documentsDeleted: ...;
                                        documentsMissing: ...;
                                        documentsSeen: ...;
                                        documentsUnchanged: ...;
                                        documentsUpserted: ...;
                                        error: ...;
                                        finishedAt: ...;
                                        heldDeletions: ...;
                                        id: ...;
                                        mode: ...;
                                        partialReason: ...;
                                        sourceId: ...;
                                        status: ...;
                                        trigger: ...;
                                    }
                                    | null;
                                sizeBytes: number
                                | null;
                                skippedDocumentCount: number;
                                title: string;
                                type: "files";
                                updatedAt: string;
                            }
                        )[];
                        nextCursor: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      data: (
                          | {
                              chunkCount: number;
                              convertedDocumentCount: number;
                              crawlOptions: {
                                  excludePaths?: (...)
                                  | (...);
                                  ignoreQueryParameters?: (...) | (...) | (...);
                                  includePaths?: (...) | (...);
                                  maxDepth?: (...) | (...);
                                  pageLimit?: (...) | (...);
                                  sitemapOnly?: (...) | (...) | (...);
                              };
                              createdAt: string;
                              documentCount: number;
                              failedDocumentCount: number;
                              id: string;
                              knowledgeBaseId: string;
                              lastSyncedAt: string
                              | null;
                              latestSync:
                                  | {
                                      createdAt: ...;
                                      documentsDeleted: ...;
                                      documentsMissing: ...;
                                      documentsSeen: ...;
                                      documentsUnchanged: ...;
                                      documentsUpserted: ...;
                                      error: ...;
                                      finishedAt: ...;
                                      heldDeletions: ...;
                                      id: ...;
                                      mode: ...;
                                      partialReason: ...;
                                      sourceId: ...;
                                      status: ...;
                                      trigger: ...;
                                  }
                                  | null;
                              skippedDocumentCount: number;
                              syncFrequency: "weekly"
                              | "monthly"
                              | null;
                              title: string;
                              type: "web";
                              updatedAt: string;
                              url: string;
                          }
                          | {
                              chunkCount: number;
                              convertedDocumentCount: number;
                              createdAt: string;
                              documentCount: number;
                              failedDocumentCount: number;
                              id: string;
                              knowledgeBaseId: string;
                              lastSyncedAt: string
                              | null;
                              latestSync:
                                  | {
                                      createdAt: ...;
                                      documentsDeleted: ...;
                                      documentsMissing: ...;
                                      documentsSeen: ...;
                                      documentsUnchanged: ...;
                                      documentsUpserted: ...;
                                      error: ...;
                                      finishedAt: ...;
                                      heldDeletions: ...;
                                      id: ...;
                                      mode: ...;
                                      partialReason: ...;
                                      sourceId: ...;
                                      status: ...;
                                      trigger: ...;
                                  }
                                  | null;
                              query: string;
                              sanityDatasetId: string;
                              sanityProjectId: string;
                              skippedDocumentCount: number;
                              syncFrequency: "weekly"
                              | "monthly"
                              | null;
                              title: string;
                              type: "sanity-dataset";
                              updatedAt: string;
                          }
                          | {
                              chunkCount: number;
                              convertedDocumentCount: number;
                              createdAt: string;
                              documentCount: number;
                              failedDocumentCount: number;
                              filename: string
                              | null;
                              id: string;
                              knowledgeBaseId: string;
                              lastSyncedAt: string | null;
                              latestSync:
                                  | {
                                      createdAt: ...;
                                      documentsDeleted: ...;
                                      documentsMissing: ...;
                                      documentsSeen: ...;
                                      documentsUnchanged: ...;
                                      documentsUpserted: ...;
                                      error: ...;
                                      finishedAt: ...;
                                      heldDeletions: ...;
                                      id: ...;
                                      mode: ...;
                                      partialReason: ...;
                                      sourceId: ...;
                                      status: ...;
                                      trigger: ...;
                                  }
                                  | null;
                              sizeBytes: number
                              | null;
                              skippedDocumentCount: number;
                              title: string;
                              type: "files";
                              updatedAt: string;
                          }
                      )[];
                      nextCursor: string
                      | null;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A page of sources.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: { "Idempotency-Key"?: string };
              path: { apiVersion: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody: {
              content: {
                  "application/json": | {
                      crawlOptions?: {
                          excludePaths?: string[];
                          ignoreQueryParameters?: boolean;
                          includePaths?: string[];
                          maxDepth?: number;
                          pageLimit?: number;
                          sitemapOnly?: boolean;
                      };
                      dryRun?: boolean;
                      type: "web";
                      url: string;
                  }
                  | {
                      query: string;
                      sanityDatasetId: string;
                      sanityProjectId: string;
                      type: "sanity-dataset";
                  }
                  | {
                      content?: string;
                      contentType?: "text/markdown"
                      | "text/plain";
                      title: string;
                      type: "files";
                  };
              };
          };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          groups: { count: number; prefix: string }[];
                          otherCount: number;
                          totalPages: number;
                          truncated: boolean;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "201": {
                  content: {
                      "application/json": | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          crawlOptions: {
                              excludePaths?: string[];
                              ignoreQueryParameters?: boolean;
                              includePaths?: string[];
                              maxDepth?: number;
                              pageLimit?: number;
                              sitemapOnly?: boolean;
                          };
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "web";
                          updatedAt: string;
                          url: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          query: string;
                          sanityDatasetId: string;
                          sanityProjectId: string;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "sanity-dataset";
                          updatedAt: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          filename: string
                          | null;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          sizeBytes: number
                          | null;
                          skippedDocumentCount: number;
                          title: string;
                          type: "files";
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Add a source

      Adds a source to a knowledge base. Set type to choose what it reads:

      - `web`: a website, crawled from `url`
      - `sanity-dataset`: the documents a GROQ query selects in a Sanity dataset
      - `files`: files you upload with `POST .../sources/{sourceId}/uploads`, or text you send in `content`
      
      A website or dataset starts its first sync right away. A `files` source syncs when you upload a file, or right away when you send `content`: one request stores the text, adds the source and starts its sync. For a website, set `dryRun` to `true` to preview the crawl without adding the source.
      
      Adding a website that is already a source returns `409` with code `webSourceRootConflict`, and adding more websites than your limit allows returns `409` with code `webSourceRootLimitExceeded`. When the organization's knowledge bases already hold as many source chunks as its plan allows, returns `403` with code `planLimitReached` and adds nothing. Supports the `Idempotency-Key` header.
      
      • parameters: {
            cookie?: undefined;
            header?: { "Idempotency-Key"?: string };
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: { "Idempotency-Key"?: string }
          • OptionalIdempotency-Key?: string

            A unique value, such as a UUID, that makes retries safe. A retry with the same key and body returns the first response instead of repeating the work.

        • path: { apiVersion: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • requestBody: {
            content: {
                "application/json":
                    | {
                        crawlOptions?: {
                            excludePaths?: string[];
                            ignoreQueryParameters?: boolean;
                            includePaths?: string[];
                            maxDepth?: number;
                            pageLimit?: number;
                            sitemapOnly?: boolean;
                        };
                        dryRun?: boolean;
                        type: "web";
                        url: string;
                    }
                    | {
                        query: string;
                        sanityDatasetId: string;
                        sanityProjectId: string;
                        type: "sanity-dataset";
                    }
                    | {
                        content?: string;
                        contentType?: "text/markdown"
                        | "text/plain";
                        title: string;
                        type: "files";
                    };
            };
        }

        The source to add. The type field sets its kind.

      • responses: {
            "200": {
                content: {
                    "application/json": {
                        groups: { count: number; prefix: string }[];
                        otherCount: number;
                        totalPages: number;
                        truncated: boolean;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "201": {
                content: {
                    "application/json": | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        crawlOptions: {
                            excludePaths?: string[];
                            ignoreQueryParameters?: boolean;
                            includePaths?: string[];
                            maxDepth?: number;
                            pageLimit?: number;
                            sitemapOnly?: boolean;
                        };
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "web";
                        updatedAt: string;
                        url: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string
                        | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        query: string;
                        sanityDatasetId: string;
                        sanityProjectId: string;
                        skippedDocumentCount: number;
                        syncFrequency: "weekly"
                        | "monthly"
                        | null;
                        title: string;
                        type: "sanity-dataset";
                        updatedAt: string;
                    }
                    | {
                        chunkCount: number;
                        convertedDocumentCount: number;
                        createdAt: string;
                        documentCount: number;
                        failedDocumentCount: number;
                        filename: string
                        | null;
                        id: string;
                        knowledgeBaseId: string;
                        lastSyncedAt: string | null;
                        latestSync:
                            | {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }
                            | null;
                        sizeBytes: number
                        | null;
                        skippedDocumentCount: number;
                        title: string;
                        type: "files";
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      groups: { count: number; prefix: string }[];
                      otherCount: number;
                      totalPages: number;
                      truncated: boolean;
                  };
              };
              headers: { [name: string]: unknown };
          }

          The preview of a crawl, when dryRun is true.

        • 201: {
              content: {
                  "application/json":
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          crawlOptions: {
                              excludePaths?: string[];
                              ignoreQueryParameters?: boolean;
                              includePaths?: string[];
                              maxDepth?: number;
                              pageLimit?: number;
                              sitemapOnly?: boolean;
                          };
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "web";
                          updatedAt: string;
                          url: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          query: string;
                          sanityDatasetId: string;
                          sanityProjectId: string;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "sanity-dataset";
                          updatedAt: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          filename: string
                          | null;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          sizeBytes: number
                          | null;
                          skippedDocumentCount: number;
                          title: string;
                          type: "files";
                          updatedAt: string;
                      };
              };
              headers: { [name: string]: unknown };
          }

          Something that yields documents for a knowledge base: a website, a dataset or files.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}": {
        delete: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "204": {
                    content: { "application/json": null };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            crawlOptions: {
                                excludePaths?: string[];
                                ignoreQueryParameters?: boolean;
                                includePaths?: string[];
                                maxDepth?: number;
                                pageLimit?: number;
                                sitemapOnly?: boolean;
                            };
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "web";
                            updatedAt: string;
                            url: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            query: string;
                            sanityDatasetId: string;
                            sanityProjectId: string;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "sanity-dataset";
                            updatedAt: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            filename: string
                            | null;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            sizeBytes: number
                            | null;
                            skippedDocumentCount: number;
                            title: string;
                            type: "files";
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        confirmDeletions?: boolean;
                        crawlOptions?: {
                            excludePaths?: string[];
                            ignoreQueryParameters?: boolean;
                            includePaths?: string[];
                            maxDepth?: number;
                            pageLimit?: number;
                            sitemapOnly?: boolean;
                        };
                        query?: string;
                        syncFrequency?: "weekly"
                        | "monthly"
                        | null;
                        title?: string;
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            crawlOptions: {
                                excludePaths?: string[];
                                ignoreQueryParameters?: boolean;
                                includePaths?: string[];
                                maxDepth?: number;
                                pageLimit?: number;
                                sitemapOnly?: boolean;
                            };
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "web";
                            updatedAt: string;
                            url: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            query: string;
                            sanityDatasetId: string;
                            sanityProjectId: string;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "sanity-dataset";
                            updatedAt: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            filename: string
                            | null;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            sizeBytes: number
                            | null;
                            skippedDocumentCount: number;
                            title: string;
                            type: "files";
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • delete: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "204": {
                  content: { "application/json": null };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Delete a source

      Removes a source and its documents from the knowledge base, and starts a refresh that removes their citations from entries and deletes the entries left with none. A source no other knowledge base uses stops syncing and is deleted once that refresh has run.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string; sourceId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

          • sourceId: string

            The source's ID.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "204": {
                content: { "application/json": null };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 204: { content: { "application/json": null }; headers: { [name: string]: unknown } }

          The source was deleted.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          crawlOptions: {
                              excludePaths?: string[];
                              ignoreQueryParameters?: boolean;
                              includePaths?: string[];
                              maxDepth?: number;
                              pageLimit?: number;
                              sitemapOnly?: boolean;
                          };
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "web";
                          updatedAt: string;
                          url: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          query: string;
                          sanityDatasetId: string;
                          sanityProjectId: string;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "sanity-dataset";
                          updatedAt: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          filename: string
                          | null;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          sizeBytes: number
                          | null;
                          skippedDocumentCount: number;
                          title: string;
                          type: "files";
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get a source

      Returns a source with its settings, document counts and latest sync.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string; sourceId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

          • sourceId: string

            The source's ID.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json":
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            crawlOptions: {
                                excludePaths?: string[];
                                ignoreQueryParameters?: boolean;
                                includePaths?: string[];
                                maxDepth?: number;
                                pageLimit?: number;
                                sitemapOnly?: boolean;
                            };
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "web";
                            updatedAt: string;
                            url: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            query: string;
                            sanityDatasetId: string;
                            sanityProjectId: string;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "sanity-dataset";
                            updatedAt: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            filename: string
                            | null;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            sizeBytes: number
                            | null;
                            skippedDocumentCount: number;
                            title: string;
                            type: "files";
                            updatedAt: string;
                        };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json":
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          crawlOptions: {
                              excludePaths?: string[];
                              ignoreQueryParameters?: boolean;
                              includePaths?: string[];
                              maxDepth?: number;
                              pageLimit?: number;
                              sitemapOnly?: boolean;
                          };
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "web";
                          updatedAt: string;
                          url: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          query: string;
                          sanityDatasetId: string;
                          sanityProjectId: string;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "sanity-dataset";
                          updatedAt: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          filename: string
                          | null;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          sizeBytes: number
                          | null;
                          skippedDocumentCount: number;
                          title: string;
                          type: "files";
                          updatedAt: string;
                      };
              };
              headers: { [name: string]: unknown };
          }

          Something that yields documents for a knowledge base: a website, a dataset or files.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • patch: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
              query?: undefined;
          };
          requestBody: {
              content: {
                  "application/json": {
                      confirmDeletions?: boolean;
                      crawlOptions?: {
                          excludePaths?: string[];
                          ignoreQueryParameters?: boolean;
                          includePaths?: string[];
                          maxDepth?: number;
                          pageLimit?: number;
                          sitemapOnly?: boolean;
                      };
                      query?: string;
                      syncFrequency?: "weekly"
                      | "monthly"
                      | null;
                      title?: string;
                  };
              };
          };
          responses: {
              "200": {
                  content: {
                      "application/json": | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          crawlOptions: {
                              excludePaths?: string[];
                              ignoreQueryParameters?: boolean;
                              includePaths?: string[];
                              maxDepth?: number;
                              pageLimit?: number;
                              sitemapOnly?: boolean;
                          };
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "web";
                          updatedAt: string;
                          url: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          query: string;
                          sanityDatasetId: string;
                          sanityProjectId: string;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "sanity-dataset";
                          updatedAt: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          filename: string
                          | null;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          sizeBytes: number
                          | null;
                          skippedDocumentCount: number;
                          title: string;
                          type: "files";
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Update a source

      Changes a source's title, a website's crawl options, a dataset's query, or how often a website or dataset syncs on its own. New crawl options delete the documents whose path they leave out. When that would delete all of the source's documents, or five or more that are over a fifth of them, the request returns 409 with code sourceDeletionsUnconfirmed until you send it again with confirmDeletions set to true. New crawl options sent while the source syncs return 409 with code syncInProgress; send them again once the sync finishes. A new query queues a sync, which removes the documents the query no longer selects.

      Crawl options on a source that isn't a website, a query on one that isn't a dataset, or a sync frequency on a `files` source, return `422` with code `sourceTypeMismatch`. Setting a sync frequency on a plan without scheduled syncs returns `403` with code `featureNotInPlan`; setting it to `null` always works.
      
      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string; sourceId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

          • sourceId: string

            The source's ID.

        • Optionalquery?: undefined
      • requestBody: {
            content: {
                "application/json": {
                    confirmDeletions?: boolean;
                    crawlOptions?: {
                        excludePaths?: string[];
                        ignoreQueryParameters?: boolean;
                        includePaths?: string[];
                        maxDepth?: number;
                        pageLimit?: number;
                        sitemapOnly?: boolean;
                    };
                    query?: string;
                    syncFrequency?: "weekly"
                    | "monthly"
                    | null;
                    title?: string;
                };
            };
        }

        The changes to make to a source.

      • responses: {
            "200": {
                content: {
                    "application/json":
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            crawlOptions: {
                                excludePaths?: string[];
                                ignoreQueryParameters?: boolean;
                                includePaths?: string[];
                                maxDepth?: number;
                                pageLimit?: number;
                                sitemapOnly?: boolean;
                            };
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "web";
                            updatedAt: string;
                            url: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string
                            | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            query: string;
                            sanityDatasetId: string;
                            sanityProjectId: string;
                            skippedDocumentCount: number;
                            syncFrequency: "weekly"
                            | "monthly"
                            | null;
                            title: string;
                            type: "sanity-dataset";
                            updatedAt: string;
                        }
                        | {
                            chunkCount: number;
                            convertedDocumentCount: number;
                            createdAt: string;
                            documentCount: number;
                            failedDocumentCount: number;
                            filename: string
                            | null;
                            id: string;
                            knowledgeBaseId: string;
                            lastSyncedAt: string | null;
                            latestSync:
                                | {
                                    createdAt: string;
                                    documentsDeleted: number;
                                    documentsMissing: number;
                                    documentsSeen: number;
                                    documentsUnchanged: number;
                                    documentsUpserted: number;
                                    error: string
                                    | null;
                                    finishedAt: string | null;
                                    heldDeletions: number | null;
                                    id: string;
                                    mode: "full" | "incremental";
                                    partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                    sourceId: string;
                                    status: "running" | "failed" | "cancelled" | "completed" | "held";
                                    trigger: "upload" | "schedule" | "manual" | "event" | "push";
                                }
                                | null;
                            sizeBytes: number
                            | null;
                            skippedDocumentCount: number;
                            title: string;
                            type: "files";
                            updatedAt: string;
                        };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json":
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          crawlOptions: {
                              excludePaths?: string[];
                              ignoreQueryParameters?: boolean;
                              includePaths?: string[];
                              maxDepth?: number;
                              pageLimit?: number;
                              sitemapOnly?: boolean;
                          };
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "web";
                          updatedAt: string;
                          url: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string
                          | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          query: string;
                          sanityDatasetId: string;
                          sanityProjectId: string;
                          skippedDocumentCount: number;
                          syncFrequency: "weekly"
                          | "monthly"
                          | null;
                          title: string;
                          type: "sanity-dataset";
                          updatedAt: string;
                      }
                      | {
                          chunkCount: number;
                          convertedDocumentCount: number;
                          createdAt: string;
                          documentCount: number;
                          failedDocumentCount: number;
                          filename: string
                          | null;
                          id: string;
                          knowledgeBaseId: string;
                          lastSyncedAt: string | null;
                          latestSync:
                              | {
                                  createdAt: string;
                                  documentsDeleted: number;
                                  documentsMissing: number;
                                  documentsSeen: number;
                                  documentsUnchanged: number;
                                  documentsUpserted: number;
                                  error: string
                                  | null;
                                  finishedAt: string | null;
                                  heldDeletions: number | null;
                                  id: string;
                                  mode: "full" | "incremental";
                                  partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                  sourceId: string;
                                  status: "running" | "failed" | "cancelled" | "completed" | "held";
                                  trigger: "upload" | "schedule" | "manual" | "event" | "push";
                              }
                              | null;
                          sizeBytes: number
                          | null;
                          skippedDocumentCount: number;
                          title: string;
                          type: "files";
                          updatedAt: string;
                      };
              };
              headers: { [name: string]: unknown };
          }

          Something that yields documents for a knowledge base: a website, a dataset or files.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: { cursor?: string; limit?: number };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            data: {
                                createdAt: string;
                                documentsDeleted: number;
                                documentsMissing: number;
                                documentsSeen: number;
                                documentsUnchanged: number;
                                documentsUpserted: number;
                                error: string
                                | null;
                                finishedAt: string | null;
                                heldDeletions: number | null;
                                id: string;
                                mode: "full" | "incremental";
                                partialReason: "page-limit" | "source-limit" | "stalled" | null;
                                sourceId: string;
                                status: "running" | "failed" | "cancelled" | "completed" | "held";
                                trigger: "upload" | "schedule" | "manual" | "event" | "push";
                            }[];
                            nextCursor: string
                            | null;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: { "Idempotency-Key"?: string };
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: undefined;
            };
            requestBody: {
                content: { "application/json": { uploadId?: string }
                | null };
            };
            responses: {
                "202": {
                    content: {
                        "application/json": { jobId: string
                        | null; sourceId: string };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
              query?: { cursor?: string; limit?: number };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          data: {
                              createdAt: string;
                              documentsDeleted: number;
                              documentsMissing: number;
                              documentsSeen: number;
                              documentsUnchanged: number;
                              documentsUpserted: number;
                              error: string
                              | null;
                              finishedAt: string | null;
                              heldDeletions: number | null;
                              id: string;
                              mode: "full" | "incremental";
                              partialReason: "page-limit" | "source-limit" | "stalled" | null;
                              sourceId: string;
                              status: "running" | "failed" | "cancelled" | "completed" | "held";
                              trigger: "upload" | "schedule" | "manual" | "event" | "push";
                          }[];
                          nextCursor: string
                          | null;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      List a source's syncs

      Lists the syncs of a source, newest first. Results are cursor-paginated.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: { cursor?: string; limit?: number };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string; sourceId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

          • sourceId: string

            The source's ID.

        • Optionalquery?: { cursor?: string; limit?: number }
          • Optionalcursor?: string

            The nextCursor value from the previous page. Omit it to get the first page.

          • Optionallimit?: number

            The maximum number of items to return.

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        data: {
                            createdAt: string;
                            documentsDeleted: number;
                            documentsMissing: number;
                            documentsSeen: number;
                            documentsUnchanged: number;
                            documentsUpserted: number;
                            error: string | null;
                            finishedAt: string | null;
                            heldDeletions: number | null;
                            id: string;
                            mode: "full" | "incremental";
                            partialReason: "page-limit" | "source-limit" | "stalled" | null;
                            sourceId: string;
                            status: "running" | "failed" | "cancelled" | "completed" | "held";
                            trigger: "upload" | "schedule" | "manual" | "event" | "push";
                        }[];
                        nextCursor: string
                        | null;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      data: {
                          createdAt: string;
                          documentsDeleted: number;
                          documentsMissing: number;
                          documentsSeen: number;
                          documentsUnchanged: number;
                          documentsUpserted: number;
                          error: string | null;
                          finishedAt: string | null;
                          heldDeletions: number | null;
                          id: string;
                          mode: "full" | "incremental";
                          partialReason: "page-limit" | "source-limit" | "stalled" | null;
                          sourceId: string;
                          status: "running" | "failed" | "cancelled" | "completed" | "held";
                          trigger: "upload" | "schedule" | "manual" | "event" | "push";
                      }[];
                      nextCursor: string
                      | null;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A page of syncs.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: { "Idempotency-Key"?: string };
              path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
              query?: undefined;
          };
          requestBody: {
              content: { "application/json": { uploadId?: string }
              | null };
          };
          responses: {
              "202": {
                  content: {
                      "application/json": { jobId: string
                      | null; sourceId: string };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Sync a source

      Starts a sync of the source. A website or dataset is read again: its sync is queued, and starts once any sync of the source that is running ends, including the first one that started when it was added. Asking again while one waits queues nothing more. Follow it with the source's latestSync.

      For a `files` source, set `uploadId` to the upload whose file the source should hold from now on; without it, the source reads its current file again. Its sync starts at once and returns a job ID to poll; the finished job's `result` names the sync and whether it is `held`. While a sync of a `files` source is running, including the first one, the request returns `409` with code `syncInProgress` and leaves the upload for a later request. An `uploadId` whose file never arrived returns `404` with code `uploadNotFound`, and an `uploadId` on a source that isn't `files` returns `422` with code `sourceTypeMismatch`.
      
      Supports the `Idempotency-Key` header.
      
      • parameters: {
            cookie?: undefined;
            header?: { "Idempotency-Key"?: string };
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: { "Idempotency-Key"?: string }
          • OptionalIdempotency-Key?: string

            A unique value, such as a UUID, that makes retries safe. A retry with the same key and body returns the first response instead of repeating the work.

        • path: { apiVersion: string; knowledgeBaseId: string; sourceId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

          • sourceId: string

            The source's ID.

        • Optionalquery?: undefined
      • requestBody: { content: { "application/json": { uploadId?: string } | null } }

        What a new sync reads.

      • responses: {
            "202": {
                content: {
                    "application/json": { jobId: string | null; sourceId: string };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 202: {
              content: {
                  "application/json": { jobId: string | null; sourceId: string };
              };
              headers: { [name: string]: unknown };
          }

          The sync that was started or queued.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs/{syncId}": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: {
                    apiVersion: string;
                    knowledgeBaseId: string;
                    sourceId: string;
                    syncId: string;
                };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            documentsDeleted: number;
                            documentsMissing: number;
                            documentsSeen: number;
                            documentsUnchanged: number;
                            documentsUpserted: number;
                            error: string
                            | null;
                            finishedAt: string | null;
                            heldDeletions: number | null;
                            id: string;
                            mode: "full" | "incremental";
                            partialReason: "page-limit" | "source-limit" | "stalled" | null;
                            sourceId: string;
                            status: "running" | "failed" | "cancelled" | "completed" | "held";
                            trigger: "upload" | "schedule" | "manual" | "event" | "push";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: {
                  apiVersion: string;
                  knowledgeBaseId: string;
                  sourceId: string;
                  syncId: string;
              };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          documentsDeleted: number;
                          documentsMissing: number;
                          documentsSeen: number;
                          documentsUnchanged: number;
                          documentsUpserted: number;
                          error: string
                          | null;
                          finishedAt: string | null;
                          heldDeletions: number | null;
                          id: string;
                          mode: "full" | "incremental";
                          partialReason: "page-limit" | "source-limit" | "stalled" | null;
                          sourceId: string;
                          status: "running" | "failed" | "cancelled" | "completed" | "held";
                          trigger: "upload" | "schedule" | "manual" | "event" | "push";
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get a sync

      Returns one sync of a source with its status and counts.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: {
                apiVersion: string;
                knowledgeBaseId: string;
                sourceId: string;
                syncId: string;
            };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: {
              apiVersion: string;
              knowledgeBaseId: string;
              sourceId: string;
              syncId: string;
          }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

          • sourceId: string

            The source's ID.

          • syncId: string

            The sync's ID.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        documentsDeleted: number;
                        documentsMissing: number;
                        documentsSeen: number;
                        documentsUnchanged: number;
                        documentsUpserted: number;
                        error: string | null;
                        finishedAt: string | null;
                        heldDeletions: number | null;
                        id: string;
                        mode: "full" | "incremental";
                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                        sourceId: string;
                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      createdAt: string;
                      documentsDeleted: number;
                      documentsMissing: number;
                      documentsSeen: number;
                      documentsUnchanged: number;
                      documentsUpserted: number;
                      error: string | null;
                      finishedAt: string | null;
                      heldDeletions: number | null;
                      id: string;
                      mode: "full" | "incremental";
                      partialReason: "page-limit" | "source-limit" | "stalled" | null;
                      sourceId: string;
                      status: "running" | "failed" | "cancelled" | "completed" | "held";
                      trigger: "upload" | "schedule" | "manual" | "event" | "push";
                  };
              };
              headers: { [name: string]: unknown };
          }

          One run of a source's connector.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs/{syncId}/confirm": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: {
                    apiVersion: string;
                    knowledgeBaseId: string;
                    sourceId: string;
                    syncId: string;
                };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            documentsDeleted: number;
                            documentsMissing: number;
                            documentsSeen: number;
                            documentsUnchanged: number;
                            documentsUpserted: number;
                            error: string
                            | null;
                            finishedAt: string | null;
                            heldDeletions: number | null;
                            id: string;
                            mode: "full" | "incremental";
                            partialReason: "page-limit" | "source-limit" | "stalled" | null;
                            sourceId: string;
                            status: "running" | "failed" | "cancelled" | "completed" | "held";
                            trigger: "upload" | "schedule" | "manual" | "event" | "push";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: {
                  apiVersion: string;
                  knowledgeBaseId: string;
                  sourceId: string;
                  syncId: string;
              };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          documentsDeleted: number;
                          documentsMissing: number;
                          documentsSeen: number;
                          documentsUnchanged: number;
                          documentsUpserted: number;
                          error: string
                          | null;
                          finishedAt: string | null;
                          heldDeletions: number | null;
                          id: string;
                          mode: "full" | "incremental";
                          partialReason: "page-limit" | "source-limit" | "stalled" | null;
                          sourceId: string;
                          status: "running" | "failed" | "cancelled" | "completed" | "held";
                          trigger: "upload" | "schedule" | "manual" | "event" | "push";
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Confirm a held sync's deletions

      Deletes the documents a held sync didn't find, unless a sync has found them since, completes the sync, and starts a refresh of each knowledge base that uses the source, which removes their citations from entries. A sync that isn't held returns 409 with code syncNotHeld.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: {
                apiVersion: string;
                knowledgeBaseId: string;
                sourceId: string;
                syncId: string;
            };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: {
              apiVersion: string;
              knowledgeBaseId: string;
              sourceId: string;
              syncId: string;
          }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

          • sourceId: string

            The source's ID.

          • syncId: string

            The sync's ID.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        documentsDeleted: number;
                        documentsMissing: number;
                        documentsSeen: number;
                        documentsUnchanged: number;
                        documentsUpserted: number;
                        error: string | null;
                        finishedAt: string | null;
                        heldDeletions: number | null;
                        id: string;
                        mode: "full" | "incremental";
                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                        sourceId: string;
                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      createdAt: string;
                      documentsDeleted: number;
                      documentsMissing: number;
                      documentsSeen: number;
                      documentsUnchanged: number;
                      documentsUpserted: number;
                      error: string | null;
                      finishedAt: string | null;
                      heldDeletions: number | null;
                      id: string;
                      mode: "full" | "incremental";
                      partialReason: "page-limit" | "source-limit" | "stalled" | null;
                      sourceId: string;
                      status: "running" | "failed" | "cancelled" | "completed" | "held";
                      trigger: "upload" | "schedule" | "manual" | "event" | "push";
                  };
              };
              headers: { [name: string]: unknown };
          }

          One run of a source's connector.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs/{syncId}/discard": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: {
                    apiVersion: string;
                    knowledgeBaseId: string;
                    sourceId: string;
                    syncId: string;
                };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            documentsDeleted: number;
                            documentsMissing: number;
                            documentsSeen: number;
                            documentsUnchanged: number;
                            documentsUpserted: number;
                            error: string
                            | null;
                            finishedAt: string | null;
                            heldDeletions: number | null;
                            id: string;
                            mode: "full" | "incremental";
                            partialReason: "page-limit" | "source-limit" | "stalled" | null;
                            sourceId: string;
                            status: "running" | "failed" | "cancelled" | "completed" | "held";
                            trigger: "upload" | "schedule" | "manual" | "event" | "push";
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: {
                  apiVersion: string;
                  knowledgeBaseId: string;
                  sourceId: string;
                  syncId: string;
              };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          documentsDeleted: number;
                          documentsMissing: number;
                          documentsSeen: number;
                          documentsUnchanged: number;
                          documentsUpserted: number;
                          error: string
                          | null;
                          finishedAt: string | null;
                          heldDeletions: number | null;
                          id: string;
                          mode: "full" | "incremental";
                          partialReason: "page-limit" | "source-limit" | "stalled" | null;
                          sourceId: string;
                          status: "running" | "failed" | "cancelled" | "completed" | "held";
                          trigger: "upload" | "schedule" | "manual" | "event" | "push";
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Discard a held sync's deletions

      Completes a held sync without deleting anything: every document stays as it is. A sync that isn't held returns 409 with code syncNotHeld.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: {
                apiVersion: string;
                knowledgeBaseId: string;
                sourceId: string;
                syncId: string;
            };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: {
              apiVersion: string;
              knowledgeBaseId: string;
              sourceId: string;
              syncId: string;
          }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

          • sourceId: string

            The source's ID.

          • syncId: string

            The sync's ID.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        documentsDeleted: number;
                        documentsMissing: number;
                        documentsSeen: number;
                        documentsUnchanged: number;
                        documentsUpserted: number;
                        error: string | null;
                        finishedAt: string | null;
                        heldDeletions: number | null;
                        id: string;
                        mode: "full" | "incremental";
                        partialReason: "page-limit" | "source-limit" | "stalled" | null;
                        sourceId: string;
                        status: "running" | "failed" | "cancelled" | "completed" | "held";
                        trigger: "upload" | "schedule" | "manual" | "event" | "push";
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      createdAt: string;
                      documentsDeleted: number;
                      documentsMissing: number;
                      documentsSeen: number;
                      documentsUnchanged: number;
                      documentsUpserted: number;
                      error: string | null;
                      finishedAt: string | null;
                      heldDeletions: number | null;
                      id: string;
                      mode: "full" | "incremental";
                      partialReason: "page-limit" | "source-limit" | "stalled" | null;
                      sourceId: string;
                      status: "running" | "failed" | "cancelled" | "completed" | "held";
                      trigger: "upload" | "schedule" | "manual" | "event" | "push";
                  };
              };
              headers: { [name: string]: unknown };
          }

          One run of a source's connector.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/uploads": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: { "Idempotency-Key"?: string };
                path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": { contentType?: string; filename: string };
                };
            };
            responses: {
                "201": {
                    content: {
                        "application/json": { uploadId: string; uploadUrl: string };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: { "Idempotency-Key"?: string };
              path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
              query?: undefined;
          };
          requestBody: {
              content: {
                  "application/json": { contentType?: string; filename: string };
              };
          };
          responses: {
              "201": {
                  content: {
                      "application/json": { uploadId: string; uploadUrl: string };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Upload a file to a source

      Returns a single-use signed URL for one file of a files source, valid for one hour. To add the file:

      1. Send the file in a `PUT` request to `uploadUrl`.
      2. Call `POST .../sources/{sourceId}/syncs` with the `uploadId`.
      
      The file can be a single document or a zip, tar or gzip archive of them. It replaces the source's current file when it syncs. An upload no sync takes within 24 hours is deleted. A source that isn't `files` returns `422` with code `sourceTypeMismatch`. When the organization's knowledge bases already hold as many source chunks as its plan allows, returns `403` with code `planLimitReached`. Supports the `Idempotency-Key` header.
      
      • parameters: {
            cookie?: undefined;
            header?: { "Idempotency-Key"?: string };
            path: { apiVersion: string; knowledgeBaseId: string; sourceId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: { "Idempotency-Key"?: string }
          • OptionalIdempotency-Key?: string

            A unique value, such as a UUID, that makes retries safe. A retry with the same key and body returns the first response instead of repeating the work.

        • path: { apiVersion: string; knowledgeBaseId: string; sourceId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

          • sourceId: string

            The source's ID.

        • Optionalquery?: undefined
      • requestBody: { content: { "application/json": { contentType?: string; filename: string } } }

        The file to upload.

      • responses: {
            "201": {
                content: {
                    "application/json": { uploadId: string; uploadUrl: string };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 201: {
              content: { "application/json": { uploadId: string; uploadUrl: string } };
              headers: { [name: string]: unknown };
          }

          Where to upload the file.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/knowledge-bases/{knowledgeBaseId}/sync": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; knowledgeBaseId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "202": {
                    content: { "application/json": { sourceIds: string[] } };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; knowledgeBaseId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "202": {
                  content: { "application/json": { sourceIds: string[] } };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Sync every source

      Queues a sync of every website and dataset source, which starts once any sync of the source that is running ends. files sources sync when you upload a file.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; knowledgeBaseId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; knowledgeBaseId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • knowledgeBaseId: string

            The knowledge base's ID (kb...), its publicId. Its UUID id is also accepted.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "202": {
                content: { "application/json": { sourceIds: string[] } };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 202: {
              content: { "application/json": { sourceIds: string[] } };
              headers: { [name: string]: unknown };
          }

          The syncs that were queued.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/organizations/{organizationId}/conversations/{threadId}": {
        delete: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; organizationId: string; threadId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "204": {
                    content: { "application/json": null };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; organizationId: string; threadId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        classificationError?: string;
                        coreMetrics?: {
                            contentGaps: string[];
                            sentiment: "positive"
                            | "neutral"
                            | "negative";
                            successScore: number;
                        };
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            classificationError: string
                            | null;
                            classifiedAt: string | null;
                            coreMetrics:
                                | {
                                    contentGaps?: string[];
                                    sentiment?: "positive"
                                    | "neutral"
                                    | "negative";
                                    successScore?: number;
                                }
                                | null;
                            createdAt: string;
                            id: string;
                            messages: {
                                content: string
                                | null;
                                error: string | null;
                                role: "user" | "assistant" | "system" | "tool";
                                timestamp: string | null;
                                toolName: string | null;
                                toolType: "result" | "call" | null;
                            }[];
                            messagesUpdatedAt: string;
                            metadata: { [key: string]: string | string[] }
                            | null;
                            modelId: string | null;
                            modelProvider: string | null;
                            sharing:
                                | { contact?: string; conversations?: boolean; metrics?: boolean }
                                | null;
                            startedAt: string;
                            threadId: string;
                            tokenUsage:
                                | {
                                    inputTokens?: number;
                                    outputTokens?: number;
                                    totalTokens?: number;
                                }
                                | null;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        post?: undefined;
        put: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; organizationId: string; threadId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        messages: {
                            content?: string
                            | null;
                            error?: string | null;
                            role: "user" | "assistant" | "system" | "tool";
                            toolName?: string | null;
                            toolType?: "result" | "call" | null;
                        }[];
                        metadata?: { [key: string]: string
                        | string[] };
                        modelId?: string;
                        modelProvider?: string;
                        sharing?: {
                            contact?: string;
                            conversations?: boolean;
                            metrics?: boolean;
                        };
                        tokenUsage?: {
                            inputTokens?: number;
                            outputTokens?: number;
                            totalTokens?: number;
                        };
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            classificationError: string
                            | null;
                            classifiedAt: string | null;
                            coreMetrics:
                                | {
                                    contentGaps?: string[];
                                    sentiment?: "positive"
                                    | "neutral"
                                    | "negative";
                                    successScore?: number;
                                }
                                | null;
                            createdAt: string;
                            id: string;
                            messages: {
                                content: string
                                | null;
                                error: string | null;
                                role: "user" | "assistant" | "system" | "tool";
                                timestamp: string | null;
                                toolName: string | null;
                                toolType: "result" | "call" | null;
                            }[];
                            messagesUpdatedAt: string;
                            metadata: { [key: string]: string | string[] }
                            | null;
                            modelId: string | null;
                            modelProvider: string | null;
                            sharing:
                                | { contact?: string; conversations?: boolean; metrics?: boolean }
                                | null;
                            startedAt: string;
                            threadId: string;
                            tokenUsage:
                                | {
                                    inputTokens?: number;
                                    outputTokens?: number;
                                    totalTokens?: number;
                                }
                                | null;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        trace?: undefined;
    }

    Type declaration

    • delete: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; organizationId: string; threadId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "204": {
                  content: { "application/json": null };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Delete a conversation

      Deletes the recorded conversation for one thread, including its messages and classification. Requires the same access as recording a conversation.

      Saving with the same `threadId` afterwards records a new conversation.
      
      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; organizationId: string; threadId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; organizationId: string; threadId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • organizationId: string

            The ID of the organization.

          • threadId: string

            Your ID for the conversation thread, unique within your organization. Up to 200 characters.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "204": {
                content: { "application/json": null };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 204: { content: { "application/json": null }; headers: { [name: string]: unknown } }

          Default Response

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • patch: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; organizationId: string; threadId: string };
              query?: undefined;
          };
          requestBody: {
              content: {
                  "application/json": {
                      classificationError?: string;
                      coreMetrics?: {
                          contentGaps: string[];
                          sentiment: "positive"
                          | "neutral"
                          | "negative";
                          successScore: number;
                      };
                  };
              };
          };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          classificationError: string
                          | null;
                          classifiedAt: string | null;
                          coreMetrics:
                              | {
                                  contentGaps?: string[];
                                  sentiment?: "positive"
                                  | "neutral"
                                  | "negative";
                                  successScore?: number;
                              }
                              | null;
                          createdAt: string;
                          id: string;
                          messages: {
                              content: string
                              | null;
                              error: string | null;
                              role: "user" | "assistant" | "system" | "tool";
                              timestamp: string | null;
                              toolName: string | null;
                              toolType: "result" | "call" | null;
                          }[];
                          messagesUpdatedAt: string;
                          metadata: { [key: string]: string | string[] }
                          | null;
                          modelId: string | null;
                          modelProvider: string | null;
                          sharing:
                              | { contact?: string; conversations?: boolean; metrics?: boolean }
                              | null;
                          startedAt: string;
                          threadId: string;
                          tokenUsage:
                              | {
                                  inputTokens?: number;
                                  outputTokens?: number;
                                  totalTokens?: number;
                              }
                              | null;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Record a conversation classification

      Records the classification your own model produced for one thread. Send exactly one of these fields:

      - `coreMetrics`: the classification result. The API sets `classifiedAt` and clears any recorded failure.
      - `classificationError`: why classification failed. Any earlier result stays unchanged.
      
      Requires the same access as recording a conversation. The last write wins, so a new classification replaces the previous one.
      
      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; organizationId: string; threadId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; organizationId: string; threadId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • organizationId: string

            The ID of the organization.

          • threadId: string

            Your ID for the conversation thread, unique within your organization. Up to 200 characters.

        • Optionalquery?: undefined
      • requestBody: {
            content: {
                "application/json": {
                    classificationError?: string;
                    coreMetrics?: {
                        contentGaps: string[];
                        sentiment: "positive" | "neutral" | "negative";
                        successScore: number;
                    };
                };
            };
        }

        A classification result or failure for one conversation. Send exactly one of coreMetrics or classificationError.

      • responses: {
            "200": {
                content: {
                    "application/json": {
                        classificationError: string | null;
                        classifiedAt: string | null;
                        coreMetrics:
                            | {
                                contentGaps?: string[];
                                sentiment?: "positive"
                                | "neutral"
                                | "negative";
                                successScore?: number;
                            }
                            | null;
                        createdAt: string;
                        id: string;
                        messages: {
                            content: string
                            | null;
                            error: string | null;
                            role: "user" | "assistant" | "system" | "tool";
                            timestamp: string | null;
                            toolName: string | null;
                            toolType: "result" | "call" | null;
                        }[];
                        messagesUpdatedAt: string;
                        metadata: { [key: string]: string | string[] }
                        | null;
                        modelId: string | null;
                        modelProvider: string | null;
                        sharing:
                            | { contact?: string; conversations?: boolean; metrics?: boolean }
                            | null;
                        startedAt: string;
                        threadId: string;
                        tokenUsage:
                            | {
                                inputTokens?: number;
                                outputTokens?: number;
                                totalTokens?: number;
                            }
                            | null;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      classificationError: string | null;
                      classifiedAt: string | null;
                      coreMetrics:
                          | {
                              contentGaps?: string[];
                              sentiment?: "positive"
                              | "neutral"
                              | "negative";
                              successScore?: number;
                          }
                          | null;
                      createdAt: string;
                      id: string;
                      messages: {
                          content: string
                          | null;
                          error: string | null;
                          role: "user" | "assistant" | "system" | "tool";
                          timestamp: string | null;
                          toolName: string | null;
                          toolType: "result" | "call" | null;
                      }[];
                      messagesUpdatedAt: string;
                      metadata: { [key: string]: string | string[] }
                      | null;
                      modelId: string | null;
                      modelProvider: string | null;
                      sharing:
                          | { contact?: string; conversations?: boolean; metrics?: boolean }
                          | null;
                      startedAt: string;
                      threadId: string;
                      tokenUsage:
                          | {
                              inputTokens?: number;
                              outputTokens?: number;
                              totalTokens?: number;
                          }
                          | null;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A recorded agent conversation: its transcript, metadata, token usage, and classification.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalpost?: undefined
    • put: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; organizationId: string; threadId: string };
              query?: undefined;
          };
          requestBody: {
              content: {
                  "application/json": {
                      messages: {
                          content?: string
                          | null;
                          error?: string | null;
                          role: "user" | "assistant" | "system" | "tool";
                          toolName?: string | null;
                          toolType?: "result" | "call" | null;
                      }[];
                      metadata?: { [key: string]: string
                      | string[] };
                      modelId?: string;
                      modelProvider?: string;
                      sharing?: {
                          contact?: string;
                          conversations?: boolean;
                          metrics?: boolean;
                      };
                      tokenUsage?: {
                          inputTokens?: number;
                          outputTokens?: number;
                          totalTokens?: number;
                      };
                  };
              };
          };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          classificationError: string
                          | null;
                          classifiedAt: string | null;
                          coreMetrics:
                              | {
                                  contentGaps?: string[];
                                  sentiment?: "positive"
                                  | "neutral"
                                  | "negative";
                                  successScore?: number;
                              }
                              | null;
                          createdAt: string;
                          id: string;
                          messages: {
                              content: string
                              | null;
                              error: string | null;
                              role: "user" | "assistant" | "system" | "tool";
                              timestamp: string | null;
                              toolName: string | null;
                              toolType: "result" | "call" | null;
                          }[];
                          messagesUpdatedAt: string;
                          metadata: { [key: string]: string | string[] }
                          | null;
                          modelId: string | null;
                          modelProvider: string | null;
                          sharing:
                              | { contact?: string; conversations?: boolean; metrics?: boolean }
                              | null;
                          startedAt: string;
                          threadId: string;
                          tokenUsage:
                              | {
                                  inputTokens?: number;
                                  outputTokens?: number;
                                  totalTokens?: number;
                              }
                              | null;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Record a conversation

      Creates or updates the recorded conversation for one thread. threadId identifies the conversation within your organization, so saving with the same threadId updates the same conversation. Requires Context Editor access or higher.

      Each save replaces the stored messages. `metadata`, `sharing`, and the model fields change only when you include them. `tokenUsage` is cumulative: send the usage for one generation call, and the API adds it to the conversation total. Usage is added only when the save changes the messages, so retries don't count it twice.
      
      To report a failure, set `error` on the message where it happened: the tool result for a failed tool call, or the assistant message for a turn that failed instead of answering. The Insights dashboard highlights conversations with a failed turn and counts failed tool calls separately, because agents often recover from them.
      
      The last write for a thread wins, so retries are safe. `sharing` records whether you share telemetry with Sanity: metrics only, or full transcripts.
      
      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; organizationId: string; threadId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; organizationId: string; threadId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • organizationId: string

            The ID of the organization.

          • threadId: string

            Your ID for the conversation thread, unique within your organization. Up to 200 characters.

        • Optionalquery?: undefined
      • requestBody: {
            content: {
                "application/json": {
                    messages: {
                        content?: string | null;
                        error?: string | null;
                        role: "user" | "assistant" | "system" | "tool";
                        toolName?: string | null;
                        toolType?: "result" | "call" | null;
                    }[];
                    metadata?: { [key: string]: string
                    | string[] };
                    modelId?: string;
                    modelProvider?: string;
                    sharing?: {
                        contact?: string;
                        conversations?: boolean;
                        metrics?: boolean;
                    };
                    tokenUsage?: {
                        inputTokens?: number;
                        outputTokens?: number;
                        totalTokens?: number;
                    };
                };
            };
        }

        A conversation transcript to save for one thread.

      • responses: {
            "200": {
                content: {
                    "application/json": {
                        classificationError: string | null;
                        classifiedAt: string | null;
                        coreMetrics:
                            | {
                                contentGaps?: string[];
                                sentiment?: "positive"
                                | "neutral"
                                | "negative";
                                successScore?: number;
                            }
                            | null;
                        createdAt: string;
                        id: string;
                        messages: {
                            content: string
                            | null;
                            error: string | null;
                            role: "user" | "assistant" | "system" | "tool";
                            timestamp: string | null;
                            toolName: string | null;
                            toolType: "result" | "call" | null;
                        }[];
                        messagesUpdatedAt: string;
                        metadata: { [key: string]: string | string[] }
                        | null;
                        modelId: string | null;
                        modelProvider: string | null;
                        sharing:
                            | { contact?: string; conversations?: boolean; metrics?: boolean }
                            | null;
                        startedAt: string;
                        threadId: string;
                        tokenUsage:
                            | {
                                inputTokens?: number;
                                outputTokens?: number;
                                totalTokens?: number;
                            }
                            | null;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      classificationError: string | null;
                      classifiedAt: string | null;
                      coreMetrics:
                          | {
                              contentGaps?: string[];
                              sentiment?: "positive"
                              | "neutral"
                              | "negative";
                              successScore?: number;
                          }
                          | null;
                      createdAt: string;
                      id: string;
                      messages: {
                          content: string
                          | null;
                          error: string | null;
                          role: "user" | "assistant" | "system" | "tool";
                          timestamp: string | null;
                          toolName: string | null;
                          toolType: "result" | "call" | null;
                      }[];
                      messagesUpdatedAt: string;
                      metadata: { [key: string]: string | string[] }
                      | null;
                      modelId: string | null;
                      modelProvider: string | null;
                      sharing:
                          | { contact?: string; conversations?: boolean; metrics?: boolean }
                          | null;
                      startedAt: string;
                      threadId: string;
                      tokenUsage:
                          | {
                              inputTokens?: number;
                              outputTokens?: number;
                              totalTokens?: number;
                          }
                          | null;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          A recorded agent conversation: its transcript, metadata, token usage, and classification.

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionaltrace?: undefined
    "/{apiVersion}/context/organizations/{organizationId}/mcp": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; organizationId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        groqFilter?: string;
                        instructions?: string;
                        name: string;
                        sources: (
                            | { id: string; type: "knowledge-base" }
                            | {
                                id: string;
                                perspective?: "published" | "drafts" | "raw" | null;
                                semanticSearch?: boolean | null;
                                type: "dataset";
                                workspace?: string | null;
                            }
                        )[];
                        title: string;
                    };
                };
            };
            responses: {
                "201": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            groqFilter: string
                            | null;
                            id: string;
                            instructions: string | null;
                            lastUsedAt: string | null;
                            name: string;
                            organizationId: string;
                            sources: (
                                | { id: string; type: "knowledge-base" }
                                | {
                                    id: string;
                                    perspective: "published" | "drafts" | "raw" | null;
                                    semanticSearch: boolean | null;
                                    type: "dataset";
                                    workspace: string | null;
                                }
                            )[];
                            title: string;
                            updatedAt: string;
                            url: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; organizationId: string };
              query?: undefined;
          };
          requestBody: {
              content: {
                  "application/json": {
                      groqFilter?: string;
                      instructions?: string;
                      name: string;
                      sources: (
                          | { id: string; type: "knowledge-base" }
                          | {
                              id: string;
                              perspective?: "published" | "drafts" | "raw" | null;
                              semanticSearch?: boolean | null;
                              type: "dataset";
                              workspace?: string | null;
                          }
                      )[];
                      title: string;
                  };
              };
          };
          responses: {
              "201": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          groqFilter: string
                          | null;
                          id: string;
                          instructions: string | null;
                          lastUsedAt: string | null;
                          name: string;
                          organizationId: string;
                          sources: (
                              | { id: string; type: "knowledge-base" }
                              | {
                                  id: string;
                                  perspective: "published" | "drafts" | "raw" | null;
                                  semanticSearch: boolean | null;
                                  type: "dataset";
                                  workspace: string | null;
                              }
                          )[];
                          title: string;
                          updatedAt: string;
                          url: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Create an MCP endpoint

      Creates an MCP endpoint with a title, a name, and the sources it serves. A source is a knowledge base, identified by its ID (kb…), or a dataset, identified as <projectId>.<datasetName>. An endpoint can serve any number of knowledge bases and at most one dataset, all at once. A GROQ filter is only kept when the endpoint has a dataset. The name must be unique in your organization, and you can't change it later. Duplicate sources with the same type and id are combined. The response includes the url agents connect to. To list or inspect endpoints, query sanity.context.mcp documents with GROQ from your organization's document store. Requires the sanity.context.mcp.create grant on the organization, which the Administrator and Developer roles have. Adding a dataset also requires full read access to the dataset and, on its project, the Administrator or Developer role or a custom role that can create datasets.

      A taken name returns `409` with code `mcpEndpointNameConflict`. A knowledge base that doesn't exist in the organization returns `422` with code `mcpSourceKnowledgeBaseNotFound`, and an invalid GROQ filter returns `422` with code `invalidGroqFilter`.
      
      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; organizationId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; organizationId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • organizationId: string

            The ID of the organization.

        • Optionalquery?: undefined
      • requestBody: {
            content: {
                "application/json": {
                    groqFilter?: string;
                    instructions?: string;
                    name: string;
                    sources: (
                        | { id: string; type: "knowledge-base" }
                        | {
                            id: string;
                            perspective?: "published" | "drafts" | "raw" | null;
                            semanticSearch?: boolean | null;
                            type: "dataset";
                            workspace?: string | null;
                        }
                    )[];
                    title: string;
                };
            };
        }

        CreateMcpEndpointInput

      • responses: {
            "201": {
                content: {
                    "application/json": {
                        createdAt: string;
                        groqFilter: string | null;
                        id: string;
                        instructions: string | null;
                        lastUsedAt: string | null;
                        name: string;
                        organizationId: string;
                        sources: (
                            | { id: string; type: "knowledge-base" }
                            | {
                                id: string;
                                perspective: "published" | "drafts" | "raw" | null;
                                semanticSearch: boolean | null;
                                type: "dataset";
                                workspace: string | null;
                            }
                        )[];
                        title: string;
                        updatedAt: string;
                        url: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 201: {
              content: {
                  "application/json": {
                      createdAt: string;
                      groqFilter: string | null;
                      id: string;
                      instructions: string | null;
                      lastUsedAt: string | null;
                      name: string;
                      organizationId: string;
                      sources: (
                          | { id: string; type: "knowledge-base" }
                          | {
                              id: string;
                              perspective: "published" | "drafts" | "raw" | null;
                              semanticSearch: boolean | null;
                              type: "dataset";
                              workspace: string | null;
                          }
                      )[];
                      title: string;
                      updatedAt: string;
                      url: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          McpEndpoint

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/organizations/{organizationId}/mcp/{mcpEndpoint}": {
        delete: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "204": {
                    content: { "application/json": null };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
                query?: undefined;
            };
            requestBody: {
                content: {
                    "application/json": {
                        groqFilter?: string
                        | null;
                        instructions?: string | null;
                        sources?: (
                            | { id: string; type: "knowledge-base" }
                            | {
                                id: string;
                                perspective?: "published" | "drafts" | "raw" | null;
                                semanticSearch?: boolean | null;
                                type: "dataset";
                                workspace?: string | null;
                            }
                        )[];
                        title?: string;
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            groqFilter: string
                            | null;
                            id: string;
                            instructions: string | null;
                            lastUsedAt: string | null;
                            name: string;
                            organizationId: string;
                            sources: (
                                | { id: string; type: "knowledge-base" }
                                | {
                                    id: string;
                                    perspective: "published" | "drafts" | "raw" | null;
                                    semanticSearch: boolean | null;
                                    type: "dataset";
                                    workspace: string | null;
                                }
                            )[];
                            title: string;
                            updatedAt: string;
                            url: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
                query?: {
                    embeddings?: string;
                    groqFilter?: string;
                    instructions?: string;
                    knowledgeBases?: string;
                    linkResolver?: string;
                    mode?: "groq" | "knowledge_base";
                    perspective?: string;
                    workspace?: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": { content?: undefined; headers: { [name: string]: unknown } };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • delete: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "204": {
                  content: { "application/json": null };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Delete an MCP endpoint

      Deletes the MCP endpoint with that name or ID. Agents connected through it lose access, and its name can be used again. Requires the sanity.context.mcp.delete grant on the organization. An unknown endpoint returns 404 with code mcpEndpointNotFound.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; mcpEndpoint: string; organizationId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • mcpEndpoint: string

            The MCP endpoint's name, as in its URL, or its ID (mcp…). Names can't take the shape of an ID, so either one identifies the endpoint.

          • organizationId: string

            The ID of the organization.

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "204": {
                content: { "application/json": null };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 204: { content: { "application/json": null }; headers: { [name: string]: unknown } }

          Default Response

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • patch: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
              query?: undefined;
          };
          requestBody: {
              content: {
                  "application/json": {
                      groqFilter?: string
                      | null;
                      instructions?: string | null;
                      sources?: (
                          | { id: string; type: "knowledge-base" }
                          | {
                              id: string;
                              perspective?: "published" | "drafts" | "raw" | null;
                              semanticSearch?: boolean | null;
                              type: "dataset";
                              workspace?: string | null;
                          }
                      )[];
                      title?: string;
                  };
              };
          };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          groqFilter: string
                          | null;
                          id: string;
                          instructions: string | null;
                          lastUsedAt: string | null;
                          name: string;
                          organizationId: string;
                          sources: (
                              | { id: string; type: "knowledge-base" }
                              | {
                                  id: string;
                                  perspective: "published" | "drafts" | "raw" | null;
                                  semanticSearch: boolean | null;
                                  type: "dataset";
                                  workspace: string | null;
                              }
                          )[];
                          title: string;
                          updatedAt: string;
                          url: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Update an MCP endpoint

      Updates the title, sources, instructions, or GROQ filter of the endpoint with that name or ID. To clear an optional field, set it to null. An endpoint can have at most one dataset source, and removing it clears the GROQ filter. You can't change the name, so the endpoint URL stays the same. Requires the sanity.context.mcp.update grant on the organization. Adding a dataset source requires full read access to the dataset and, on its project, the Administrator or Developer role or a custom role that can create datasets. Changing the GROQ filter requires the same access for the endpoint's dataset. Sending the current values changes nothing.

      An unknown endpoint returns `404` with code `mcpEndpointNotFound`. A knowledge base that doesn't exist in the organization returns `422` with code `mcpSourceKnowledgeBaseNotFound`, and an invalid GROQ filter returns `422` with code `invalidGroqFilter`. If the endpoint changed while the update was in progress, the update returns `409` with code `mcpEndpointEditConflict` and changes nothing. You can safely retry it.
      
      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; mcpEndpoint: string; organizationId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • mcpEndpoint: string

            The MCP endpoint's name, as in its URL, or its ID (mcp…). Names can't take the shape of an ID, so either one identifies the endpoint.

          • organizationId: string

            The ID of the organization.

        • Optionalquery?: undefined
      • requestBody: {
            content: {
                "application/json": {
                    groqFilter?: string | null;
                    instructions?: string | null;
                    sources?: (
                        | { id: string; type: "knowledge-base" }
                        | {
                            id: string;
                            perspective?: "published" | "drafts" | "raw" | null;
                            semanticSearch?: boolean | null;
                            type: "dataset";
                            workspace?: string | null;
                        }
                    )[];
                    title?: string;
                };
            };
        }

        UpdateMcpEndpointInput

      • responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        groqFilter: string | null;
                        id: string;
                        instructions: string | null;
                        lastUsedAt: string | null;
                        name: string;
                        organizationId: string;
                        sources: (
                            | { id: string; type: "knowledge-base" }
                            | {
                                id: string;
                                perspective: "published" | "drafts" | "raw" | null;
                                semanticSearch: boolean | null;
                                type: "dataset";
                                workspace: string | null;
                            }
                        )[];
                        title: string;
                        updatedAt: string;
                        url: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      createdAt: string;
                      groqFilter: string | null;
                      id: string;
                      instructions: string | null;
                      lastUsedAt: string | null;
                      name: string;
                      organizationId: string;
                      sources: (
                          | { id: string; type: "knowledge-base" }
                          | {
                              id: string;
                              perspective: "published" | "drafts" | "raw" | null;
                              semanticSearch: boolean | null;
                              type: "dataset";
                              workspace: string | null;
                          }
                      )[];
                      title: string;
                      updatedAt: string;
                      url: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          McpEndpoint

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
              query?: {
                  embeddings?: string;
                  groqFilter?: string;
                  instructions?: string;
                  knowledgeBases?: string;
                  linkResolver?: string;
                  mode?: "groq" | "knowledge_base";
                  perspective?: string;
                  workspace?: string;
              };
          };
          requestBody?: undefined;
          responses: {
              "200": { content?: undefined; headers: { [name: string]: unknown } };
          };
      }

      Connect to an MCP endpoint

      Receives Model Context Protocol (MCP) messages from agents over streamable HTTP (JSON-RPC 2.0). Agents send MCP messages in POST requests to this URL. mcpEndpoint is the permanent URL name of the endpoint. Errors are JSON-RPC error objects, not the standard error response.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
            query?: {
                embeddings?: string;
                groqFilter?: string;
                instructions?: string;
                knowledgeBases?: string;
                linkResolver?: string;
                mode?: "groq" | "knowledge_base";
                perspective?: string;
                workspace?: string;
            };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; mcpEndpoint: string; organizationId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • mcpEndpoint: string

            The MCP endpoint's name, set when the endpoint was created.

          • organizationId: string

            The ID of the organization.

        • Optionalquery?: {
              embeddings?: string;
              groqFilter?: string;
              instructions?: string;
              knowledgeBases?: string;
              linkResolver?: string;
              mode?: "groq" | "knowledge_base";
              perspective?: string;
              workspace?: string;
          }
          • Optionalembeddings?: string

            Set to true or false to turn semantic search on or off. Omit it to use the dataset source setting. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • OptionalgroqFilter?: string

            A GROQ filter that narrows the endpoint's configured content filter for this request. Documents must match both. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • Optionalinstructions?: string

            Agent instructions that replace the endpoint's configured instructions for this request. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • OptionalknowledgeBases?: string

            Comma-separated knowledge base public IDs (kb...) that replace the endpoint's knowledge base sources for this request. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • OptionallinkResolver?: string

            A JSON array that adds _url fields to query results. Each item has types (document types), baseUrl, and an optional slugExpression, a GROQ expression that defaults to slug.current. Invalid JSON is ignored.

          • Optionalmode?: "groq" | "knowledge_base"

            Serves only one side of the endpoint for this request: knowledge_base serves its knowledge bases and groq serves its dataset. Omit it to serve every source the endpoint has. A request whose chosen side the endpoint doesn't have is refused. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • Optionalperspective?: string

            The perspective for GROQ queries: published (default), previewDrafts, raw, or a release. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • Optionalworkspace?: string

            The studio workspace to use. Replaces the dataset source's workspace for this request. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

      • OptionalrequestBody?: undefined
      • responses: { "200": { content?: undefined; headers: { [name: string]: unknown } } }
        • 200: { content?: undefined; headers: { [name: string]: unknown } }

          Default Response

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/organizations/{organizationId}/mcp/{mcpEndpoint}/initial-context": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
                query?: {
                    embeddings?: string;
                    groqFilter?: string;
                    heading_offset?: string;
                    instructions?: string;
                    knowledgeBases?: string;
                    linkResolver?: string;
                    mode?: "groq" | "knowledge_base";
                    perspective?: string;
                    workspace?: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": { content?: undefined; headers: { [name: string]: unknown } };
                default: {
                    content: {
                        "application/json": {
                            code:
                                | "knowledgeBaseNotFound"
                                | "jobNotFound"
                                | "sourceNotFound"
                                | "documentNotFound"
                                | "syncNotFound"
                                | "uploadNotFound"
                                | "chunkNotFound"
                                | "entryNotFound"
                                | "entryDocumentInvalid"
                                | "revisionNotFound"
                                | "revisionNotBrowsable"
                                | "revisionNotRestorable"
                                | "buildDecisionsNotFound"
                                | "issueNotFound"
                                | "instructionNotFound"
                                | "routeNotFound"
                                | "buildInFlight"
                                | "knowledgeBaseIsDraft"
                                | "webSourceRootConflict"
                                | "webSourceRootLimitExceeded"
                                | "preferenceLimitExceeded"
                                | "syncInProgress"
                                | "syncNotHeld"
                                | "sourceDeletionsUnconfirmed"
                                | "documentNotConverted"
                                | "documentNotStored"
                                | "documentInvalidState"
                                | "uploadTooLarge"
                                | "payloadTooLarge"
                                | "validationError"
                                | "unsupportedMediaType"
                                | "sourceTypeMismatch"
                                | "issueNotResolvable"
                                | "issueNotAutoApplicable"
                                | "issueDocumentInvalid"
                                | "issueTransitionConflict"
                                | "draftTitleRequired"
                                | "datasetSourceEmpty"
                                | "datasetAlreadyBound"
                                | "datasetSourceNotBound"
                                | "datasetReadAccessDenied"
                                | "invalidGroqFilter"
                                | "mcpEndpointNotFound"
                                | "mcpEndpointNameConflict"
                                | "mcpEndpointEditConflict"
                                | "mcpSourceKnowledgeBaseNotFound"
                                | "mcpEndpointNotServable"
                                | "conversationNotFound"
                                | "missingCredential"
                                | "invalidCredential"
                                | "missingOrganization"
                                | "organizationAccessDenied"
                                | "knowledgeBaseAccessDenied"
                                | "contextGrantRequired"
                                | "knowledgeBaseCreateAccessDenied"
                                | "mcpEndpointManageAccessDenied"
                                | "insightsWriteAccessDenied"
                                | "sharedOrgPreferencesWriteAccessDenied"
                                | "projectAdminRequired"
                                | "accessCheckFailed"
                                | "planLimitReached"
                                | "featureNotInPlan"
                                | "buildCapReached"
                                | "tooManyConnections"
                                | "jobsUnavailable"
                                | "contextStoreUnavailable"
                                | "crawlingUnavailable"
                                | "crawlPreviewUnavailable"
                                | "instructionDraftFailed"
                                | "instructionScopeVanished"
                                | "purposeDraftFailed"
                                | "noPurposeEvidence"
                                | "idempotencyKeyReused"
                                | "idempotencyRequestInFlight"
                                | "idempotencyParamsMismatch"
                                | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
              query?: {
                  embeddings?: string;
                  groqFilter?: string;
                  heading_offset?: string;
                  instructions?: string;
                  knowledgeBases?: string;
                  linkResolver?: string;
                  mode?: "groq" | "knowledge_base";
                  perspective?: string;
                  workspace?: string;
              };
          };
          requestBody?: undefined;
          responses: {
              "200": { content?: undefined; headers: { [name: string]: unknown } };
              default: {
                  content: {
                      "application/json": {
                          code:
                              | "knowledgeBaseNotFound"
                              | "jobNotFound"
                              | "sourceNotFound"
                              | "documentNotFound"
                              | "syncNotFound"
                              | "uploadNotFound"
                              | "chunkNotFound"
                              | "entryNotFound"
                              | "entryDocumentInvalid"
                              | "revisionNotFound"
                              | "revisionNotBrowsable"
                              | "revisionNotRestorable"
                              | "buildDecisionsNotFound"
                              | "issueNotFound"
                              | "instructionNotFound"
                              | "routeNotFound"
                              | "buildInFlight"
                              | "knowledgeBaseIsDraft"
                              | "webSourceRootConflict"
                              | "webSourceRootLimitExceeded"
                              | "preferenceLimitExceeded"
                              | "syncInProgress"
                              | "syncNotHeld"
                              | "sourceDeletionsUnconfirmed"
                              | "documentNotConverted"
                              | "documentNotStored"
                              | "documentInvalidState"
                              | "uploadTooLarge"
                              | "payloadTooLarge"
                              | "validationError"
                              | "unsupportedMediaType"
                              | "sourceTypeMismatch"
                              | "issueNotResolvable"
                              | "issueNotAutoApplicable"
                              | "issueDocumentInvalid"
                              | "issueTransitionConflict"
                              | "draftTitleRequired"
                              | "datasetSourceEmpty"
                              | "datasetAlreadyBound"
                              | "datasetSourceNotBound"
                              | "datasetReadAccessDenied"
                              | "invalidGroqFilter"
                              | "mcpEndpointNotFound"
                              | "mcpEndpointNameConflict"
                              | "mcpEndpointEditConflict"
                              | "mcpSourceKnowledgeBaseNotFound"
                              | "mcpEndpointNotServable"
                              | "conversationNotFound"
                              | "missingCredential"
                              | "invalidCredential"
                              | "missingOrganization"
                              | "organizationAccessDenied"
                              | "knowledgeBaseAccessDenied"
                              | "contextGrantRequired"
                              | "knowledgeBaseCreateAccessDenied"
                              | "mcpEndpointManageAccessDenied"
                              | "insightsWriteAccessDenied"
                              | "sharedOrgPreferencesWriteAccessDenied"
                              | "projectAdminRequired"
                              | "accessCheckFailed"
                              | "planLimitReached"
                              | "featureNotInPlan"
                              | "buildCapReached"
                              | "tooManyConnections"
                              | "jobsUnavailable"
                              | "contextStoreUnavailable"
                              | "crawlingUnavailable"
                              | "crawlPreviewUnavailable"
                              | "instructionDraftFailed"
                              | "instructionScopeVanished"
                              | "purposeDraftFailed"
                              | "noPurposeEvidence"
                              | "idempotencyKeyReused"
                              | "idempotencyRequestInFlight"
                              | "idempotencyParamsMismatch"
                              | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get an MCP endpoint's initial context

      Returns the same text as the initial_context MCP tool, as plain text you can add to a system prompt. heading_offset shifts markdown headings down by that many levels. The default is 1, so # becomes ##.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
            query?: {
                embeddings?: string;
                groqFilter?: string;
                heading_offset?: string;
                instructions?: string;
                knowledgeBases?: string;
                linkResolver?: string;
                mode?: "groq" | "knowledge_base";
                perspective?: string;
                workspace?: string;
            };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; mcpEndpoint: string; organizationId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • mcpEndpoint: string

            The MCP endpoint's name, set when the endpoint was created.

          • organizationId: string

            The ID of the organization.

        • Optionalquery?: {
              embeddings?: string;
              groqFilter?: string;
              heading_offset?: string;
              instructions?: string;
              knowledgeBases?: string;
              linkResolver?: string;
              mode?: "groq" | "knowledge_base";
              perspective?: string;
              workspace?: string;
          }
          • Optionalembeddings?: string

            Set to true or false to turn semantic search on or off. Omit it to use the dataset source setting. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • OptionalgroqFilter?: string

            A GROQ filter that narrows the endpoint's configured content filter for this request. Documents must match both. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • Optionalheading_offset?: string

            How many levels to shift markdown headings down, from 0 to 6. Defaults to 1, so # becomes ##.

          • Optionalinstructions?: string

            Agent instructions that replace the endpoint's configured instructions for this request. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • OptionalknowledgeBases?: string

            Comma-separated knowledge base public IDs (kb...) that replace the endpoint's knowledge base sources for this request. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • OptionallinkResolver?: string

            A JSON array that adds _url fields to query results. Each item has types (document types), baseUrl, and an optional slugExpression, a GROQ expression that defaults to slug.current. Invalid JSON is ignored.

          • Optionalmode?: "groq" | "knowledge_base"

            Serves only one side of the endpoint for this request: knowledge_base serves its knowledge bases and groq serves its dataset. Omit it to serve every source the endpoint has. A request whose chosen side the endpoint doesn't have is refused. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • Optionalperspective?: string

            The perspective for GROQ queries: published (default), previewDrafts, raw, or a release. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • Optionalworkspace?: string

            The studio workspace to use. Replaces the dataset source's workspace for this request. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

      • OptionalrequestBody?: undefined
      • responses: {
            "200": { content?: undefined; headers: { [name: string]: unknown } };
            default: {
                content: {
                    "application/json": {
                        code:
                            | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: { content?: undefined; headers: { [name: string]: unknown } }

          Default Response

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/{apiVersion}/context/organizations/{organizationId}/mcp/{mcpEndpoint}/status": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
                query?: {
                    embeddings?: string;
                    groqFilter?: string;
                    instructions?: string;
                    knowledgeBases?: string;
                    linkResolver?: string;
                    mode?: "groq" | "knowledge_base";
                    perspective?: string;
                    workspace?: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            checks: {
                                access: | { ok: true }
                                | { denied: string[]; error: string; ok: false }
                                | null;
                                knowledgeBases:
                                    | { ok: true; resolved: string[] }
                                    | {
                                        error: string;
                                        missing: string[];
                                        ok: false;
                                        resolved: string[];
                                        unbuilt: string[];
                                    }
                                    | null;
                                schema: | { documentTypes: number; ok: true; perspective: string }
                                | { error: string; ok: false }
                                | null;
                                semanticSearch:
                                    | {
                                        active: boolean;
                                        inactiveReason: | "turnedOff"
                                        | "datasetEmbeddingsNotReady"
                                        | "usageLimitReached"
                                        | null;
                                        ok: true;
                                        status: string
                                        | null;
                                        withinUsageLimit: boolean | null;
                                    }
                                    | { error: string; ok: false }
                                    | null;
                                studio:
                                    | {
                                        availableWorkspaces: { name: ...; title: ... }[];
                                        ok: true;
                                        workspace: string;
                                        workspaceAutoSelected: boolean;
                                        workspaceTitle: string;
                                    }
                                    | { error: string; ok: false }
                                    | null;
                            };
                            ready: boolean;
                            requiredOk: boolean;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                default: {
                    content: {
                        "application/json": {
                            code: | "knowledgeBaseNotFound"
                            | "jobNotFound"
                            | "sourceNotFound"
                            | "documentNotFound"
                            | "syncNotFound"
                            | "uploadNotFound"
                            | "chunkNotFound"
                            | "entryNotFound"
                            | "entryDocumentInvalid"
                            | "revisionNotFound"
                            | "revisionNotBrowsable"
                            | "revisionNotRestorable"
                            | "buildDecisionsNotFound"
                            | "issueNotFound"
                            | "instructionNotFound"
                            | "routeNotFound"
                            | "buildInFlight"
                            | "knowledgeBaseIsDraft"
                            | "webSourceRootConflict"
                            | "webSourceRootLimitExceeded"
                            | "preferenceLimitExceeded"
                            | "syncInProgress"
                            | "syncNotHeld"
                            | "sourceDeletionsUnconfirmed"
                            | "documentNotConverted"
                            | "documentNotStored"
                            | "documentInvalidState"
                            | "uploadTooLarge"
                            | "payloadTooLarge"
                            | "validationError"
                            | "unsupportedMediaType"
                            | "sourceTypeMismatch"
                            | "issueNotResolvable"
                            | "issueNotAutoApplicable"
                            | "issueDocumentInvalid"
                            | "issueTransitionConflict"
                            | "draftTitleRequired"
                            | "datasetSourceEmpty"
                            | "datasetAlreadyBound"
                            | "datasetSourceNotBound"
                            | "datasetReadAccessDenied"
                            | "invalidGroqFilter"
                            | "mcpEndpointNotFound"
                            | "mcpEndpointNameConflict"
                            | "mcpEndpointEditConflict"
                            | "mcpSourceKnowledgeBaseNotFound"
                            | "mcpEndpointNotServable"
                            | "conversationNotFound"
                            | "missingCredential"
                            | "invalidCredential"
                            | "missingOrganization"
                            | "organizationAccessDenied"
                            | "knowledgeBaseAccessDenied"
                            | "contextGrantRequired"
                            | "knowledgeBaseCreateAccessDenied"
                            | "mcpEndpointManageAccessDenied"
                            | "insightsWriteAccessDenied"
                            | "sharedOrgPreferencesWriteAccessDenied"
                            | "projectAdminRequired"
                            | "accessCheckFailed"
                            | "planLimitReached"
                            | "featureNotInPlan"
                            | "buildCapReached"
                            | "tooManyConnections"
                            | "jobsUnavailable"
                            | "contextStoreUnavailable"
                            | "crawlingUnavailable"
                            | "crawlPreviewUnavailable"
                            | "instructionDraftFailed"
                            | "instructionScopeVanished"
                            | "purposeDraftFailed"
                            | "noPurposeEvidence"
                            | "idempotencyKeyReused"
                            | "idempotencyRequestInFlight"
                            | "idempotencyParamsMismatch"
                            | "internal";
                            error: string;
                            fields?: { [key: string]: unknown };
                            message: string;
                            statusCode: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
              query?: {
                  embeddings?: string;
                  groqFilter?: string;
                  instructions?: string;
                  knowledgeBases?: string;
                  linkResolver?: string;
                  mode?: "groq" | "knowledge_base";
                  perspective?: string;
                  workspace?: string;
              };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          checks: {
                              access: | { ok: true }
                              | { denied: string[]; error: string; ok: false }
                              | null;
                              knowledgeBases:
                                  | { ok: true; resolved: string[] }
                                  | {
                                      error: string;
                                      missing: string[];
                                      ok: false;
                                      resolved: string[];
                                      unbuilt: string[];
                                  }
                                  | null;
                              schema: | { documentTypes: number; ok: true; perspective: string }
                              | { error: string; ok: false }
                              | null;
                              semanticSearch:
                                  | {
                                      active: boolean;
                                      inactiveReason: | "turnedOff"
                                      | "datasetEmbeddingsNotReady"
                                      | "usageLimitReached"
                                      | null;
                                      ok: true;
                                      status: string
                                      | null;
                                      withinUsageLimit: boolean | null;
                                  }
                                  | { error: string; ok: false }
                                  | null;
                              studio:
                                  | {
                                      availableWorkspaces: { name: ...; title: ... }[];
                                      ok: true;
                                      workspace: string;
                                      workspaceAutoSelected: boolean;
                                      workspaceTitle: string;
                                  }
                                  | { error: string; ok: false }
                                  | null;
                          };
                          ready: boolean;
                          requiredOk: boolean;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              default: {
                  content: {
                      "application/json": {
                          code: | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                          error: string;
                          fields?: { [key: string]: unknown };
                          message: string;
                          statusCode: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Check an MCP endpoint

      Checks whether the endpoint is ready for agents, and whether your credentials can read what it serves. A failed check returns 200 with that check's ok set to false, so you can see every problem at once. ready summarizes the result. Returns 404 if the endpoint doesn't exist.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { apiVersion: string; mcpEndpoint: string; organizationId: string };
            query?: {
                embeddings?: string;
                groqFilter?: string;
                instructions?: string;
                knowledgeBases?: string;
                linkResolver?: string;
                mode?: "groq" | "knowledge_base";
                perspective?: string;
                workspace?: string;
            };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { apiVersion: string; mcpEndpoint: string; organizationId: string }
          • apiVersion: string

            The API version: a date in the format vYYYY-MM-DD, for example v2026-05-26, or vX for the latest, unstable version.

          • mcpEndpoint: string

            The MCP endpoint's name, set when the endpoint was created.

          • organizationId: string

            The ID of the organization.

        • Optionalquery?: {
              embeddings?: string;
              groqFilter?: string;
              instructions?: string;
              knowledgeBases?: string;
              linkResolver?: string;
              mode?: "groq" | "knowledge_base";
              perspective?: string;
              workspace?: string;
          }
          • Optionalembeddings?: string

            Set to true or false to turn semantic search on or off. Omit it to use the dataset source setting. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • OptionalgroqFilter?: string

            A GROQ filter that narrows the endpoint's configured content filter for this request. Documents must match both. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • Optionalinstructions?: string

            Agent instructions that replace the endpoint's configured instructions for this request. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • OptionalknowledgeBases?: string

            Comma-separated knowledge base public IDs (kb...) that replace the endpoint's knowledge base sources for this request. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • OptionallinkResolver?: string

            A JSON array that adds _url fields to query results. Each item has types (document types), baseUrl, and an optional slugExpression, a GROQ expression that defaults to slug.current. Invalid JSON is ignored.

          • Optionalmode?: "groq" | "knowledge_base"

            Serves only one side of the endpoint for this request: knowledge_base serves its knowledge bases and groq serves its dataset. Omit it to serve every source the endpoint has. A request whose chosen side the endpoint doesn't have is refused. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • Optionalperspective?: string

            The perspective for GROQ queries: published (default), previewDrafts, raw, or a release. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

          • Optionalworkspace?: string

            The studio workspace to use. Replaces the dataset source's workspace for this request. Deprecated: refused from API version v2026-11-03. Configure it on the MCP endpoint instead.

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        checks: {
                            access:
                                | { ok: true }
                                | { denied: string[]; error: string; ok: false }
                                | null;
                            knowledgeBases:
                                | { ok: true; resolved: string[] }
                                | {
                                    error: string;
                                    missing: string[];
                                    ok: false;
                                    resolved: string[];
                                    unbuilt: string[];
                                }
                                | null;
                            schema: | { documentTypes: number; ok: true; perspective: string }
                            | { error: string; ok: false }
                            | null;
                            semanticSearch:
                                | {
                                    active: boolean;
                                    inactiveReason: | "turnedOff"
                                    | "datasetEmbeddingsNotReady"
                                    | "usageLimitReached"
                                    | null;
                                    ok: true;
                                    status: string
                                    | null;
                                    withinUsageLimit: boolean | null;
                                }
                                | { error: string; ok: false }
                                | null;
                            studio:
                                | {
                                    availableWorkspaces: { name: ...; title: ... }[];
                                    ok: true;
                                    workspace: string;
                                    workspaceAutoSelected: boolean;
                                    workspaceTitle: string;
                                }
                                | { error: string; ok: false }
                                | null;
                        };
                        ready: boolean;
                        requiredOk: boolean;
                    };
                };
                headers: { [name: string]: unknown };
            };
            default: {
                content: {
                    "application/json": {
                        code: | "knowledgeBaseNotFound"
                        | "jobNotFound"
                        | "sourceNotFound"
                        | "documentNotFound"
                        | "syncNotFound"
                        | "uploadNotFound"
                        | "chunkNotFound"
                        | "entryNotFound"
                        | "entryDocumentInvalid"
                        | "revisionNotFound"
                        | "revisionNotBrowsable"
                        | "revisionNotRestorable"
                        | "buildDecisionsNotFound"
                        | "issueNotFound"
                        | "instructionNotFound"
                        | "routeNotFound"
                        | "buildInFlight"
                        | "knowledgeBaseIsDraft"
                        | "webSourceRootConflict"
                        | "webSourceRootLimitExceeded"
                        | "preferenceLimitExceeded"
                        | "syncInProgress"
                        | "syncNotHeld"
                        | "sourceDeletionsUnconfirmed"
                        | "documentNotConverted"
                        | "documentNotStored"
                        | "documentInvalidState"
                        | "uploadTooLarge"
                        | "payloadTooLarge"
                        | "validationError"
                        | "unsupportedMediaType"
                        | "sourceTypeMismatch"
                        | "issueNotResolvable"
                        | "issueNotAutoApplicable"
                        | "issueDocumentInvalid"
                        | "issueTransitionConflict"
                        | "draftTitleRequired"
                        | "datasetSourceEmpty"
                        | "datasetAlreadyBound"
                        | "datasetSourceNotBound"
                        | "datasetReadAccessDenied"
                        | "invalidGroqFilter"
                        | "mcpEndpointNotFound"
                        | "mcpEndpointNameConflict"
                        | "mcpEndpointEditConflict"
                        | "mcpSourceKnowledgeBaseNotFound"
                        | "mcpEndpointNotServable"
                        | "conversationNotFound"
                        | "missingCredential"
                        | "invalidCredential"
                        | "missingOrganization"
                        | "organizationAccessDenied"
                        | "knowledgeBaseAccessDenied"
                        | "contextGrantRequired"
                        | "knowledgeBaseCreateAccessDenied"
                        | "mcpEndpointManageAccessDenied"
                        | "insightsWriteAccessDenied"
                        | "sharedOrgPreferencesWriteAccessDenied"
                        | "projectAdminRequired"
                        | "accessCheckFailed"
                        | "planLimitReached"
                        | "featureNotInPlan"
                        | "buildCapReached"
                        | "tooManyConnections"
                        | "jobsUnavailable"
                        | "contextStoreUnavailable"
                        | "crawlingUnavailable"
                        | "crawlPreviewUnavailable"
                        | "instructionDraftFailed"
                        | "instructionScopeVanished"
                        | "purposeDraftFailed"
                        | "noPurposeEvidence"
                        | "idempotencyKeyReused"
                        | "idempotencyRequestInFlight"
                        | "idempotencyParamsMismatch"
                        | "internal";
                        error: string;
                        fields?: { [key: string]: unknown };
                        message: string;
                        statusCode: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      checks: {
                          access:
                              | { ok: true }
                              | { denied: string[]; error: string; ok: false }
                              | null;
                          knowledgeBases:
                              | { ok: true; resolved: string[] }
                              | {
                                  error: string;
                                  missing: string[];
                                  ok: false;
                                  resolved: string[];
                                  unbuilt: string[];
                              }
                              | null;
                          schema: | { documentTypes: number; ok: true; perspective: string }
                          | { error: string; ok: false }
                          | null;
                          semanticSearch:
                              | {
                                  active: boolean;
                                  inactiveReason: | "turnedOff"
                                  | "datasetEmbeddingsNotReady"
                                  | "usageLimitReached"
                                  | null;
                                  ok: true;
                                  status: string
                                  | null;
                                  withinUsageLimit: boolean | null;
                              }
                              | { error: string; ok: false }
                              | null;
                          studio:
                              | {
                                  availableWorkspaces: { name: ...; title: ... }[];
                                  ok: true;
                                  workspace: string;
                                  workspaceAutoSelected: boolean;
                                  workspaceTitle: string;
                              }
                              | { error: string; ok: false }
                              | null;
                      };
                      ready: boolean;
                      requiredOk: boolean;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Default Response

        • default: {
              content: {
                  "application/json": {
                      code:
                          | "knowledgeBaseNotFound"
                          | "jobNotFound"
                          | "sourceNotFound"
                          | "documentNotFound"
                          | "syncNotFound"
                          | "uploadNotFound"
                          | "chunkNotFound"
                          | "entryNotFound"
                          | "entryDocumentInvalid"
                          | "revisionNotFound"
                          | "revisionNotBrowsable"
                          | "revisionNotRestorable"
                          | "buildDecisionsNotFound"
                          | "issueNotFound"
                          | "instructionNotFound"
                          | "routeNotFound"
                          | "buildInFlight"
                          | "knowledgeBaseIsDraft"
                          | "webSourceRootConflict"
                          | "webSourceRootLimitExceeded"
                          | "preferenceLimitExceeded"
                          | "syncInProgress"
                          | "syncNotHeld"
                          | "sourceDeletionsUnconfirmed"
                          | "documentNotConverted"
                          | "documentNotStored"
                          | "documentInvalidState"
                          | "uploadTooLarge"
                          | "payloadTooLarge"
                          | "validationError"
                          | "unsupportedMediaType"
                          | "sourceTypeMismatch"
                          | "issueNotResolvable"
                          | "issueNotAutoApplicable"
                          | "issueDocumentInvalid"
                          | "issueTransitionConflict"
                          | "draftTitleRequired"
                          | "datasetSourceEmpty"
                          | "datasetAlreadyBound"
                          | "datasetSourceNotBound"
                          | "datasetReadAccessDenied"
                          | "invalidGroqFilter"
                          | "mcpEndpointNotFound"
                          | "mcpEndpointNameConflict"
                          | "mcpEndpointEditConflict"
                          | "mcpSourceKnowledgeBaseNotFound"
                          | "mcpEndpointNotServable"
                          | "conversationNotFound"
                          | "missingCredential"
                          | "invalidCredential"
                          | "missingOrganization"
                          | "organizationAccessDenied"
                          | "knowledgeBaseAccessDenied"
                          | "contextGrantRequired"
                          | "knowledgeBaseCreateAccessDenied"
                          | "mcpEndpointManageAccessDenied"
                          | "insightsWriteAccessDenied"
                          | "sharedOrgPreferencesWriteAccessDenied"
                          | "projectAdminRequired"
                          | "accessCheckFailed"
                          | "planLimitReached"
                          | "featureNotInPlan"
                          | "buildCapReached"
                          | "tooManyConnections"
                          | "jobsUnavailable"
                          | "contextStoreUnavailable"
                          | "crawlingUnavailable"
                          | "crawlPreviewUnavailable"
                          | "instructionDraftFailed"
                          | "instructionScopeVanished"
                          | "purposeDraftFailed"
                          | "noPurposeEvidence"
                          | "idempotencyKeyReused"
                          | "idempotencyRequestInFlight"
                          | "idempotencyParamsMismatch"
                          | "internal";
                      error: string;
                      fields?: { [key: string]: unknown };
                      message: string;
                      statusCode: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Error

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined