Frontline Knowledge Bases API
Manage knowledge bases, their sources (URLs, website crawls), search, and agent assignment
Manage knowledge bases, their sources (URLs, website crawls), search, and agent assignment
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/frontline-knowledge-bases-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
title: Public Knowledge Bases API
version: 1.0.0
description: 'Public API for accessing agents, flows, and analytics.
## Authentication
The Public API supports two API key types. Pass the key as a Bearer token:
```
Authorization: Bearer <YOUR_API_KEY>
```
### Account API key (GENERAL)
Account-level key that acts on behalf of the entire account. Required for account-level endpoints unless noted otherwise.
### User API key (USER)
User-level key tied to a specific user. Required for write operations and user-owned resources. **Also accepted on all account-level endpoints.**
Each operation documents which key type(s) it accepts in its **Security** section.'
license:
name: Proprietary
url: https://www.getfrontline.ai/terms-and-conditions
servers:
- url: https://prod-api.getfrontline.ai
tags:
- name: Knowledge Bases
description: Manage knowledge bases, their sources (URLs, website crawls), search, and agent assignment
paths:
/public/v1/knowledge-bases:
get:
summary: List knowledge bases
operationId: listKnowledgeBases
description: Lists knowledge bases for the account. Filter by shared/private and search text. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: string
enum:
- 'true'
- 'false'
required: false
name: isShared
in: query
- schema:
type: string
required: false
name: searchText
in: query
responses:
'200':
description: Paginated knowledge bases
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeBaseList'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
summary: Create knowledge base
operationId: createKnowledgeBase
description: Creates a knowledge base. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeBaseCreateInput'
responses:
'201':
description: Created knowledge base
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeBase'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/public/v1/knowledge-bases/{knowledgeBaseId}:
get:
summary: Get knowledge base details
operationId: getKnowledgeBase
description: Returns a knowledge base by ID. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
responses:
'200':
description: Knowledge base details
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeBase'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
summary: Update knowledge base
operationId: updateKnowledgeBase
description: Updates a knowledge base's name or description. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeBaseUpdateInput'
responses:
'200':
description: Updated knowledge base
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeBase'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
summary: Delete knowledge base
operationId: deleteKnowledgeBase
description: Deletes a knowledge base and all of its sources. Default knowledge bases cannot be deleted. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
responses:
'204':
description: Knowledge base deleted
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/public/v1/knowledge-bases/{knowledgeBaseId}/search:
post:
summary: Search a knowledge base
operationId: searchKnowledgeBase
description: Semantic search over a knowledge base's indexed content. Returns matching chunks with similarity scores. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeSearchInput'
responses:
'200':
description: Search results
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeSearchResult'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/public/v1/knowledge-bases/{knowledgeBaseId}/sources:
get:
summary: List knowledge base sources
operationId: listKnowledgeSources
description: Lists all sources (files, URLs, web pages) in a knowledge base. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
- schema:
type: string
required: false
name: filterText
in: query
- schema:
type: string
enum:
- NONE
- PROCESSING
- COMPLETED
- FAILED
- DELETING
- DELETED
- SYNCING
- REJECTED
required: false
name: status
in: query
- schema:
type: string
enum:
- UNKNOWN
- FILE
- URL
- ARTICLE
- QNA
- WEBPAGE
- FOLDER
required: false
name: sourceType
in: query
- schema:
type: string
required: false
name: fileTypes
in: query
responses:
'200':
description: Paginated sources
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeSourceList'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
summary: Remove knowledge sources
operationId: removeKnowledgeSources
description: Removes the given sources from a knowledge base. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeSourceRemoveInput'
responses:
'204':
description: Sources removed
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/public/v1/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}:
get:
summary: Get knowledge source details
operationId: getKnowledgeSource
description: Returns a single knowledge source by ID. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
- schema:
type: integer
example: 340
exclusiveMinimum: 0
required: true
name: sourceId
in: path
responses:
'200':
description: Source details
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeSource'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/public/v1/knowledge-bases/{knowledgeBaseId}/sources/urls:
post:
summary: Add URL sources
operationId: addKnowledgeUrlSource
description: Adds one or more URL sources to a knowledge base. The URLs are fetched and indexed asynchronously. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeUrlSourceInput'
responses:
'201':
description: Created sources
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PublicKnowledgeSource'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/public/v1/knowledge-bases/{knowledgeBaseId}/website-crawls:
post:
summary: Add a website crawl source
operationId: addKnowledgeWebsiteCrawl
description: Starts a website crawl that discovers and indexes pages under the given URL. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeWebsiteCrawlInput'
responses:
'201':
description: Created website crawl source
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeWebsiteCrawl'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/public/v1/knowledge-bases/{knowledgeBaseId}/sources/resync:
post:
summary: Resync knowledge sources
operationId: resyncKnowledgeSources
description: Re-fetches and re-indexes the given URL/web-page sources. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeSourceResyncInput'
responses:
'200':
description: Resync result
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeSourceResyncResult'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/public/v1/knowledge-bases/{knowledgeBaseId}/website-crawls/{websiteSourceId}/resync:
post:
summary: Resync a website crawl
operationId: resyncKnowledgeWebsiteCrawl
description: Re-crawls a website source, optionally overriding crawl configuration. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
- schema:
type: integer
example: 88
exclusiveMinimum: 0
required: true
name: websiteSourceId
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeWebsiteResyncInput'
responses:
'204':
description: Resync queued
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/public/v1/knowledge-bases/{knowledgeBaseId}/website-crawls/{websiteSourceId}/sync-history:
get:
summary: Get website crawl sync history
operationId: getKnowledgeWebsiteSyncHistory
description: Lists sync summaries (crawl runs) for a website source. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: integer
example: 12
exclusiveMinimum: 0
required: true
name: knowledgeBaseId
in: path
- schema:
type: integer
example: 88
exclusiveMinimum: 0
required: true
name: websiteSourceId
in: path
- schema:
type: string
enum:
- INITIAL_SYNC
- MANUAL_RESYNC
- AUTO_RESYNC
required: false
name: syncType
in: query
- schema:
type: string
enum:
- PROCESSING
- SYNCING
- COMPLETED
- FAILED
- DELETING
- DELETED
required: false
name: status
in: query
- schema:
type: number
default: 20
required: false
name: pageSize
in: query
- schema:
type: number
default: 1
required: false
name: pageNum
in: query
- schema:
anyOf:
- type:
- number
- 'null'
- type: string
- {}
required: false
name: cursor
in: query
responses:
'200':
description: Paginated sync summaries
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeSyncSummaryList'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/public/v1/agents/{agentId}/knowledge-bases:
get:
summary: List knowledge bases assigned to an agent
operationId: listAssignedKnowledgeBases
description: Lists knowledge bases assigned to a specific agent. Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: string
example: asst_123
required: true
name: agentId
in: path
responses:
'200':
description: Assigned knowledge bases
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeBaseAssignmentList'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
summary: Assign knowledge bases to an agent
operationId: assignKnowledgeBases
description: Sets the full list of shared knowledge bases assigned to an agent (replaces existing assignments). Requires a USER API key.
security:
- userApiKey: []
tags:
- Knowledge Bases
parameters:
- schema:
type: string
example: asst_123
required: true
name: agentId
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeBaseAssignInput'
responses:
'200':
description: Updated assignments
content:
application/json:
schema:
$ref: '#/components/schemas/PublicKnowledgeBaseAssignmentList'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
PublicKnowledgeSource:
type: object
properties:
id:
type: number
externalId:
type:
- string
- 'null'
knowledgeBaseId:
type: number
name:
type: string
description:
type:
- string
- 'null'
url:
type:
- string
- 'null'
sourceType:
type: string
enum:
- UNKNOWN
- FILE
- URL
- ARTICLE
- QNA
- WEBPAGE
- FOLDER
websiteSourceId:
type:
- number
- 'null'
autoSyncFrequency:
type: string
enum:
- NONE
- DAILY
- WEEKLY
- MONTHLY
status:
type: string
enum:
- NONE
- PROCESSING
- COMPLETED
- FAILED
- DELETING
- DELETED
- SYNCING
- REJECTED
charactersCount:
type: number
ingestJobRunId:
type:
- string
- 'null'
fileExtensionType:
type:
- string
- 'null'
enum:
- UNKNOWN
- PDF
- DOC
- DOCX
- TXT
- CSV
- JSON
- MD
- HTML
createdAt:
type: string
updatedAt:
type: string
lastSyncedAt:
type:
- string
- 'null'
folderId:
type:
- number
- 'null'
parsedTextFileUrl:
type:
- string
- 'null'
parsedText:
type:
- string
- 'null'
websiteSource:
type:
- object
- 'null'
properties:
id:
type: number
name:
type: string
sourceUrl:
type: string
websiteType:
type: string
enum:
- WEBSITE_CRAWL
- SITEMAP
status:
type: string
enum:
- PROCESSING
- SYNCING
- COMPLETED
- FAILED
- DELETING
- DELETED
autoSyncFrequency:
type: string
enum:
- NONE
- DAILY
- WEEKLY
- MONTHLY
lastSyncedAt:
type:
- string
- 'null'
webPages:
type:
- number
- 'null'
_count:
type:
- object
- 'null'
properties:
webPages:
type:
- number
- 'null'
required:
- id
- name
- sourceUrl
- websiteType
- status
- autoSyncFrequency
- lastSyncedAt
addedByUser:
type:
- object
- 'null'
properties:
id:
type: number
firstName:
type: string
lastName:
type: string
avatar:
type:
- string
- 'null'
required:
- id
- firstName
- lastName
scrapeOptions:
type:
- object
- 'null'
properties:
includeSelectors:
type: array
items:
type: string
excludeSelectors:
type: array
items:
type: string
required:
- id
- externalId
- knowledgeBaseId
- name
- description
- url
- sourceType
- websiteSourceId
- autoSyncFrequency
- status
- charactersCount
- ingestJobRunId
- fileExtensionType
- createdAt
- updatedAt
- lastSyncedAt
- folderId
- parsedTextFileUrl
- addedByUser
PublicKnowledgeBaseAssignmentList:
type: array
items:
$ref: '#/components/schemas/PublicKnowledgeBaseAssignment'
PublicKnowledgeSourceResyncResult:
type: object
properties:
itemsQueued:
type: number
itemsSkipped:
type: number
details:
type: array
items:
type: object
properties:
sourceId:
type: number
status:
type: string
error:
type:
- string
- 'null'
required:
- sourceId
- status
- error
required:
- itemsQueued
- itemsSkipped
- details
PublicKnowledgeSyncSummary:
type: object
properties:
id:
type: number
syncType:
type: string
enum:
- INITIAL_SYNC
- MANUAL_RESYNC
- AUTO_RESYNC
status:
type: string
enum:
- PROCESSING
- SYNCING
- COMPLETED
- FAILED
- DELETING
- DELETED
startedAt:
type: string
finishedAt:
type:
- string
- 'null'
duration:
type:
- number
- 'null'
syncedPages:
type: number
failedPages:
type: number
rejectedPages:
type: number
removedPages:
type: number
totalPages:
type: number
errorMessage:
type:
- string
- 'null'
ingestJobRunId:
type:
- string
- 'null'
websiteSourceId:
type: number
knowledgeBaseId:
type: number
triggeredByUserId:
type:
- number
- 'null'
websiteSource:
type: object
properties:
id:
type: number
name:
type: string
sourceUrl:
type: string
websiteType:
type: string
enum:
- WEBSITE_CRAWL
- SITEMAP
required:
- id
- name
- sourceUrl
- websiteType
triggeredByUser:
type:
- object
- 'null'
properties:
id:
type: number
firstName:
type: string
lastName:
type: string
avatar:
type:
- string
- 'null'
required:
- id
- firstName
- lastName
- avatar
createdAt:
type: string
updatedAt:
type: string
required:
- id
- syncType
- status
- startedAt
- finishedAt
- duration
- syncedPages
- failedPages
- rejectedPages
- removedPages
- totalPages
- errorMessage
- ingestJobRunId
- websiteSourceId
- knowledgeBaseId
- triggeredByUserId
- websiteSource
- triggeredByUser
- createdAt
- updatedAt
PublicKnowledgeSourceRemoveInput:
type: object
properties:
sourceIds:
type: array
items:
type: integer
exclusiveMinimum: 0
minItems: 1
maxItems: 100
required:
- sourceIds
PublicKnowledgeSearchInput:
type: object
properties:
query:
type: string
minLength: 1
example: refund policy
limit:
type: integer
maximum: 50
example: 10
exclusiveMinimum: 0
required:
- query
PublicKnowledgeBaseAssignInput:
type: object
properties:
knowledgeBaseIds:
type: array
items:
type: integer
exclusiveMinimum: 0
example:
- 12
- 13
required:
- knowledgeBaseIds
PublicKnowledgeBaseUpdateInput:
type: object
properties:
name:
type: string
minLength: 1
description:
type:
- string
- 'null'
PublicKnowledgeBaseAssignment:
type: object
properties:
id:
type: number
knowledgeBaseId:
type: number
assistantId:
type: string
maxUserProfileId:
type: number
assignedAt:
type: string
knowledgeBase:
type: object
properties:
id:
type: number
name:
type: string
description:
type:
- string
- 'null'
namespace:
type:
- string
- 'null'
isShared:
type: boolean
isDefault:
type: boolean
createdAt:
type: string
updatedAt:
type: string
required:
- id
- name
- description
- namespace
- isShared
- isDefault
- createdAt
- updatedAt
required:
- id
- knowledgeBaseId
- assignedAt
- knowledgeBase
PublicKnowledgeSyncSummaryList:
type: object
properties:
count:
type: number
pageSize:
type: number
pageNum:
type: number
totalPages:
type: number
cursor:
type: number
results:
type: array
items:
$ref: '#/components/schemas/PublicKnowledgeSyncSummary'
paginationType:
type: string
enum:
- offset
- cursor
default: offset
nextCursor:
anyOf:
- type: string
- type: number
- {}
required:
- pageSize
- results
ErrorBody:
type: object
properties:
code:
type: string
enum:
- bad_request
- unauthorized
- forbidden
- not_found
- conflict
- internal_error
- cli_outdated
example: unauthorized
message:
type: string
example: Detailed error message
details:
type: object
description: 'Optional structured details. Validation errors include `{ issues: [...] }`.'
example:
issues:
- path:
- name
message: String must contain at least 1 character(s)
code: too_small
required:
- code
- message
PublicKnowledgeSourceResyncInput:
type: object
properties:
sourceIds:
type: array
items:
type: integer
exclusiveMinimum: 0
minItems: 1
maxItems: 50
required:
- sourceIds
PublicKnowledgeWebsiteResyncInput:
type: object
properties:
description:
type: string
maxLength: 1000
maxDepth:
type: integer
minimum: 1
maximum: 5
maxLinks:
type: integer
minimum: 1
maximum: 1000
includePaths:
type: array
items:
type: string
excludePaths:
type: array
items:
type: string
scrapeOptions:
type: object
properties:
includeSelectors:
type: array
items:
type: string
excludeSelectors:
type: array
items:
type: string
autoSyncFrequency:
type: string
enum:
- NONE
- DAILY
- WEEKLY
- MONTHLY
PublicKnowledgeSourceList:
type: object
properties:
count:
type: number
pageSize:
type: number
pageNum:
type: number
totalPages:
type: number
cursor:
type: number
results:
type: array
items:
$ref: '#/components/schemas/PublicKnowledgeSource'
paginationType:
type: string
enum:
- offset
- cursor
default: offset
nextCursor:
anyOf:
- type: string
- type: number
- {}
required:
- pageSize
- results
PublicKnowledgeBase:
type: object
properties:
id:
type: number
accountId:
type: number
name:
type: string
description:
type:
- string
- 'null'
namespace:
type:
- string
- 'null'
isShared:
type: boolean
isDefault:
type: boolean
vectorStoreId:
type:
- string
- 'null'
createdBy:
type:
- object
- 'null'
properties:
id:
type: number
firstName:
type: string
lastName:
type: string
email:
type: string
format: email
avatar:
type:
- string
- 'null'
required:
- id
- firstName
- lastName
- email
createdAt:
type: string
updatedAt:
type: string
required:
- id
- accountId
- name
- description
- namespace
- isShared
- isDefault
- vectorStoreId
- createdAt
- updatedAt
PublicKnowledgeWebsiteCrawlInput:
type: object
properties:
description:
type: string
maxLength: 1000
sourceUrl:
type: string
format: uri
websiteType:
type: string
enum:
- WEBSITE_CRAWL
- SITEMAP
maxDepth:
# --- truncated at 32 KB (38 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/frontline/refs/heads/main/openapi/frontline-knowledge-bases-api-openapi.yml