Knotie AI Pro API Documentation

Introduction

The Knotie AI Pro API allows you to programmatically access your voice AI agents, analytics, and other features. This documentation provides information on how to authenticate and use the API.

Authentication

All API requests require authentication using an API key. You can generate API keys in your account settings.

API Key Types

There are two types of API keys:

  • Partner API Keys (prefix: pkt_): For partners to access their account and manage customers.
  • Customer API Keys (prefix: ckt_): For customers to access their own data and agents.

Using API Keys

Include your API key in the x-api-key header with all API requests:

curl -X GET https://knotie-ai.pro/api/v1/me \
-H "x-api-key: pkt_your_api_key_here"

API Endpoints

Authentication

GET /api/v1/me

Get information about the authenticated entity (partner or customer).

Response

{
  "type": "partner",
  "data": {
    "id": "partner_id",
    "businessName": "Partner Business Name",
    "contactName": "Contact Name",
    "emailAddress": "[email protected]",
    "phoneNumber": "+1234567890",
    "createdAt": "2025-01-01T00:00:00.000Z",
    "updatedAt": "2025-01-01T00:00:00.000Z"
  }
}

Analytics

GET /api/v1/analytics/calls

Get call analytics for a specific time period.

Parameters

  • start_date (optional): Start date in ISO format (default: 30 days ago)
  • end_date (optional): End date in ISO format (default: today)

Agents

GET /api/v1/agents

Get a list of all agents.

Rate Limits

API requests are subject to rate limits based on your subscription plan and API key settings. Rate limits are applied per API key and can be configured when creating or updating an API key.

If you exceed the rate limit, the API will return a 429 Too Many Requests response.

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of a request. In case of an error, the response body will contain an error message.

{
  "error": "Invalid API key"
}

Common Error Codes

  • 400 Bad Request: The request was invalid or malformed.
  • 401 Unauthorized: Authentication failed or API key is missing.
  • 403 Forbidden: The API key does not have permission to access the requested resource.
  • 404 Not Found: The requested resource was not found.
  • 429 Too Many Requests: Rate limit exceeded.
  • 500 Internal Server Error: An error occurred on the server.