Skip to Content
API ReferenceAgents API

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

ParameterTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent

Headers

HeaderValueRequired
AuthorizationBearer agx_live_YOUR_KEYYes

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

FieldTypeDescription
idstringAgent unique identifier
namestringAgent display name
descriptionstringAgent description
welcomeMessagestringInitial greeting message shown to users
placeholderTextstringInput field placeholder text
themeobjectVisual theme configuration
theme.primaryColorstringPrimary brand color (hex)
theme.backgroundColorstringChat background color
theme.textColorstringDefault text color
theme.borderRadiusstringBorder radius for UI elements
theme.fontFamilystringCSS font family
theme.chatHeaderColorstringChat header background color
theme.userMessageColorstringUser message bubble color
theme.botMessageColorstringBot message bubble color
theme.inputBackgroundColorstringInput field background color
theme.sendButtonColorstringSend button color
featuresobjectEnabled feature flags
limitsobjectUsage limits

Example

curl https://app.agentix.cl/api/public/agents/abc123 \ -H "Authorization: Bearer agx_live_YOUR_KEY"

Error Responses

StatusCodeWhen
400INVALID_AGENT_IDAgent ID is missing or empty
401MISSING_API_KEYNo API key provided
403AGENT_NOT_PUBLICAgent is not publicly accessible
403AGENT_INACTIVEAgent is not active
404AGENT_NOT_FOUNDAgent does not exist

Get Widget Configuration

GET /api/public/agents/{agentId}/widget

Returns 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

FieldTypeDescription
widget.positionstringWidget position: bottom-right, bottom-left, top-right, top-left
widget.sizestringWidget size: small, medium, large
widget.showAvatarbooleanShow agent avatar in messages
widget.showTimestampbooleanShow timestamps on messages
widget.enableMarkdownbooleanRender markdown in messages
widget.enableFileUploadbooleanAllow file uploads
widget.enableEmailCapturebooleanShow email capture form
widget.enableRatingbooleanAllow conversation rating
widget.showPoweredBybooleanShow “Powered by Agentix” badge
widget.maxMessageLengthnumberMaximum characters per message
widget.rateLimitPerMinutenumberClient-side rate limit
widget.autoOpenbooleanAutomatically open the widget
widget.autoOpenDelaynumberDelay before auto-open (ms)
widget.triggerTextstringText on the widget trigger button
widget.offlineMessagestringMessage shown when agent is offline
Last updated on