Agents API
Retrieve agent configuration and public profile information.
Get Agent Configuration
GET /api/public/agents/{agentId}Returns the public configuration of an agent, including its name, description, welcome message, theme settings, and feature flags.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | The unique identifier of the agent |
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer agx_live_YOUR_KEY | Yes |
Response
{
"id": "abc123",
"name": "Support Bot",
"description": "Customer support assistant for Acme Corp",
"welcomeMessage": "Hi! How can I help you today?",
"placeholderText": "Type your message...",
"theme": {
"primaryColor": "#6366f1",
"backgroundColor": "#ffffff",
"textColor": "#1f2937",
"borderRadius": "12px",
"fontFamily": "Inter, sans-serif",
"chatHeaderColor": "#6366f1",
"userMessageColor": "#6366f1",
"botMessageColor": "#f3f4f6",
"inputBackgroundColor": "#ffffff",
"sendButtonColor": "#6366f1"
},
"features": {
"enableMarkdown": true,
"enableFileUpload": false,
"enableEmailCapture": true,
"enableRating": true,
"enableLeadCapture": true
},
"limits": {
"maxMessageLength": 2000,
"rateLimitPerMinute": 60
}
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Agent unique identifier |
name | string | Agent display name |
description | string | Agent description |
welcomeMessage | string | Initial greeting message shown to users |
placeholderText | string | Input field placeholder text |
theme | object | Visual theme configuration |
theme.primaryColor | string | Primary brand color (hex) |
theme.backgroundColor | string | Chat background color |
theme.textColor | string | Default text color |
theme.borderRadius | string | Border radius for UI elements |
theme.fontFamily | string | CSS font family |
theme.chatHeaderColor | string | Chat header background color |
theme.userMessageColor | string | User message bubble color |
theme.botMessageColor | string | Bot message bubble color |
theme.inputBackgroundColor | string | Input field background color |
theme.sendButtonColor | string | Send button color |
features | object | Enabled feature flags |
limits | object | Usage limits |
Example
curl https://app.agentix.cl/api/public/agents/abc123 \
-H "Authorization: Bearer agx_live_YOUR_KEY"Error Responses
| Status | Code | When |
|---|---|---|
400 | INVALID_AGENT_ID | Agent ID is missing or empty |
401 | MISSING_API_KEY | No API key provided |
403 | AGENT_NOT_PUBLIC | Agent is not publicly accessible |
403 | AGENT_INACTIVE | Agent is not active |
404 | AGENT_NOT_FOUND | Agent does not exist |
Get Widget Configuration
GET /api/public/agents/{agentId}/widgetReturns widget-specific configuration including position, size, behavior settings, and custom CSS. This endpoint is used by the embed script to initialize the widget.
Response
{
"id": "abc123",
"name": "Support Bot",
"description": "Customer support assistant",
"welcomeMessage": "Hi! How can I help?",
"placeholderText": "Type a message...",
"theme": {
"primaryColor": "#6366f1",
"backgroundColor": "#ffffff",
"textColor": "#1f2937"
},
"widget": {
"position": "bottom-right",
"size": "medium",
"showAvatar": true,
"showTimestamp": true,
"enableMarkdown": true,
"enableFileUpload": false,
"enableEmailCapture": true,
"enableRating": true,
"showPoweredBy": true,
"maxMessageLength": 2000,
"rateLimitPerMinute": 60,
"autoOpen": false,
"autoOpenDelay": 3000,
"triggerText": "Chat with us",
"offlineMessage": "We are currently offline."
}
}Widget Configuration Fields
| Field | Type | Description |
|---|---|---|
widget.position | string | Widget position: bottom-right, bottom-left, top-right, top-left |
widget.size | string | Widget size: small, medium, large |
widget.showAvatar | boolean | Show agent avatar in messages |
widget.showTimestamp | boolean | Show timestamps on messages |
widget.enableMarkdown | boolean | Render markdown in messages |
widget.enableFileUpload | boolean | Allow file uploads |
widget.enableEmailCapture | boolean | Show email capture form |
widget.enableRating | boolean | Allow conversation rating |
widget.showPoweredBy | boolean | Show “Powered by Agentix” badge |
widget.maxMessageLength | number | Maximum characters per message |
widget.rateLimitPerMinute | number | Client-side rate limit |
widget.autoOpen | boolean | Automatically open the widget |
widget.autoOpenDelay | number | Delay before auto-open (ms) |
widget.triggerText | string | Text on the widget trigger button |
widget.offlineMessage | string | Message shown when agent is offline |
Last updated on