Run agent

This endpoint runs the agent with the provided input message.

POST /Agent/run

This endpoint runs the agent with the provided input message.

Authentication

Authentication required. Send your user API key in the X-API-Key header.

Parameters

This operation has no path, query, or header parameters.

Request body

Content type: multipart/form-data · Schema: object

PropertyTypeRequiredDescriptionConstraints
filestring · binaryNo——
AgentIdinteger · int32No——
ConversationIdinteger · int32No——
UserInputMessagestringNo——
MessageTypeMessageTypeNo——
ProgressRunIdstringNo——
DocumentIdinteger · int32No——

Example request

curl --request POST \
  --url 'https://api.zild.ai/Agent/run' \
  --header 'X-API-Key: YOUR_USER_API_KEY' \
  --form 'file=@file' \
  --form 'AgentId={AgentId}' \
  --form 'ConversationId={ConversationId}' \
  --form 'UserInputMessage={UserInputMessage}' \
  --form 'MessageType={MessageType}' \
  --form 'ProgressRunId={ProgressRunId}' \
  --form 'DocumentId={DocumentId}'

Responses

StatusDescriptionResponse body
200Execution completed successfullyapplication/json · AgentRunTextResponseDto

Example response (200):

{
  "conversationId": 0,
  "userMessageId": 0,
  "attachmentMessageId": 0,
  "assistantMessageId": 0,
  "reply": "string"
}

Data models

AgentRunTextResponseDto
PropertyTypeRequiredDescriptionConstraints
conversationIdinteger · int32No——
userMessageIdinteger · int32No——
attachmentMessageIdinteger · int32No—nullable
assistantMessageIdinteger · int32No——
replystringNo—nullable
MessageType

0 = Text; 1 = Image; 2 = File; 3 = Audio; 4 = Video; 5 = Internal; 6 = TemplateMarketing; 7 = TemplateUtility; 8 = Location; 9 = Contact

integer