applyIssues
applyIssues: {
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 };
};
};
}
buildKnowledgeBase
buildKnowledgeBase: {
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 };
};
};
}
cancelKnowledgeBaseBuild
cancelKnowledgeBaseBuild: {
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 };
};
};
}
classifyConversation
classifyConversation: {
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 };
};
};
}
Type declaration
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
organizationId: string
threadId: string
Optionalquery?: 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 };
};
}
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 };
}
confirmSync
confirmSync: {
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 };
};
};
}
createInstruction
createInstruction: {
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 };
};
};
}
Type declaration
parameters: {
cookie?: undefined;
header?: undefined;
path: { apiVersion: string; knowledgeBaseId: string };
query?: undefined;
}
Optionalcookie?: undefined
Optionalheader?: undefined
path: { apiVersion: string; knowledgeBaseId: string }
apiVersion: string
knowledgeBaseId: string
Optionalquery?: 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 };
};
}
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 };
}
createKnowledgeBase
createKnowledgeBase: {
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: "pending"
| "running"
| "done"
| "failed";
units?: { done: ...; total?: ...; unit: ... };
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 };
};
};
}
createMcpEndpoint
createMcpEndpoint: {
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 };
};
};
}
Type declaration
parameters: {
cookie?: undefined;
header?: undefined;
path: { apiVersion: string; organizationId: string };
query?: undefined;
}
Optionalcookie?: undefined
Optionalheader?: undefined
path: { apiVersion: string; organizationId: string }
apiVersion: string
organizationId: string
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;
};
};
}
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 };
}
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 };
}
createSource
createSource: {
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 };
};
};
}
Type declaration
parameters: {
cookie?: undefined;
header?: { "Idempotency-Key"?: string };
path: { apiVersion: string; knowledgeBaseId: string };
query?: undefined;
}
Optionalcookie?: undefined
Optionalheader?: { "Idempotency-Key"?: string }
OptionalIdempotency-Key?: string
path: { apiVersion: string; knowledgeBaseId: string }
apiVersion: string
knowledgeBaseId: string
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";
};
};
}
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 };
}
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 };
}
deleteConversation
deleteConversation: {
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 };
};
};
}
deleteDocument
deleteDocument: {
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 };
};
};
}
deleteInstruction
deleteInstruction: {
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 };
};
};
}
deleteKnowledgeBase
deleteKnowledgeBase: {
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 };
};
};
}
deleteMcpEndpoint
deleteMcpEndpoint: {
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 };
};
};
}
deleteSource
deleteSource: {
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 };
};
};
}
discardSync
discardSync: {
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 };
};
};
}
dismissIssue
dismissIssue: {
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?: "primary" | "secondary" | "community";
citations?: (...)[];
claim: string;
documentIds?: (...)[];
entryPaths?: (...)[];
value?: string;
where?: string;
}[];
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 };
};
};
}
getDocument
getDocument: {
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 };
};
};
}
getDocumentContent
getDocumentContent: {
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 };
};
};
}
getJob
getJob: {
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 };
};
};
}
getKnowledgeBase
getKnowledgeBase: {
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: "pending"
| "running"
| "done"
| "failed";
units?: { done: ...; total?: ...; unit: ... };
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 };
};
};
}
getMcpEndpointInitialContext
getMcpEndpointInitialContext: {
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 };
};
};
}
getMcpEndpointStatus
getMcpEndpointStatus: {
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: string; title: string }[];
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 };
};
};
}
getSource
getSource: {
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 };
};
};
}
getSync
getSync: {
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 };
};
};
}
listDocuments
listDocuments: {
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 };
};
};
}
listKnowledgeBases
listKnowledgeBases: {
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: { id: ...; status: ...; units?: ...; weight: ... }[];
}
| 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;
}[];
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 };
};
};
}
listSources
listSources: {
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?: boolean;
includePaths?: (...)[];
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: (...)
| (...);
finishedAt: (...) | (...);
heldDeletions: (...) | (...);
id: string;
mode: (...) | (...);
partialReason: (...) | (...) | (...) | (...);
sourceId: string;
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: string;
documentsDeleted: number;
documentsMissing: number;
documentsSeen: number;
documentsUnchanged: number;
documentsUpserted: number;
error: (...)
| (...);
finishedAt: (...) | (...);
heldDeletions: (...) | (...);
id: string;
mode: (...) | (...);
partialReason: (...) | (...) | (...) | (...);
sourceId: string;
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: string;
documentsDeleted: number;
documentsMissing: number;
documentsSeen: number;
documentsUnchanged: number;
documentsUpserted: number;
error: (...)
| (...);
finishedAt: (...) | (...);
heldDeletions: (...) | (...);
id: string;
mode: (...) | (...);
partialReason: (...) | (...) | (...) | (...);
sourceId: string;
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 };
};
};
}
listSyncs
listSyncs: {
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 };
};
};
}
rebuildEntry
rebuildEntry: {
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 };
};
};
}
reopenIssue
reopenIssue: {
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?: "primary" | "secondary" | "community";
citations?: (...)[];
claim: string;
documentIds?: (...)[];
entryPaths?: (...)[];
value?: string;
where?: string;
}[];
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 };
};
};
}
resolveIssue
resolveIssue: {
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: 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";
};
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 };
};
};
}
saveConversation
saveConversation: {
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 };
};
};
}
Type declaration
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
organizationId: string
threadId: string
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;
};
};
};
}
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 };
}
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 };
}
serveMcpEndpoint
serveMcpEndpoint: {
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 } };
};
}
startSourceUpload
startSourceUpload: {
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 };
};
};
}
Type declaration
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
path: { apiVersion: string; knowledgeBaseId: string; sourceId: string }
apiVersion: string
knowledgeBaseId: string
sourceId: string
Optionalquery?: 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 };
};
}
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 };
}
startSync
startSync: {
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 };
};
};
}
Type declaration
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
path: { apiVersion: string; knowledgeBaseId: string; sourceId: string }
apiVersion: string
knowledgeBaseId: string
sourceId: string
Optionalquery?: 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 };
};
}
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 };
}
syncAllSources
syncAllSources: {
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 };
};
};
}
updateDocument
updateDocument: {
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 };
};
};
}
Type declaration
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
documentId: string
knowledgeBaseId: string
Optionalquery?: 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 };
};
}
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 };
}
updateInstruction
updateInstruction: {
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 };
};
};
}
Type declaration
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
instructionId: string
knowledgeBaseId: string
Optionalquery?: 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 };
};
}
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 };
}
updateKnowledgeBase
updateKnowledgeBase: {
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: "pending"
| "running"
| "done"
| "failed";
units?: { done: ...; total?: ...; unit: ... };
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 };
};
};
}
updateMcpEndpoint
updateMcpEndpoint: {
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 };
};
};
}
Type declaration
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
mcpEndpoint: string
organizationId: string
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;
};
};
}
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 };
}
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 };
}
updateSource
updateSource: {
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 };
};
};
}
Type declaration
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
knowledgeBaseId: string
sourceId: string
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;
};
};
}
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 };
}
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 };
}
Description
The API version: a date in the format
vYYYY-MM-DD, for examplev2026-05-26, orvXfor the latest, unstable version.