Skip to Content
Uncodie Market Fit está disponible 🎉
Rest APIAgentsSend Message to Agent

Send Message to Agent

Send a message to an AI agent and receive a response.

Endpoint

POST /api/agents/message

Request Body

ParameterTypeRequiredDescription
messagestringYesThe message to send to the agent
agentIdstringYesThe ID of the agent to send the message to
conversationIdstringNoOptional conversation ID to maintain context

Example Request

{ "message": "What are the key features of this website?", "agentId": "agent_123", "conversationId": "conv_456" }

Response

Success Response

{ "success": true, "data": { "message": "The website has several key features including...", "conversationId": "conv_456", "timestamp": "2024-03-13T12:00:00Z" } }

Error Response

{ "success": false, "error": { "code": "INVALID_AGENT", "message": "The specified agent does not exist" } }

Error Codes

CodeDescription
INVALID_AGENTThe specified agent ID is invalid or does not exist
INVALID_MESSAGEThe message content is invalid or empty
AGENT_ERRORThe agent encountered an error processing the message
RATE_LIMITToo many requests in a short time period

Rate Limits

  • 100 requests per minute per user
  • 1000 requests per hour per user

Notes

  • The conversationId is optional but recommended for maintaining context in multi-message conversations
  • Messages are processed asynchronously and responses may take a few seconds
  • The agent’s response will be in the same language as the input message
Last updated on