Skip to main content

API Endpoints

The Texterz API allows you to programmatically manage knowledge, bots, and conversations.

1. Knowledge Management

GET /api/knowledge/buckets

List all knowledge buckets in your organization.

POST /api/knowledge/buckets

Create a new knowledge bucket.

  • Body: { "name": "Support FAQ", "description": "General customer questions" }

POST /api/knowledge/upload

Upload a document to a specific bucket.

  • Body: Multipart form-data containing the file and bucketId.

2. Chatbot Operations

GET /api/chatbots

List all bots in your organization.

POST /api/chatbots

Create a new AI agent.

  • Body: { "name": "Sales Agent", "model": "gpt-4o", "systemPrompt": "..." }

PATCH /api/chatbots/[id]

Update a bot's configuration (System Prompt, Model, etc.).

3. Conversation & Chat

POST /api/visitor-message

Send a message to a bot (used by the web widget).

  • Body: { "widgetId": "...", "message": "Hello!", "conversationId": "..." }

GET /api/organizations/[orgId]/conversations/[id]

Retrieve the transcript and metadata for a specific conversation.

4. Outbound Campaigns

GET /api/outbound/campaigns

List all campaigns.

POST /api/outbound/campaigns

Initialize a new outbound campaign.

  • Body: { "name": "May Promo", "chatbotId": "...", "leads": [...] }

Rate Limiting

The API is rate-limited based on your subscription tier.

  • Basic: 60 requests per minute.
  • Standard/Pro: 300 requests per minute.
  • Enterprise: Custom limits.

If you exceed these limits, the API will return a 429 Too Many Requests error.