API Endpoints

Complete documentation of all tahc API endpoints.

API endpoints are coming soon! This page provides a preview of the endpoints that will be available when the tahc API launches.

Planned Base URL

https://app.tahc.ai/api/v1

Conversations (Preview)

List Conversations

Get a paginated list of all conversations.

Request
GET /conversations

Query Parameters:
- status: open | pending | closed
- limit: number (default: 20, max: 100)
- offset: number (default: 0)
- from: ISO date string
- to: ISO date string
Response
{
"data": [
  {
    "id": "conv_abc123",
    "visitor_name": "John Smith",
    "visitor_email": "[email protected]",
    "status": "open",
    "source_url": "https://yoursite.com/pricing",
    "created_at": "2025-01-15T14:30:00Z",
    "updated_at": "2025-01-15T14:35:00Z",
    "message_count": 5
  }
],
"meta": {
  "total": 142,
  "limit": 20,
  "offset": 0
}
}

Get Conversation

Get a single conversation with messages.

Request
GET /conversations/:id

Send Message

Send a message to a conversation.

Request
POST /conversations/:id/messages

{
"content": "Thanks for reaching out! Let me help you with that.",
"sender_type": "agent"
}

Update Conversation

Update conversation status or assignment.

Request
PATCH /conversations/:id

{
"status": "closed",
"assigned_to": "user_123"
}

Contacts (Preview)

List Contacts

Request
GET /contacts

Query Parameters:
- email: email address to search
- limit: number (default: 20)
- offset: number (default: 0)

Create Contact

Request
POST /contacts

{
"name": "Jane Doe",
"email": "[email protected]",
"custom_fields": {
  "company": "Acme Inc",
  "plan": "enterprise"
}
}

Update Contact

Request
PATCH /contacts/:id

{
"name": "Jane Smith",
"custom_fields": {
  "plan": "pro"
}
}

Delete Contact

Request
DELETE /contacts/:id

Knowledge Base (Preview)

List Articles

Request
GET /knowledge

Query Parameters:
- source: crawled | uploaded | manual
- limit: number
- offset: number

Add Article

Request
POST /knowledge

{
"type": "qa",
"question": "What are your business hours?",
"answer": "We're open Monday-Friday, 9 AM to 5 PM EST."
}

Analytics (Preview)

Overview

Get dashboard overview metrics.

Request
GET /analytics/overview

Query Parameters:
- from: ISO date (required)
- to: ISO date (required)
Response
{
"period": {
  "from": "2025-01-01",
  "to": "2025-01-15"
},
"conversations": {
  "total": 523,
  "ai_resolved": 412,
  "human_handled": 111
},
"resolution_rate": 0.79
}

Webhooks (Preview)

Create Webhook

Request
POST /webhooks

{
"url": "https://yourserver.com/tahc-webhook",
"events": [
  "conversation.created",
  "conversation.escalated"
]
}

Error Responses (Preview)

All errors will follow this format:

Error response
{
"error": "error_code",
"message": "Human-readable message",
"code": 400
}

Error Codes

CodeErrorDescription
400bad_requestInvalid request body or parameters
401unauthorizedMissing or invalid API key
403forbiddenInsufficient permissions
404not_foundResource doesn't exist
429rate_limitedToo many requests
500server_errorInternal server error

Rate Limits (Planned)

PlanRequests/minute
Starter60
Starter+120
Pro300

Get Notified

Want to know when the API is available?

  • Follow us on social media for updates
  • Check back on this page
  • Contact [email protected] to join the beta list

Available Now

While the API is in development, you can use these integrations today:

Next Steps

Was this helpful?