Agents Faqs

API endpoints for Agents Faqs

GET /api/agents/{agent_id}/faqs

List returns FAQs for an agent.

Retrieves paginated FAQ knowledge sources for the specified agent. Returns 400 for invalid agent ID, 500 on service error, 200 OK with paginated FAQs on success.

Response Codes

Status Code Description
200 Success
400 Invalid request
500 Internal server error

Success

Response response.PaginatedFAQs

Paginated F A Qs

Property Type Description
data string[] Array of FAQs for current page
meta string Pagination metadata

POST /api/agents/{agent_id}/faqs

Create creates a FAQ knowledge source.

Creates a FAQ (question/answer pair) for the agent. The FAQ is stored with a pending ingest status and will be processed for embedding generation. Returns 404 if agent not found, 400 for validation errors, 500 on creation failure, 201 Created with the FAQ on success.

Request Body request.FAQ

F A Q

Property Type Description
question* string The question text
answer* string The answer text

Response Codes

Status Code Description
201 Resource created successfully
404 Resource not found
422 Validation failed
500 Internal server error

Resource created successfully

Response response.FAQResponse

F A Q

Property Type Description
id integer (int64) Unique FAQ identifier
agent_id integer (int64) ID of agent this FAQ belongs to
question string The question text
answer string The answer text
ingest_status string Processing status (pending, processing, completed, failed)
created_at string (date-time) Timestamp when FAQ was created
updated_at string (date-time) Timestamp when FAQ was last updated

GET /api/agents/{agent_id}/faqs/{id}

Get returns a FAQ by ID.

Retrieves a single FAQ by its ID. Returns 400 for invalid ID, 404 if not found or belongs to different agent, 200 OK with the FAQ on success.

Response Codes

Status Code Description
200 Success
400 Invalid request
404 Resource not found

Success

Response response.FAQResponse

F A Q

Property Type Description
id integer (int64) Unique FAQ identifier
agent_id integer (int64) ID of agent this FAQ belongs to
question string The question text
answer string The answer text
ingest_status string Processing status (pending, processing, completed, failed)
created_at string (date-time) Timestamp when FAQ was created
updated_at string (date-time) Timestamp when FAQ was last updated

PATCH /api/agents/{agent_id}/faqs/{id}

Update updates a FAQ.

Updates the specified FAQ with new question or answer content. When content changes, the ingest status is reset to pending to trigger re-embedding. Returns 400 for invalid ID, 404 if not found, 422 for validation errors, 200 OK with the updated FAQ on success.

Request Body request.FAQUpdate

F A Q Update

Property Type Description
question string | null The question text
answer string | null The answer text

Response Codes

Status Code Description
200 Success
400 Invalid request
404 Resource not found
422 Validation failed
500 Internal server error

Success

Response response.FAQResponse

F A Q

Property Type Description
id integer (int64) Unique FAQ identifier
agent_id integer (int64) ID of agent this FAQ belongs to
question string The question text
answer string The answer text
ingest_status string Processing status (pending, processing, completed, failed)
created_at string (date-time) Timestamp when FAQ was created
updated_at string (date-time) Timestamp when FAQ was last updated

DELETE /api/agents/{agent_id}/faqs/{id}

Delete deletes a FAQ.

Permanently removes a FAQ and all associated chunks and embeddings. Cannot delete while processing. Returns 400 for invalid ID, 404 if not found, 409 if currently processing, 500 on service error, 204 No Content on success.

Response Codes

Status Code Description
204 Success with no content
400 Invalid request
404 Resource not found
500 Internal server error

POST /api/agents/{agent_id}/faqs/{id}/sync

SyncSource triggers synchronization of a specific knowledge source.

Queues the knowledge source for reprocessing, which includes re-parsing content, regenerating chunks, and updating embeddings. Returns 400 for invalid ID, 404 if not found, 409 if already processing, 500 on service error, 200 OK with sync status on success.

Response Codes

Status Code Description
200 Success
400 Invalid request
404 Resource not found
500 Internal server error