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.

curl -X GET https://api.knowflow.in/v1/organizations \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Obtaining an API Token

You can generate an API token in the KnowFlow dashboard:

  1. Log in to your KnowFlow account
  2. Go to SettingsAPI Keys
  3. Click Generate New API Key
  4. Name your API key and set permissions
  5. Copy the generated token (it will only be shown once)

Base URL

All API endpoints use the following base URL:

https://api.knowflow.in/v1

Response Format

All responses are returned in JSON format. A typical response includes:

{
  "status": "success",
  "data": {
    // Response data
  }
}

For error responses:

{
  "status": "error",
  "error": {
    "code": "error_code",
    "message": "Human-readable error message"
  }
}

Rate Limiting

The API has rate limits to ensure fair usage. Rate limit information is included in response headers:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 98
X-RateLimit-Reset: 1635753600

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:

{
  "status": "success",
  "data": [
    // Array of items
  ],
  "pagination": {
    "total": 120,
    "page": 2,
    "limit": 20,
    "pages": 6
  }
}

Error Codes

Common error codes you may encounter:

CodeDescription
authentication_errorInvalid or missing API token
permission_deniedInsufficient permissions for the requested action
resource_not_foundThe requested resource does not exist
validation_errorInvalid request parameters
rate_limit_exceededToo many requests, try again later
server_errorInternal 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 SettingsWebhooks.

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:

Additional Resources