Skip to Content
API ReferenceAPI Reference

API Reference

The Agentix Public API lets you interact with agents, manage conversations, and retrieve configurations programmatically.

Base URL

https://app.agentix.cl

All endpoints are prefixed with /api/public/.

Authentication

Every request must include an API key. See Authentication for details.

# Bearer token Authorization: Bearer agx_live_YOUR_KEY # Or X-API-Key header X-API-Key: agx_live_YOUR_KEY

Content Type

All POST and PATCH requests must include:

Content-Type: application/json

Endpoints Overview

MethodEndpointDescription
POST/api/public/agents/{agentId}/chatSend a message and get a response
GET/api/public/agents/{agentId}Get agent configuration
GET/api/public/agents/{agentId}/widgetGet widget-specific configuration
GET/api/public/agents/{agentId}/conversations/{sessionId}Get conversation history
PATCH/api/public/agents/{agentId}/conversations/{sessionId}Update conversation metadata
POST/api/public/teams/{teamId}/chatSend a message to an agent team

CORS

All public endpoints support CORS. The API responds to OPTIONS preflight requests and includes appropriate Access-Control-* headers. If your agent has domain restrictions configured, CORS will only allow requests from those domains.

Common Error Codes

StatusCodeDescription
400INVALID_AGENT_IDThe agent ID is missing or empty
400INVALID_REQUEST_DATAThe request body is invalid
400INVALID_JSONThe request body is not valid JSON
401MISSING_API_KEYNo authentication provided
401INVALID_API_KEYThe API key is invalid or revoked
403AGENT_NOT_PUBLICThe agent is not publicly accessible
403AGENT_INACTIVEThe agent is not in an active state
403ORG_MISMATCHAPI key organization does not match agent organization
403DOMAIN_NOT_ALLOWEDRequest origin is not in the agent’s allowed domains
404AGENT_NOT_FOUNDNo agent exists with the given ID
404CONVERSATION_NOT_FOUNDNo conversation found for the given session
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORServer error

Error Response Format

All errors return a consistent JSON structure:

{ "error": "Human-readable error message", "code": "MACHINE_READABLE_CODE" }

OpenAPI Specification

A full OpenAPI 3.1 specification is available at /openapi.json for use with API clients, code generators, and documentation tools.

Last updated on