Overview

The Trillet AI API provides programmatic access to create and manage AI agents, conversation flows, voice calls, and SMS messaging. Our REST API uses standard HTTP methods and returns JSON responses.

Base URL

bash https://api.trillet.ai

Authentication

All API requests require authentication using an API key in the x-api-key header:

curl https://api.trillet.ai/v1/api/
  -H "x-api-key: YOUR_API_KEY"
  -H "Content-Type: application/json"
x-api-key
string
required

Your API key for authentication. Include this in the request headers.

Content-Type
string
required

Must be set to application/json.

Get your API key from Trillet Settings Dashboard

API Resources

Rate Limits

The API has rate limits based on your plan. Contact the Trillet team to increase your limits.

PlanRequests per minuteConcurrent calls
Developer601

Webhooks [Coming Soon!]

Configure webhooks to receive real-time updates about events in your account. Each webhook request includes an event type and relevant data:

{
  "event": "call.completed",
  "data": {
    "callId": "call_xyz789",
    "agentId": "agent_123abc",
    "duration": 125,
    "status": "completed"
  }
}

Webhook Events

  • call.started - When a call begins
  • call.completed - When a call ends
  • call.failed - When a call fails to connect
  • sms.sent - When an SMS is sent
  • sms.delivered - When an SMS is delivered
  • agent.created - When a new agent is created
  • agent.updated - When an agent is updated
  • flow.created - When a new flow is created
  • flow.updated - When a flow is updated

Webhook Security

Verify webhook signatures using the signature in the X-Trillet-Signature header:

# Your webhook secret from the dashboard
WEBHOOK_SECRET=whsec_xxxxxxxxxxxxx

# Verify the signature before processing webhooks

Error Handling

The API uses conventional HTTP response codes:

  • 200 - Success
  • 400 - Bad request
  • 401 - Unauthorized
  • 403 - Forbidden
  • 404 - Not found
  • 429 - Too many requests
  • 500 - Server error

Error responses include a message and error code:

{
  "error": {
    "code": "invalid_number",
    "message": "The provided phone number is invalid"
  }
}

Need Help?

API Status [Coming Soon!]

Check our API status and uptime

Support

Get technical support