Business
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
GET | |
GET | |
POST | |
POST | |
POST | |
POST | |
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
GET | |
POST | |
GET | |
DELETE | |
POST | |
POST | |
POST | |
GET |
List all business knowledge documents window
Read-only access to parsed knowledge documents. Exposes hybrid search
(search) and a drill-down window (window) so an agent (PHAI or
MCP) can find and explore business knowledge chunks.
Required API key scopes
business_knowledge:readPath parameters
- idstring
Query parameters
- around_ordinalinteger
- radiusinteger
Example request
GET /api /projects /:project_id /business_knowledge /documents /:id /windowExample response
Status 200
List all business knowledge documents search
Read-only access to parsed knowledge documents. Exposes hybrid search
(search) and a drill-down window (window) so an agent (PHAI or
MCP) can find and explore business knowledge chunks.
Required API key scopes
business_knowledge:readQuery parameters
- library_idstring
- limitinteger
- querystring
- rerankboolean
Example request
GET /api /projects /:project_id /business_knowledge /documents /searchExample response
Status 200
List all business knowledge gap suggestions
Surfaces topics the support AI couldn't answer from the knowledge base.
Two list shapes controlled by the ticket_id query param:
- per-ticket (
?ticket_id=<uuid>): individual gap rows for that ticket. - aggregated (no
ticket_id): gaps grouped by normalized topic with counts, for the Business knowledge suggestions panel.
Required API key scopes
business_knowledge:readQuery parameters
- limitinteger
- offsetinteger
- ticket_idstring
Response
Example request
GET /api /projects /:project_id /business_knowledge /gap_suggestionsExample response
Status 200
Create business knowledge gap suggestions accept
Surfaces topics the support AI couldn't answer from the knowledge base.
Two list shapes controlled by the ticket_id query param:
- per-ticket (
?ticket_id=<uuid>): individual gap rows for that ticket. - aggregated (no
ticket_id): gaps grouped by normalized topic with counts, for the Business knowledge suggestions panel.
Required API key scopes
business_knowledge:writeticket:readPath parameters
- idstring
Request parameters
- resolved_source_idstring | null
Response
Example request
POST /api /projects /:project_id /business_knowledge /gap_suggestions /:id /acceptExample response
Status 200
Create business knowledge gap suggestions dismiss
Surfaces topics the support AI couldn't answer from the knowledge base.
Two list shapes controlled by the ticket_id query param:
- per-ticket (
?ticket_id=<uuid>): individual gap rows for that ticket. - aggregated (no
ticket_id): gaps grouped by normalized topic with counts, for the Business knowledge suggestions panel.
Required API key scopes
business_knowledge:writeticket:readPath parameters
- idstring
Response
Example request
POST /api /projects /:project_id /business_knowledge /gap_suggestions /:id /dismissExample response
Status 200
Create business knowledge gap suggestions accept topic
Accept all pending suggestions for a normalized topic cluster.
Request parameters
- normalized_topicstring
- resolved_source_idstring | null
Response
Example request
POST /api /projects /:project_id /business_knowledge /gap_suggestions /accept_topicExample response
Status 200
Create business knowledge gap suggestions dismiss topic
Dismiss all pending suggestions for a normalized topic cluster.
Request parameters
- normalized_topicstring
- resolved_source_idstring | null
Response
Example request
POST /api /projects /:project_id /business_knowledge /gap_suggestions /dismiss_topicExample response
Status 200
List all business knowledge libraries
Libraries in this project. The default library is first.
Required API key scopes
business_knowledge:readExample request
GET /api /projects /:project_id /business_knowledge /librariesExample response
Status 200
Create business knowledge libraries
Required API key scopes
business_knowledge:writeRequest parameters
- namestring
Response
Example request
POST /api /projects /:project_id /business_knowledge /librariesExample response
Status 201
Retrieve business knowledge libraries
Required API key scopes
business_knowledge:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /business_knowledge /libraries /:idExample response
Status 200
Update business knowledge libraries
Send only the fields you want to change. source_ids replaces every source in the library. repos replaces this environment's repositories and leaves repositories that only another environment allows.
Required API key scopes
business_knowledge:writePath parameters
- idstring
Request parameters
- namestring
- source_idsarray
- reposarray
Response
Example request
PATCH /api /projects /:project_id /business_knowledge /libraries /:idExample response
Status 200
Delete business knowledge libraries
Removes the library and its links. Sources, documents, and selected repositories stay.
Required API key scopes
business_knowledge:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /business_knowledge /libraries /:idExample response
Status 204 No response body
List all business knowledge playground chats
Chats started by the current user in this project.
Required API key scopes
business_knowledge:readExample request
GET /api /projects /:project_id /business_knowledge /playground /chatsExample response
Status 200
Create business knowledge playground chats
Create an empty chat. The first question sets the title.
Required API key scopes
business_knowledge:writeResponse
Example request
POST /api /projects /:project_id /business_knowledge /playground /chatsExample response
Status 201 Empty playground chat.
Retrieve business knowledge playground chats
Reload a chat and its turns. Each turn's answer comes from its sandbox run. A chat started before AI data processing was turned off can still be read.
Required API key scopes
business_knowledge:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /business_knowledge /playground /chats /:idExample response
Status 200 Playground chat with turns.
Status 404 No playground chat with this id for the current user.
Delete business knowledge playground chats
Deletes the chat and its turns. Does not cancel a running sandbox agent.
Required API key scopes
business_knowledge:writePath parameters
- idstring
Example request
DELETE /api /projects /:project_id /business_knowledge /playground /chats /:idExample response
Status 204 Chat deleted.
Create business knowledge playground chats ask
Append a turn and start a sandbox run. A second question in the same chat while its answer is still open returns 409. Other chats can run at the same time, up to 3 open answers per person.
Required API key scopes
business_knowledge:writePath parameters
- idstring
Request parameters
- questionstring
Response
Example request
POST /api /projects /:project_id /business_knowledge /playground /chats /:id /askExample response
Status 201 Chat with the new turn.
Status 403 AI data processing is not approved for this organization.
Status 409 This chat already has an answer that has not finished, or this person already has 3 answers running.
Create business knowledge repositories connect
Stores the installation for this environment. Switching installations clears the selected repositories.
Required API key scopes
business_knowledge:writeRequest parameters
- integration_idinteger
Response
Example request
POST /api /projects /:project_id /business_knowledge /repositories /connectExample response
Status 200
Create business knowledge repositories disconnect
Clears the installation and the selected repositories for this environment.
Required API key scopes
business_knowledge:writeResponse
Example request
POST /api /projects /:project_id /business_knowledge /repositories /disconnectExample response
Status 200
Retrieve business knowledge repositories file
Reads one file whose path is in the cached file list, at the cached commit. The path must come from the repository search.
Required API key scopes
business_knowledge:readQuery parameters
- library_idstring
- pathstring
- repostring
Response
Example request
GET /api /projects /:project_id /business_knowledge /repositories /file










