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 | |
DELETE | |
POST | |
POST | |
POST | |
GET | |
GET | |
POST | |
GET | |
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
- 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 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
- pathstring
- repostring
Response
Example request
GET /api /projects /:project_id /business_knowledge /repositories /fileExample response
Status 200
Retrieve business knowledge repositories
Matches file paths and README text in the cached default-branch file list. Pass file names or identifiers, then read a file. Does not search file contents.
Required API key scopes
business_knowledge:readQuery parameters
- querystring
- repostring
Response
Example request
GET /api /projects /:project_id /business_knowledge /repositories /searchExample response
Status 200
Create business knowledge repositories selection
Every name must be a repository the connected installation can see. Names are stored lowercased.
Required API key scopes
business_knowledge:writeRequest parameters
- reposarray
Response
Example request
POST /api /projects /:project_id /business_knowledge /repositories /selectionExample response
Status 200
Retrieve business knowledge repositories status
The GitHub installation and the repositories this environment allows business knowledge to read.
Required API key scopes
business_knowledge:readResponse
Example request
GET /api /projects /:project_id /business_knowledge /repositories /statusExample response
Status 200
Create business knowledge sandbox
Start a sandbox agent that can search only this project's business knowledge. Returns immediately.
Required API key scopes
business_knowledge:writeRequest parameters
- questionstring
Response
Example request
POST /api /projects /:project_id /business_knowledge /sandboxExample response
Status 201 The sandbox run has started.
Status 403 AI data processing is not approved for this organization.
Status 409 This person already has a sandbox run that has not finished.
Retrieve business knowledge sandbox
Poll a sandbox run started by the current user. A run that 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 /sandbox /:id