Retrieves a list of all agents with their basic information.
Endpoint: /agent
Method: GET
Status 200 (Success):
[
{
"id": 1,
"name": "John Doe",
"description": "Experienced agent",
"introduction": "Hello, I'm John",
"instructions": "Follow up with leads promptly",
"email_address": "[email protected]",
"phone_number": "+1234567890",
"wa_business_id": "123456",
"wa_phone_id": "789012",
"wa_access_token": "token123",
"kommo_subdomain": "company",
"kommo_access_token": "token456",
"google_sheet_url": "<https://docs.google.com/spreadsheets/d/123>",
"status": "active",
"created_at": "2024-04-03T10:00:00Z"
}
]
Status 403 (Forbidden):
{
"message": "Access denied"
}
Status 404 (Not Found):
{
"message": "Service account not found"
}
Status 500 (Internal Server Error):
{
"message": "Internal server error"
}
Creates a new AI agent with the specified configuration.
Endpoint: /agent
Method: POST
{
"name": "John Doe", // Required
"description": "Experienced agent", // Optional
"introduction": "Hello, I'm John", // Optional
"instructions": "Follow up with leads", // Optional
"email_address": "[email protected]", // Optional
"phone_number": "+1234567890", // Optional
"wa_business_id": "123456", // Optional
"wa_phone_id": "789012", // Optional
"wa_access_token": "token123", // Optional
"kommo_subdomain": "company", // Optional
"kommo_access_token": "token456", // Optional
"google_sheet_url": "<https://docs.google.com/spreadsheets/d/123>", // Optional
"status": "active" // Optional
}
Status 201 (Created):
{
"message": "Agent created successfully.",
"id": 1
}
Status 400 (Bad Request):
{
"message": "Invalid request"
}
Status 403 (Forbidden):
{
"message": "Access denied"
}