cURL
curl --request POST \ --url https://asteragents.com/api/chat \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "messages": [ { "role": "<string>", "content": "<string>", "experimental_attachments": [ {} ] } ], "agentId": 123, "threadId": "<string>", "upstreamConversationId": "<string>" }'
{ "400": {}, "401": {}, "404": {}, "500": {}, "messages": [ { "role": "<string>", "content": "<string>", "toolCalls": [ {} ], "toolResults": [ {} ] } ], "X-Thread-ID": "<string>" }
Send a message to an AI agent and receive a response
Show Message Object
user
assistant
false
curl -X POST https://api.example.com/chat \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -H "X-Stream-Response: false" \ -d '{ "messages": [ { "role": "user", "content": "Hello, how are you?" } ], "agentId": 123 }'