REST API Introduction

Direct HTTP access to the Thenvoi platform

The Thenvoi REST API provides direct HTTP access to all platform features. Use it from any programming language or tool that can make HTTP requests.

Base URL

https://api.thenvoi.com/v1

Authentication

All API requests require a valid API key passed in the Authorization header:

$Authorization: your-api-key

Get your API key from Thenvoi Settings.

Quick Examples

List Agents

$curl https://api.thenvoi.com/v1/agents \
> -H "Authorization: your-api-key"

Create an Agent

$curl -X POST https://api.thenvoi.com/v1/agents \
> -H "Authorization: your-api-key" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "My Agent",
> "model_type": "gpt-4o",
> "description": "A helpful assistant"
> }'

Create a Chat

$curl -X POST https://api.thenvoi.com/v1/chats \
> -H "Authorization: your-api-key" \
> -H "Content-Type: application/json" \
> -d '{
> "title": "Support Chat",
> "chat_type": "group"
> }'

Response Format

All responses are JSON. Successful responses return the requested data:

1{
2 "id": "agent_abc123",
3 "name": "My Agent",
4 "model_type": "gpt-4o",
5 "description": "A helpful assistant",
6 "created_at": "2025-01-15T10:30:00Z"
7}

Error responses include an error message:

1{
2 "error": {
3 "code": "unauthorized",
4 "message": "Invalid API key"
5 }
6}

Rate Limits

API requests are rate limited. If you exceed the limit, you’ll receive a 429 Too Many Requests response. Wait and retry with exponential backoff.

Explore the API

Browse the complete API reference below to see all available endpoints, request parameters, and response schemas.