API Reference
Complete reference for the KnowFlow API
The KnowFlow API allows you to programmatically manage your knowledge bases, AI assistants, and user interactions. This reference provides detailed information about available endpoints, request/response formats, and authentication methods.
Authentication
All API requests (except registration and login) require authentication using a Bearer token.
Obtaining an API Token
You can generate an API token in the KnowFlow dashboard:
- Log in to your KnowFlow account
- Go to Settings → API Keys
- Click Generate New API Key
- Name your API key and set permissions
- Copy the generated token (it will only be shown once)
Base URL
All API endpoints use the following base URL:
Response Format
All responses are returned in JSON format. A typical response includes:
For error responses:
Rate Limiting
The API has rate limits to ensure fair usage. Rate limit information is included in response headers:
If you exceed the rate limit, you will receive a 429 Too Many Requests
response.
Pagination
List endpoints support pagination with the following query parameters:
page
: Page number (starting from 1)limit
: Number of items per page (default: 20, max: 100)
Paginated responses include metadata:
Error Codes
Common error codes you may encounter:
Code | Description |
---|---|
authentication_error | Invalid or missing API token |
permission_denied | Insufficient permissions for the requested action |
resource_not_found | The requested resource does not exist |
validation_error | Invalid request parameters |
rate_limit_exceeded | Too many requests, try again later |
server_error | Internal server error |
API Versioning
The API version is included in the URL path (/v1/
). When breaking changes are introduced, a new version will be released (e.g., /v2/
). We recommend specifying the API version in your integration to ensure compatibility.
Webhooks
KnowFlow supports webhooks for real-time event notifications. You can configure webhooks in the dashboard under Settings → Webhooks.
Available events include:
conversation.created
conversation.message.created
knowledge_base.updated
app.deployment.updated
API Libraries
We provide official client libraries for several programming languages: